Pop up message from some apps stay on screen and get in the way

  • Some apps either while in the app or when I leave the app put a pop up on the bottom of my Pixel 3 XL phone. This pop up times out after awhile but sometime gets in the way of typing. Does anyone know how to turn off this option?

    enter image description here

  • To turn off those toasts you need to find out the package name of the app that is causing that Toast to show up. One way to find it out is to setup /questions/tagged/adb and issue this command:

    adb shell 
    dumpsys appops --op TOAST_WINDOW | sed -n -e '/Uid/p' -e '/Package/p' -e '/TOAST_WINDOW/p' -e '/Access/,/Reject/p'

    Demo output from an Android 12 AVD image:

      Uid 1000:
        Package android:
          TOAST_WINDOW (default): 
        Package com.android.settings:
          TOAST_WINDOW (default): 
      Uid u0a135:
        Package com.android.systemui:
          TOAST_WINDOW (default): 
              Access: [pers-s] 2022-01-08 00:16:10.431 (-16m30s716ms) duration=+4s97ms

    You can filter the output further for only Access times. Note down or recall the approximate last time when you saw that toast on your screen. Then compare that with the datetime in the Access field for a given Package from the above output. For example, in the above output the package com.android.systemui had access time for TOAST_WINDOW permission at 00:16:10 (12:16 AM) which is approximately the time I could recall when I tested a Toast for this package. Since I could correlate the Access time here, I decided to issue the following command to stop that app from showing these Toasts ever again.

    adb shell appops set PKG_NAME TOAST_WINDOW deny

    Replace PKG_NAME with the the package name you noted in the above output against which you successfully compared Access time. In my case, the package name is com.android.systemui. In your case it might be something else.

    That's it. In future if you want to revert the changes, you can either uninstall and reinstall the app, or issue the following adb command:

    adb shell appops set PKG_NAME TOAST_WINDOW default

    An easy but temporary solution is to just force-stop the offending app. For that you need to find the app's name first. To do that, find its package name using my aforementioned solution. After that, use my answer https://android.stackexchange.com/a/198095/96277 to find the app name for the corresponding package name. After that, go into Settings app, find/search your app, and force stop it.

Log in to reply

Suggested Topics