With Tasker more often than not you're doing stuff in the background. Wouldn't be nice if you could keep track of what Tasker's doing without interfering too much with your workflow?
With this project you'll be able to create a "pass-through" overlay (an overlay that allows you to click what's underneath it) that shows info about what's happening while Tasker is doing stuff!
This is how it'll look like in the end:
Notice how I can still do anything I want while it's showing , including clicking stuff beneath it?
STEP 1 - CREATE LOADING OVERLAY
- Create a task called Start Loading
- Add an AutoTools Web Screen action and select the Loading Dialog preset
- Set the Display Mode to No Input Overlay (so that you can click on whatever is behind the overlay)
- As the Background Color select black with about half transparency level
- In Window set
- Height to 100
- Gravity to Bottom
- Animation to Slide In From Bottom
- In Loading Type choose a type you like. I like Bounce
- NOT SHOWN IN VIDEO: Enable the Update option in the Screen Variables section so that the whole animation is not reloaded if it's already showing, but only the text on the page is refreshed
- Accept and run the task to check out the overlay!
- Click the Overlay notification to dismiss the overlay
STEP 2 - SET TEXT FROM PARAMETER
We want to be able to show this overlay from anywhere with any text we want, so let's make the text variable, depending on the input the Task receives when being called from other tasks. This value is stored in the %par1 variable
- Start by setting a default value for %par1 in case this task is called without the value: set %par1 to Now Loading... if it's not already set
- In the AutoTools Web Screen action set the Loading Text to %par1
- Run the task again to make sure that it shows the default text
STEP 3 - CREATE END LOADING TASK
Since we want to close this overlay from another task, let's give it a unique ID, so that we can then close it with the same ID.
- Edit the AutoTools Web Screen action and set the Overlay ID to loading
- Go back to Tasker and create a new task called End Loading
- Add an AutoTools Web Screen action, set the Display Mode to Close and the Close Overlay ID to loading (the same as we set the overlay ID to before)
- Exit Tasker to save
STEP Test loading - 4
To pretend we are doing some long background operation we're simply going to use a 5 second Wait action. We're going to show the loading overlay before the Wait and close it after.
If you now tun the task you'll see the overlay for 5 seconds and then it'll be closed!
- Create a new task called Test Loading
- Add a Perform Task action to call the Start Loading task and set Parameter 1 to Loading Stuff...
- Add a 5 second Wait action
- Add another Perform Task action to call the End Loading task
As shown in the initial video you can call the Start Loading task multiple times with different messages before closing it to mirror what's happening in the background. This way you'll never lose track!
Show a loading overlay while doing stuff in the background 2017-07-05
Sometimes you want to keep progress of what's happening in the background