is Android not supporting USSD CALL?

旧城冷巷雨未停 提交于 2020-01-30 11:40:48

问题


I'm trying to make a USSD call on my app

I tried to do this :

Intent fastCall = new Intent(Intent.ACTION_CALL);
String Num = "*100*200"+ Uri.encode("#");
fastCall.setData(Uri.parse("tel:" + Num));
startActivity(fastCall);

but I keep getting an error:

Connection problem or invalid MMI code

what can I do ? or should I just use ACTION_DIAL?

any idea ?


回答1:


No Android does not fully support USSD. Notice that there are no actual USSD APIs. Your dialer may or may not send USSD codes. Really its a technology that no longer makes sense in today's world where we have actual data connections. A given code may work depending on device, dialer, SIP installation, carrier, etc. Or it may not. In any case there's no reliable way to get any answering data.




回答2:


I think using ACTION_DIAL can not work well yet. ACTION_DIAL used to lunch system dialer app.



来源:https://stackoverflow.com/questions/45575922/is-android-not-supporting-ussd-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!