简体   繁体   中英

calling USSD with text attached on android

How is it possible to call a USSD with a text attached on android. For example: *455*1*Hello*0# . I have looked around the web and couldn't find any solution for it. The only question that seems to resemble what I want to achieve was asked 9 years ago here . Surely there is some API or a workaround available in Android after all these years?

  • I also tried to URI.encode all characters that aren't a number. No luck there as explained here .
  • I have thought of interacting with the dialog to insert the text but that will take a significant amount of time for the user which renders the app useless.
  • Neither ACTION_CALL intent nor placeCall API does anything to solve this.
  • Is it not in the protocol to send a text on the initial request?
  • TelephonyManager::sendUssdRequest(String, TelephonyManager.UssdResponseCallback, Handler) was introduced in API 26. I am targeting API 21 and above. I haven't checked if that solves it yet tho.

Take a look at this library seems to be what you are looking for.

Library is called VoIpUSSD by romellfudi incase link doesn't work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM