如何运行USSD对Android的命令?命令、USSD、Android

由网友(凉生不忧伤)分享简介:有没有人知道如何运行USSD命令检查手机的贷方余额(数量* 123#),并得到结果(贷方余额)进行进一步的处理? thankss has anyone know how to runs USSD command for checking phone's credit balance (the number is *1...

有没有人知道如何运行USSD命令检查手机的贷方余额(数量* 123#),并得到结果(贷方余额)进行进一步的处理? thankss

has anyone know how to runs USSD command for checking phone's credit balance (the number is *123#) and get the result (the credit balance) for further processing?? thankss

推荐答案

您可以在Android设备上运行USSD codeS,但你将无法解析结果在应用程序中。此功能可能被添加到了Android SDK的未来,但现在,你将不得不寻找一个替代品。

You can run USSD codes in Android devices but you would be unable to parse the result in your application. This feature might be added to the Android SDK in the future but for now, you would have to look for an alternative.

USSD可以通过简单的通话意图运行。见例子:

USSD can be run using simple Call intents. See Example:

String ussdCode = "*" + "123" + Uri.encode("#");
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + ussdCode)));

如上述评价电话呼叫许可也是必需

as mentioned in the comments phone call permission is also required

<uses-permission android:name="android.permission.CALL_PHONE" /
阅读全文

相关推荐

最新文章