How to suppress system UI toasts?

469 views
Skip to first unread message

tskrusr

unread,
Sep 8, 2022, 1:22:54 AM9/8/22
to Tasker

I created a toast intercept profile with AutoNotification to intercept toasts for the text: "Wireless charging paused."

I can confirm that the toast is being intercepted by AutoNotification by using a beep for the task.

Using an AutoNotification cancel task with the same text that I used in the toast intercept profile does not prevent the intercepted toast from being displayed. 

Neither can I block them using the block action.

I believe the toasts are being produced by the System UI component.

Samsung S21 Android 12

Any thoughts?

João Dias

unread,
Sep 26, 2022, 9:03:29 AM9/26/22
to tas...@googlegroups.com
Hi. Unfortunately there's no way to do that other than simply blocking notifications for the app that posts those toasts but I don't think that's possible for the system toasts, sorry :(

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


tskrusr

unread,
Sep 28, 2022, 12:28:20 PM9/28/22
to Tasker
Thanks for the response!

This is how I solved the problem of selectively suppressing (Samsung S21 OneUI) the System UI toast "Wireless Charging Paused," while passing through all other toasts from System UI, for future reference:

Any way to suppress constant "wireless charging paused" toasts?  tasker (reddit.com)

TL;DR:   The solution was a little indirect, but it works.  (1) Block display of all System UI toasts using ADB command; (2) Use AutoNotification to intercept the blocked System UI toasts since Tasker can still see them even though they are no longer being displayed on the screen; and (3) display them on the screen using AutoTools if they do not match "Wireless Charing Paused." 

João Dias

unread,
Sep 29, 2022, 4:02:39 AM9/29/22
to tas...@googlegroups.com
Nice! :) Great solution, thanks for sharing!

Soudane GMTA

unread,
Jan 20, 2023, 3:57:04 PM1/20/23
to Tasker
I've been looking for a way to selectively suppress toasts, and I just saw this message.

What is the ADB command mentioned in Step (1) for blocking the display of all System UI toasts?

Thank you very much.

tskrusr

unread,
Jan 20, 2023, 4:19:00 PM1/20/23
to Tasker
Maybe try:

appops set com.android.systemui TOAST_WINDOW deny

Soudane GMTA

unread,
Jan 20, 2023, 4:25:52 PM1/20/23
to Tasker
On Friday, January 20, 2023 at 4:19:00 PM UTC-5 tskrusr wrote:
Maybe try:

appops set com.android.systemui TOAST_WINDOW deny



Yes, that works! Thank you very much.
 

Soudane GMTA

unread,
Jan 20, 2023, 4:33:13 PM1/20/23
to Tasker
A related question:  in order for AutoNotification to respond to toasts, Accessibility->AutoNotification Toast Intercept needs to be enabled. I can manually enable it, but it doesn't remain set.

Is there a way to keep Accessibility->AutoNotification Toast Intercept turned on, or to perhaps detect when it gets turned off and then re-enable it?

Soudane GMTA

unread,
Jan 20, 2023, 5:23:01 PM1/20/23
to Tasker
Oh, I found it:

Tasker Preferences->MONITOR->KEEP ACCESSIBILITY RUNNING and select the AutoNotification - AutoNotification Toast Intercept
checkbox.
Reply all
Reply to author
Forward
0 new messages