Sending text data via USSD in Android

倖福魔咒の 提交于 2021-02-19 07:52:11

问题


Is there a possibility to send text data via USSD in android?

The only way I found was to invoke an android.intent.action.CALL intent and append the text data after as follows

tel:#(short code)(bookmark)(number of pages)(page number)(MSISDN)*(text data)# e.g. tel:#161*129*1*1*5555*(text data)#

But once I append text data & start the ACTION_CALL but the text data will be converted into keypad codes.

That is ACL = 225.

Is there any other way to piggy back text data on an USSD call without getting the text converted into keypad codes?


回答1:


OutgoingCallReceiver convert text data using these 2 methods: PhoneNumberUtils.convertKeypadLettersToDigits and PhoneNumberUtils.stripSeparators Using ACTION_CALL intent there is no way to prevent it happened. I hope there is a way to use internal library to send USSD directly, but have no idea how to achieve it...



来源:https://stackoverflow.com/questions/5898171/sending-text-data-via-ussd-in-android

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