AndroidApps

Using overlay scenes in Tasker to augment the UI of an app

As explained in part 3 of the Tasker guide, the Overlay scene display method is great for adding overlaying scenes to apps. I haven’t really had a use for adding anything extra to any apps before, but I have now. As part of a new setup I’m working on, I needed a way to add a Tasker variable input system to my existing alarm clock app.

The concept is actually fairly simple: You make a scene of the appropriate size, and then specify an Overlay display type in the Show Scene action that displays it. Then you use the position controls in the same action to position the scene where you need it. This action goes into a task that’s tied to an application context for the app you want to “augment.” It should also have an exit task to destroy the scene when the app closes.

Now, the difficult part is making it look as good as possible. The image you see below shows the app as it’s supposed to look (left) and the way it looks with my scene displayed (right).

tasker overlay scene - for some reason we don't have an alt tag here

As you can see, the scene matches its surroundings so well that it’s practically impossible to see that it doesn’t belong. Making that happen was however not that easy. I started off by making an image file with the silver/gray banner that covers the bottom of the alarm app, in Photoshop. I also measured the exact height the scene would need to be in pixels, exported the scene, edited the XML file with the same height, and re-imported it. This to get a more accurate size than the drag and drop tool in Tasker can do. With the proper scene size in place, I made the background transparent, and put the banner image as the bottom layer of the scene, filing the entire thing. Then I added all the normal scene elements on top.

sunlight scene edit - for some reason we don't have an alt tag here

With that scene displayed in the right place, the app now looks normal when the scene is displayed. A video showing it in action can be seen below. You’ll notice a bit of delay when the scene shows up and disappears, which you just have to live with.

This is a great way to augment your existing apps, and using an application context with proper enter and exit tasks allows you to not have to think about the scene – it comes and goes as needed. As for what this mystery scene is for, that’s a story for another day…

Pocketables does not accept targeted advertising, phony guest posts, paid reviews, etc. Help us keep this way with support on Patreon!
Become a patron at Patreon!

Andreas Ødegård

Andreas Ødegård is more interested in aftermarket (and user created) software and hardware than chasing the latest gadgets. His day job as a teacher keeps him interested in education tech and takes up most of his time.

Avatar of Andreas Ødegård