How to read/intercept USSD message coming on Android phone
Asked Answered
B

1

6

So unil this point all I can figure over was that until Android 4.2.2 there were two ways available to us :

  1. Use the logcat and extract information from it Runtime.getRuntime().exec( "logcat -v time -b main PhoneUtils:D"); I used this code to read the logcat and find out the displayMMIComplete message here

  2. Use the provided intent named com.android.ussd.IExtendedNetworkService and listen for this intent and do you task.

So what I've acknoweldge until now is, Since 4.0 onwards this intent has been removed and since 4.2.2 onwards printing of USSD message info in the logcat has been removed?

Am I right until here? And secondly what's the hack or solution now to read the USSD message, there must be some way we can get through it?

Bjork answered 22/1, 2015 at 7:9 Comment(0)
C
1

There is no Android-framework provided API yet which can be used to "read/intercept" USSD Messages in a Portable way.

The 2 approaches that you mentioned is what was available till now, but as you mentioned, support for it is dropped from Android open source project.

There is a request/discussion going on, which clearly shows that many developers are requesting this feature, but so far there is no update/communication from Google's side to explain future roadmap about adding support to "read/intercept" USSD Messages in a Portable way.

Counterclockwise answered 22/1, 2015 at 7:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.