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?
URI.encode
all characters that aren't a number. No luck there as explained here.ACTION_CALL
intent nor placeCall
API does anything to solve this.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.