android – Preventing USSD dialog and read USSD response. (year 2020 Solution)-ThrowExceptions

Exception or error:

Follow the top rated answer from this link:
Prevent USSD dialog and read USSD response?

Then add this piece of code in your under the onCreate section:

Intent openSettings = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);

Once you run your app, the phone will ask you to set the Accessibility setting of your installed app to ON.
If it doesn’t, then manually go to your phone’s settings, under the Accessibility section, set it to ON.

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *