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?
Asked
Active
Viewed 2.5k times
33
-
Check solution on http://stackoverflow.com/questions/6515906/how-to-read-ussd-messages-in-android/33964512#33964512 – Umesh Isran Nov 27 '15 at 20:50
-
Check my anwser here http://stackoverflow.com/a/34132708/5603642 – HenBoy331 Jan 03 '16 at 21:28
1 Answers
34
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.
- 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.
- Also there is a second approach.
Good luck!

Alexis Wilke
- 19,179
- 10
- 84
- 156

Yury
- 20,618
- 7
- 58
- 86
-
1
-
1AFAIR, I tried the first one with Gingerbread and it worked. I do not know about new versions. – Yury Feb 21 '13 at 08:32
-
@Yury is it working with android 4.2 ?? https://code.google.com/p/android/issues/detail?id=1285#c311 someone says the latest version of android broke the hack. But I don't know what "hack" he was talking about. Can you please post an update here, it will be great! – Matical Apr 02 '13 at 20:31
-
Sorry, this is not my repository and I can say nothing if it is working in Android 4.2. – Yury Apr 02 '13 at 21:07
-
-
2I'm currently having no luck using the first approach on 4.4.4. The result message has apparently been removed from the log. – Telmo Marques Aug 09 '14 at 15:03
-
5Also, the second approach isn't available on 4.2.2+ https://code.google.com/p/android/issues/detail?id=57120 – Telmo Marques Aug 10 '14 at 19:43
-
3
-
1
-
-
so any one could help me with links to read the ussd to track the mobile prepaid balance. – Srishti Roy May 25 '15 at 12:20
-
-