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 norplaceCall
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.