How to read USSD messages in android?

All we need is a simple explanation of the problem, which is provided below.

I am developing an android application. I basically want to read the USSD responses into the application. Is there any API to do so? How to fetch these messages into application?

Let’s Solve it:

This is a common error many developers questioned us about it. So we write the explanation above. You just have to apply the suggested solution to your code and it will do for you. If you still getting this error after applying this code then comment below we will get back to you with the new method.

Solution 1

There is no API for USSD request yet. The ticket to create this API is not closed. But the community has found several hacks how to add this feature to their applications.

  1. The first approach is to parse a log. Here is where you can find a class that do this. And here is a test application that uses this class.
  2. Also there is a second approach.

Good luck!

Note: You are free to use these solutions for your personal use. We recommend you apply the first solution to your code because it was tested in our system before posting it on this page.

We are always trying to help the developer community, So we made their work easy. Basically, we collected these data from, As it is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0.

Leave a Comment