Do Something When Third Party Notification Text Changes

Trigger any Tasker action when a notification's text changes

  1. joaomgcd
    Learn how to make something happen when a text in a notification changes.

    In this example I'll do a simply Flash action but you can do whatever you want :)

    STEP 1 - CREATE PROFILE TO INTERCEPT NOTIFICATION


    • Create a new Profile in Tasker
    • Use the AutoNotification Intercept event condition
    • Set it to only intercept created notifications
    • Choose the app you want to intercept. In this case I'm going to intercept Google Play Music's notifications
    • Accept these settings and create the task


    STEP 2 - CHECK IF TEXT CHANGED


    • In the task add a new If action
    • set the condition to check if %antext doesn't match %LastText
    (i) %antext is a variable that represents the intercepted notification's text. %LastText is a variable that will contain the last text that was intercepted. We will set its value in the next step


    STEP 3 - DO SOMETHING AND SET LAST TEXT


    • Add any action you want inside the If block. In this case I used a simple Flash action
    • After your actions add a Variable Set action where you set %LastText to %antext
    (i) This will make the %LastText variable contain whatever was in %antext so that the next time this task runs it will check the new intercepted text agains this value and run the actions if it's different
    • Close the If with an End If action


    STEP 4 - TEST


    • Back out of Tasker so that this profile is saved
    • Open Google Play Music
    • Play a remix of a song. This will most likely make subsequent songs have different artists which is what the notification's text will contain
    • Now you'll see that when the playing artist changes, you'll get a flash showing the new Artist that's playing :cool: