Notifications with Tasker and Lightning Launcher
This Tutorial will show you how to setup a Notificationcounter for any Application with Tasker and Lightning Launcher.
Prerequisite: Start Tasker and select the 3 dots in the upper right corner.
Select Preferences. On the UI-Tap the Beginner Mode should be unchecked. On the MISC-Tap Allow External Access should be checked. In LL you must have activated Expert mode.
Now lets create the Tasks. In this example i will do the Tasks and other stuff for a MailApp. It can be done with any other App which have Notifications. (Missed Calls works different, because Tasker has a special routine for this. SMS is also different if you use StandardMessaging.)
First Task: New Notification (MAIL)
- Start Tasker and select the TASKS-Tap
- Tap the + at the lower right corner. Give the new Task a Name e.g. NewMail
- Tap the + at the bottom to add an action
- Select Variables
- Select Variable Add
- Enter in UPPERCASE a name after the % e.g. COUNTMAIL
- Hit Return key
- Tap again the + at the bottom to add the next action
- Select Plugin
- Select Lightning Launcher
- Select Lightning Variable
- Tap the Pen on the top
- Enter a name for the LL Variable e.g. LL_Mail
- Enter %COUNTMAIL as Value and tap ok
- Hit Return key
Should look now like this:
Hit Return
Second Task: Clear Notification (MAIL)
- Start Tasker and select the TASKS-Tap
- Tap the + at the lower right corner. Give the new Task a Name e.g. ClearMail
- Tap the + at the bottom to add an action
- Select Variables
- Select Variable Set
- Enter in UPPERCASE a name after the % e.g. COUNTMAIL and enter 0 (Zero) in the To line
- Hit Return key
- Tap again the + at the bottom to add the next action
- Select Plugin
- Select Lightning Launcher
- Select Lightning Variable
- Tap the Pen on the top
- Enter a name for the LL Variable e.g. LL_Mail
- Enter 0 (zero) or %COUNTMAIL as Value and tap ok
- Hit Return key
Should look like this:
Hit Return
Now we have the Tasks but now you have to define when it should happen.
For this you need a Profile
First Profile: New Notification (MAIL)
- Start Tasker and select the PROFILES-Tap
- Tap the + at the lower right corner and select Event
- Select UI
- Select Notification
- Tap the Rocket on thr right side
Select your e.g. MailApplication (or other when it is for another NotificationCounter) - Hit return key
- Select NewMail
When Tasker asks you to enable Notification Access so please do this
Second Profile: Clear Notification (MAIL)
This will reset Counter when Application starts.
- Start Tasker and select the PROFILES-Tap
- Tap the + at the lower right corner and select Application
- Select your e.g. MailApplication again (or other, see above) and hit return key
- Select ClearMail
Should look like this now:
Because LL will lost its Variables after reboot or loading Template (Tasker will not). We need a Task which will set the Variables form Tasker to LL.
Third Task: Reset LL-Variables
- Start Tasker and select the TASKS-Tap
- Tap the + at the lower right corner. Give the new Task a Name e.g. RESETLL
- Tap the + at the bottom to add an action
- Select Plugin
- Select Lightning Launcher
- Select Lightning Variable
- Tap the Pen on the top
- Enter a name for the LL Variable e.g. LL_Mail
- Enter the the Tasker Variable e.g. %COUNTMAIL as variable
- Hit Return key
- Do Steps 3 to 10 for each Counter/Variable
- Tap on the 9-Dots Icon on the lower right Corner
- Select Built-In Icon
- Select an Icon of your choice
Could look like this.
Leave Tasker
How to use this Variable in LL
- Long Tap on Desktop
- Select the + at the top of the menu
- Select Text
- Enter a label e.g. CountMail
- Long Tap on the new created Text
- Select the pen on the top of the menu
- Select Properties on next menu
- Scroll left/right to the Bindings Tap
- Select Add Bindings
- Tap the SELECT…
- Tap Text
- Select Label
- enter $LL_Mail and then tap ok
- Hit return Key
Hide the Counter when 0 or empty
- Long Tap on the new created Text
- Select the pen on the top of the menu
- Select Properties on next menu
- Scroll left/right to the Bindings Tap
- Select Add Bindings
- Tap the SELECT…
- Tap Item Properties
- Select Visibility
- enter
if ($LL_Mail<1) return 0;
else return 1;
and then tap ok
- Hit return Key
The Text should be hidden now.
At last we need to start the TaskerTask which will reset the Variables at Reboot or loading Template.
- Long Tap on Desktop
- Select Settings
- Select Desktop
- Select Events & actions
- Select Load
- Select Launch a Shurtcut
- Select Task Shortcut
- Select ResetLL
- Hit return key as often as you are back on desktop
- You’re Done
do you need to define the variables, or does that happen automatically? I tried to alter one of the tasker notifications you created with one of your themes. I used this guide. But do i need to create the variables? Or will tasker do that automatically? Do i need to delete the old variables?
hi jeremy. there is no need to create variables. tasker will create them after first use. same in Ll.
Nice tutorial. Thanks for taking the time to document it.
Hi,
I have copied this exactly step for step. But I can’t get it to work. Has anybody else managed to get this is work correctly?
I have also followed all the steps in this tutorial but stuck on the very last part.
How to Start the TaskerTask which will reset the Variables at Reboot or loading Template. ?
Any help gratefully appreciated.
Hi Bill,
are you using LL?
Which step (1-10) from “At last we need to start the TaskerTask which will reset the Variables at Reboot or loading Template” does not work?
to long ago, sorry
I’ve worked extensively on it and tried it from different angles and never did get it to work. Apparently I’m mis-reading it or something.
Hi Gerd,
currently I’m using your minimal theme “about”. It’s great for learning LL. Have this fully translated to german and using this with other apps, icons, etc. On Google play I miss the “Tiny white icons” in your package. Have been downloaded this seperatly for customizing the template.
I think it’s not recommended to make a link to special apps, for example the Cyaonogen-Mod Camera you use in this template. Better you make links only to android standard apps.
Yesterday I’ve read this tutorial and created my own tasks for this template. Works perfect. What must I do for the standard SMS app? It’s not included in your presets. Thanks for reply.
Hi Dirk,
you are right, sometimes i miss to add the links to stuff which i use in a template. sorry.
I develop my themes/templates on an Oneplus One which runs with Cyanogen. So i use the Apps which used there 😉
In LL it’s not very difficult to change this because LL tells you when an App is missing.
SMS and other Apps with Notifications can be setup like in this example.. Just use other variables and another app instead of email.
Gerd
Excellent work gerd. Using for a WhatsApp notification counter since there is no ll dynamic text for that one. Appreciate the tutorial.
You’re welcome Ryan 😉
Hi Gerd,
i just tried to work with LL and with tasker a bit also. I follow this example and I stuck also on the very end 🙂 When making variable in LL, eactually adding bindings, then i should select Text, but the menu i see doesnt contain. I can see only free position, grid position, item properties, title or Icon. may be i cannot find the right way because of translation. i tried to use my brain to guess in Item properties, but have just a piece of experience only. Can you push me a bit ?
Thanks
hi david.
did you activate expert mode?
if yes. it works exactly how i wrote.
may be you missed a point.
gerd
Hi gerd,
i did, it has to be something else 🙁
David
I got it, swithced the phone to the english and thats it…. Translate issue. I will try it afternoon to finish 🙂
Thanks a lot
Dear Gerd
thank you. Great job. I use floatify and sometimes I clear the notification from the lockscreen. In this case, of course, the counter is not adjusted. Is there a way to solve this? thank you so much
Hi, good questions. i don’t know yet. i have to check it.
I followed the instructions and after completion, I have a taskbar notification that there are no active tasker profiles. I’ve checked tasker and both of my initial profiles are active. I deactivated them, saved and reactivated them, but, still get the same message.
Any thoughts?