Fun times with Smarter Tasker NavBar actions

Tasker 5.7 is out! All of you who subscribe to the beta channel got to test the beta features early, but now we all can play with one of the latest addition: Tasker NavBar action. The Joao’s video is impressive, so I decided to take a little more time and show you in details about how things are done! I used this action before in my USB File Transfer project. As usual, I will add my own spin to Tasker NavBar actions.

What are Tasker NavBar actions?

You can now customize the buttons that appear in the NavBar directly with Tasker. This modification had been possible before, but it was never so easy. Thanks to Tasker NavBar action you can change the buttons, layouts and associated function depending on the context.

Tasker NavBar actions can be linked to a default android action (back, home, recent, etc…), a keyboard button (Enter, F1, Backspace, etc…), left unbound or linked with a custom Tasker’s task. In addition to that, you can pick the icon (icon with have a white overlay applied) and it’s density using the scale factor [1.0 – default].

How many buttons you could have in your NavBar? Joao’s says “many” so the limit is the actual size of your NavBar and the icon’s density.

Let’s take advantage of that and create the following:

I will lean on the tutorials (where applicable) I wrote before so some of these actions might need you to refer back to a previous tutorial to fully understand the concept.

I will also break this tutorial into parts, as the complete project has over 20 tasks and there is no way I can make it interesting and easy to understand. On top of that, each NavBat action cooperates with others, so I have creat 2 working versions. An independent one, and the one that interacts with your NavBar context!

Cast to “active” computer

In one of my previous tutorials, I used EvenGhost to let Tasker know, which computer is currently active. This information changes dynamically, so as soon as I switch computers, Tasker can send the information to the right device instead of spamming all of them. I will use the base of this, to not only create a custom action and send the information to an active PC but to also display an Icon of the active PC in the NavBar. This way, you know exactly where the information is going thanks to the visual input.

Facebook on %ActivePC

When Facebook is open, an icon will appear on the screen to cast your Facebook session to an active PC. The active PC is the last computer you used based on the system wake events. To detect this, you will have to share this information using EventGhost.

  • Open Facebook active PC
  • Display and update the icon of the active PC
  • Show only when Facebook is active

Unlike my original tutorial, the activator comes with the icon in the NavBar which I can change, should the active PC changed. So I added the routine that will change the target PC as soon as you wake the other system. Since I’m using system.idle messages, there is a 1-minute timeout. If you change the computer and return to the same PC within 1 minute, the change won’t be acknowledged.

(Link to the tutorial)

WhatsApp on %ActivePC

Instead of repeating the same profile twice, I put another spin on the WhatsApp app. You can use the WhatsApp web interface but requires a login. I’m going to automate this task in the following way.

  • Open WhatsApp Web on active PC
  • Display and update the icon of the active PC
  • Show only when WhatsApp is active
  • Double Tap to login in incognito mode
  • Automatic QR scanning

To use WhatsApp web you have to scan the QR code. The information about your login is retained if not used in the incognito mode. If you have EventGhost, you can open WhatsApp Web in the incognito mode. Since incognito mode doesn’t hold session info, QR scan is needed each time you want to use it. I will assign this to the double tap to automate the process.

(link to tutorial)

Use NFC to get a custom light controls

While there is no easy way to track your indoor location just yet (the new Bluetooth standard will come soon with “inch alike” 3D position accuracy) I can use NFC tags directly in Tasker to set custom controls. In the tutorial, I will show you how to create controls for lights.

  • Display custom light controller triggered by NFC
  • Ability to change the rooms
  • Control 2 light sources with HTTP API
  • Display lights status independently in the NavBar

I’m controlling 2 smart sockets to trigger the lights. You can read more about these here and here. These will cover how I got the REST API and how to use and flash ESP based chips in your smart sockets. Note these do not require NodeRED to be used with Tasker. I would strongly recommend it. If you want to get started with NodeRED – check this tutorial for beginners.

End of day alarm option (timed events)

We all have the end of day routines. Brushing teeth, taking a shower, kissing your kids’ goodnight etc. Some of us not working Monday to Friday, or work in less predictable patterns. This profile will:

  • Use TIME context to show an additional icon to set the alarm
  • The context can be “smarted up” by various location variables

It’s a simple, but very effective use of the NavBar actions in Tasker. Rember the times when Google Assistant would suggest things that you should do based on multiple contexts? This is a non-invasive version of it.

Better clipboard manager

Previously, I created a clipboard manager which was activated via slide gesture. I think having the trigger visible in the navbar on clipboard change would be a much more elegant solution.

  • NavBar is activated by clipboard change
  • NavBar is timed and is available for 15 sec
  • Clipboard supports unlimited entries, but it’s limited to 10 by me

I like this trigger better. I can have it as a NavBarAction in Tasker on any screen and since it is going away after a set amount of time, I don’t find it annoying.

Set USB “File Transfer” automatically

I have covered this before, so you can read all about it here. I wanted to include this NavBar action in my project and incorporate the NavBar action with others.

  • select the “file transfer” option automatically on connection
  • return to previous NavBar action

The full tutorial for this action is available here.

While creating this tutorial, I planned to simply run all tasks individually, but I quickly discovered an opportunity to link it all together. After all, it would be nice if our light controller wouldn’t be overridden each time you open Facebook.

I created a slightly elaborate system of exclusions which in essence return to the most important active NavBar action in Tasker or returns the default one if there are no active NavBars.

Conclusion

Because of the “wrapper”, this tutorial will come in parts. Each part will contain a separate profile for you to use. Should you want to use all of them at once, you will also need the last profile as well as modified profiles for each NavBar action in Tasker. As you can imagine this is not a tutorial for a single article, as for now I counted over 20 tasks in Tasker and I’m not 100% finished.

If you like my work you can always buy me a coffee or support me via Patreon.

Liked it? Take a second to support Pocketables on Patreon!

Mat Zolnierczyk

I am passionate about technology, cycling, and art. This would explain why my bike has more computing power than your average office. I own notenoughtech.com and I write for xda-developers.com and pocketables.com NotEnoughTECH | Facebook | Twitter |YouTube |Instagram | Google+ |Donate |Patreon