Show app badges based on their notifications

Learn how to make app badges appear or disappear based on what notifications exist

  1. joaomgcd
    With this profile, every time an app posts or removes a notification your homescreen will show a badge on the respective app.

    Here's how it'll look. Make sure to watch the Join icon in the middle of the screen:


    This will only work if your launcher supports badges. Check here for launchers that are known to support/not support badges.

    STEP 1 - INTERCEPT ALL CREATED AND DISMISSED NOTIFICATIONS


    • Create a new profile with the AutoNotification Intercept event condition
    • Choose to intercept all created and cancelled notifications, but only non-persistent ones
    (i) Persistent notifications are those that you cannot swipe away. I figured that the notification count should not include these types of notifications for it to make more sense.
    • Accept and create an entry Task for the profile


    STEP 2 - COUNT NOTIFICATIONS FOR THE APP


    • Add an AutoNotification Query action
    • Set it to only query notifications from the app with the package name %anpackage
    (i) %anpackage contains the package name for the intercepted notification when it's created or cancelled. A package names is like a unique identifier for an app.
    • Set it to only get non-persistent notifications
    • Go back to Tasker and add a Flash action with the text %anpackage - %anid(#)
    (i) %anid(#) will contain the number of queried notifications that the AutoNotification Query action returned.


    STEP 3 - SET BADGE


    • Add an AutoTools Badge action
    • Set the Badge Number field under Write Badges to %anid(#)
    • Set the App Packages field to %anpackage
    (i) This will set a badge on the app identified with the package name %anpackage with the number corresponding to how many notifications the app has up at the moment.