Create a persistent notification with a dismiss button

Learn how you can create a notification that won't be dismissed easily but can dismissed manually

  1. joaomgcd
    Sometimes you have an important notification that you don't want to be dismissed with other notifications when you clear all notifications, but you still want to get rid of it at some point.

    This is how this will look like in the end:


    STEP 1 - CREATE PERSISTENT NOTIFICATION WITH DISMISS BUTTON


    Create a Task in Tasker to create a persistent notification with AutoNotification with a certain ID (testid in the example) and then add a button to it with the dismissan=:=testid command.


    STEP 2 - PROFILE TO DISMISS NOTIFICATION


    Create a profile with the AutoApps Command condition, set the command filter to dismissan=:= and the Variable Names to anid, then in the task use the AutoNotification Cancel action with %anid to cancel the notification with that ID.


    STEP 3 - TEST


    As you can see you can't swipe away the notification, but if you hit the Dismiss button it'll go away :cool: