0

I would like to call a ussd in this format *123*1*3# to shorten the process of dialing *123# waiting for menu then 1 waiting the menu then 3.

I discover that in some ussd calls it's possible and some not possible but their are number of applications which does this e.g https://usehover.com

Am basic Android developer bellow is the code which i used to run ussd command and i believe is lucking support

String ussd = "*123*1*4*5" + Uri.encode("#");
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + ussd)));

to get final output of menu 5 but didn't work, in additional i also tried https://gist.github.com/posei/1e5ae219329aa1015d3c55c3982352c5 which is not working as well

Passing multiple USSD commands in a single call

interactive ussd session(multi step) does not work on android 8(Oreo)

I like to ask if there is anyone who knows how to do this or any solution which can be used to solve this.

Thanks

  • @Andreas am asking for help because i did much research and failed https://stackoverflow.com/questions/55330850/android-navigating-through-ussd-menu-using-pre-determined-inputs-sent-via-requ – wwwserver2 Jul 08 '19 at 07:56
  • Answers which am getting on the internet none explain this or worked, some appears to be available in ore only – wwwserver2 Jul 08 '19 at 07:58
  • Thanks, I did as request... I would like to ask your knowledge and suggestions – wwwserver2 Jul 08 '19 at 08:20

3 Answers3

3

Unfortunately the API that Google added in Oreo only works for USSD services where you can dial the entire USSD code at the start and get back the response without entering anything into the session. What they apparently don't realize is that most telcos prevent this for security reasons.

My company Hover which you mentioned has developed an Android SDK so that you can get this functionality in your own app. What you've presented as the method for dialing is correct, but then for additional steps we use Android accessibility services to detect and enter choices into the session. It can be quite hairy, especially to make it work on various devices and Android versions. Without using accessibility services there is no way to get the session response back.

Our tool allows you to create configurations for USSD services then trigger the session to run from your app. You can pass in any runtime variables you need. The user never sees the USSD session and when the response is returned your app is notified and you can parse it as you need. It works on Android 4.3 and above.

The SDK is free to integrate and use until you hit large scale. Please see our docs to get started.

(Disclosure: I am the CTO of Hover)

davkutalek
  • 396
  • 2
  • 14
1

There's an awesome service called AutoUssd (https://autoussd.com) that allows you to do just this.

The SDK allows you to create interactive, multi-step USSD sessions which are hidden behind a layout file and the results of a session is reported to your app via a callback.

Kindly check it out to see if it fits your needs...

Kwame Opare Asiedu
  • 2,110
  • 11
  • 13
0

Unfortunately, this is not a client matter but a server matter. The USSD service hosted by the telco has to allow this kind of queries and it needs to parse them, to check the validity of the parameters, and so on.

mszmurlo
  • 1,250
  • 1
  • 13
  • 28