不能用字母发送美元

时间:2019-10-30 09:12:54

标签: android ussd

我用字母发送usd请求,因为usd中有文本,但文本消失了。* 898 * 1 * 2 * 3 * tt3296949 * 500#必须发送。 动作。呼叫显示* 898 * 1 * 2 * 3 * 3296949 * 500#。

  String [] data = 
    mPresenter.getFieldsElements(mLinearLayoutFields);

                String ussd;
                if (mCategoryResponse.getId() == 1) {
                     ussd = "*898*1*"+ mCategoryResponse.getId();

                }else {
                     ussd = "*898*1*"+ mCategoryResponse.getId()+"*"+Constants.merchantOrder;
                }


                for (int i = 0; i < data.length; i++) {
                    ussd = ussd+"*"+Uri.encode(data[i]);
                }

                ussd = ussd+"#";

                if (offlineMode()) {

                    RxPermissions rxPermissions = new RxPermissions(this);
                    String finalUssd = ussd;
                    rxPermissions.request(

                            Manifest.permission.CALL_PHONE)
                            .subscribe(granted -> {


                                Intent callIntent = new Intent(Intent.ACTION_CALL);

                                callIntent.setData(Uri.fromParts("tel", finalUssd, null));
                                startActivity(callIntent);
                            });



                }

0 个答案:

没有答案
相关问题