1

I keep getting grey pop-up error messages from an essential app I don't want to uninstall ("xDrip+: No sensor found"). The messages keep displaying outside of the app which is annoying. Is there a way to disable those messages?

I tried finding that out myself but I couldn't even find what this element is called. Any help, even just saying what this message type is called by Android would be a step forward.

I'm quite surprised that apps are allowed to display those intrusive messages whenever they want.

edit: The alert is called a toast.

enter image description here

  • xDrip+ is an app, most likely you have it installed: https://github.com/NightscoutFoundation/xDrip – Robert Oct 18 '19 at 09:14
  • Hi Robert, I stated I don't want to uninstall the app. I'm looking for a way to disable its toasts (at least outside the app itself) without having to uninstall it. The toasts feel very crude and more like last century UI to me - so I'm surprised they are actually part of Android. – Cornelius Roemer Oct 18 '19 at 12:03
  • 3
    Setup [tag:adb] in your PC, and issue this command: adb shell appops set PKG_NAME TOAST_WINDOW deny to prevent toasts from reappearing. Replace PKG_NAME with the package name of the xdrip+ app. To find it, follow my answer here. – Firelord Oct 18 '19 at 12:17
  • @Cornelius It is an open source project. You can simply create an issue here and describe the problem you have and how annoying this toast is. – Robert Oct 18 '19 at 12:36
  • @Firelord: This sounds great, I'll have a try! Robert: Good point, I will do that, too. Maybe they can simply add an option to disable the toasts from within the app to the notifications menu. Bit of an XY-problem ;) – Cornelius Roemer Oct 18 '19 at 13:31
  • @Firelord Where did you find this command? Is there also a command to check the current status of the app (of this configuration), too? – android developer Apr 29 '21 at 08:23
  • 1
    @androiddeveloper through curiosity. A new Android was released. Decided to dig into system binaries and got my hands on it. XDA might have been another source. Don't remember for sure. As for appops configuration of a package, the command appops takes other arguments too. Just type 'adb shell appops' to see them. To see appops config of a package, type 'adb shell appops get PKG_NAME' – Firelord Apr 29 '21 at 09:08
  • @Firelord Thank you. It's not documented anywhere? From which version of Android is it available? – android developer Apr 29 '21 at 09:35
  • @androiddeveloper the executable and the underlying functionality of permissions was introduced in Android 5. But it had issues in working. Since Android 5.1 it seems to be working fine. Over the years it has improved with more arguments available. No, there is no documentation available. Searching adb shell appops actually leads to its source code! As for which ops can be changed, I also had to search that in another source code once! – Firelord Apr 29 '21 at 13:37
  • @androiddeveloper The backend AppopsManager documentation is here though. https://developer.android.com/reference/android/app/AppOpsManager The oldest api support seems to be from Android 4.4. I don't know much though so that's all I can help. :) – Firelord Apr 29 '21 at 13:41
  • @Firelord Interesting. Do you think it can grant/deny special permissions, such as accessibility, admin, ... Maybe also setting as default app of something? BTW the link is dead. – android developer Apr 29 '21 at 14:12
  • 1
    @androiddeveloper I have fixed that link. Try that again. Special permissions, I don't know about. The source of AppOpsManager.java (android 11) does mention certain capabilities related to Accessibility. You can see for yourself if it does have support or not. As for admin, no. It is manipulated through dpm binary when using adb. http://adbcommand.com/adbshell/dpm – Firelord Apr 29 '21 at 14:44
  • @Firelord Wait you know how to grant/deny both? – android developer Apr 29 '21 at 14:51

0 Answers0