I've been reading threads about USSD dialogs in here and other forums for a few days. (by USSD I mean operator's notifications with call cost details in it).
I've seen many solutions which apparently worked for lower API levels in android but after lots of tests, figured they don't work anymore or at least I couldn't get them to work.
First I wanted to know if there's any way to detect if a ussd dialog has been shown to the user. so I tried this : Prevent USSD dialog and read USSD response?
but all I could get from logs were somehow related to my app, although I could see them in Eclipse's LogCat but no MMI related logs were captured in my app ! maybe it was working in lower Android versions than mine (4.2.2).
then I decided to use "IExtendedNetworkService" like it was used in the following links and many others :
https://github.com/alaasalman/ussdinterceptor
Using IExtendedNetworkService to get USSD response in Android
How to read USSD messages in android?
but it was also useless for android 4.2.2 and above.
then I found this link : How to dismiss system dialog in Android?
it seemed promising but I couldn't get it to work even after lots of tests. I thought maybe I was doing something wrong or it was for lower APIs too.
after that I tried many other things like simulating home key and back key and even touching programmatically to hide that notification but none of them worked since they all work under my own activity.
Does anyone know if any of these methods or others work for managing or even detecting USSD messages in android 4.2.2 and above ?
I really appreciate any help, thanks in advance.