[Tasker Tips & Tricks] ShebeerPrince:
Table of Contents

Preface

Requirements

Difficulty

How it works!

Uses

Autorun

Demo, screenshots, TaskerNet & project backup

Tips

Why not those easy to use apps from PlayStore?

End note.

1.

Preface

​

Before getting my hands on Pixel 6, I was using a Samsung Galaxy S8 running on an Android 10 custom ROM. Samsung provides an advanced, and very useful app called Good Lock, in which the "One Hand Operation +" feature helps us to set up upto freaking 36 number of swipe gesture shortcuts, from the left and right (top, center and bottom) sides of the screen, irrespective of which screen or app is currently active on the screen.

The only thing that I was sure about missing in Pixel 6 was this swipe gestures. That's why I did my research even before receiving my Pixel. Now I've successfully implemented a replica of the Samsung's swipe gesture into my Google Pixel.

These gestures makes it very easy to use this big and heavy smartphone.

This gesture setup made it easy for me to pull up my Control Panel created in Tasker, whenever I need, irrespective of which app or screen I'm in.

2.

Requirements

​

Tasker​

Tasker terms to understand (Only for those who are new to Tasker)​

TASK : An action or set of actions which will be later run by Tasker by itself, when defined conditions are met. Can also be run manually via the Tasker app.​

Examples

: Launch an app, change ringer volume, toggle WiFI, disable auto rotation etc.​

PROJECT : An individual Tasker set up, where we define the conditions to meet, and the tasks to be performed when the defined conditions are met.​

Example 1

: A profile which automatically enables the auto-rotation (task), when YouTube is opened (condition), and disables auto-rotation when you leave YouTube.​

Example 2

: A profile which automatically enables mobile data (task), when your device is connected to your car WiFi (condition) or Android Auto.​

SCENE : A visible, or invisible shape which will be displayed on the screen, and can be configured to respond to a swipe, tap or long tap on it, and then accordingly perform a pre-defined task. A scene can only be enabled (show) and disabled (destroy) through a task or a project.​

Example 1

: A visible button that can be displayed on the screen, or an invisible location on the screen, which disables WiFi when we long tap on it.​

Example 2

: A visible button that can be displayed on the screen, or an invisible location on the screen, which opens recent apps list when we swipe on it.​

"If" variables to be used in scenes for assigning shortcuts, to each combination of a swipe length and a swipe direction:​

%stroke_len : Defines the length of the swipe in pixels.​

%stroke_dir : Defines the direction of the swipe. (Read How It Works! section)​

Actions that can be performed on a scene:​

Tap: A single touch ON the scene.​

Long tap: Single touch & holding, ON the scene.​

Stroke: A regular swipe started FROM the scene, and ended anywhere on the screen.​

Don't get confused, there are NO different swipe types like long swipe, or short swipe in Tasker by default. For this project, we can mention a swipe with %stroke_len more than a user specified number as a long swipe, and a swipe shorter than that as a short swipe.​

3.

Difficulty

​

You only need to know the basics of Tasker app and scenes. If you are okay with creating, editing, showing and destroying scenes, then it's just a cakewalk.

You just need to create scenes wherever you want, then inside the tap, or long tap, or stroke tabs of your scene, add the if statements with any one of %stroke_len > or %stroke_len <, AND, %stroke_dir ~ as two conditions, and then your desired set of actions inside each if statement, between If and EndIf. (Refer Demo, Screenshots & Project Backup section)

If you are not comfortable with creating, editing, showing and destroying scenes, it will take maximum 1-2 hours to understand the same.

It is time consuming, only during the initial setup from the scratch.

After that, it is editing or adding conditions and shortcuts, again, it's just a cakewalk.

4.

How it works!

​

Using the scenes inside Tasker, we are setting up three different areas on the screen, which are, top (horizontal), left and right (vertical). Inside each scene, we can make small multiple shapes, where we can add different tasks to each portion, when we do a swipe, tap or long tap on it.

When it comes to swipe, we can define the swipe length (using %stroke_len) and the swipe direction (using %stroke_dir), where we can assign different tasks to each conditions, which are made with a pair of a swipe length and a swipe direction.

What is more interesting is that the swipe directions can be any of vertical or horizontal directions like Up, Down, Left, or Right, and also diagonal directions like UpLeft, UpRight, DownLeft and DownRight. (But try not to use vertical and diagonal directions together at a single location, as it might bring conflicts and may end up giving you wrong response because of failing to read your swipe correctly).

These gestures are NOT restricted to homescreen, but works irrespective of which screen or app is currently active on the screen (Exception: To make scenes work in Settings app, you need to Allow Screen Overlays in Settings through developer options).

5.

Uses

​

For instance, a task (set of actions) can be assigned into a swipe gesture like short swipe to UpLeft direction, and another task to another swipe long swipe to UpRight direction, etc.

Examples:

Short swipe from left center edge in UpRight direction, opens YouTube.​

Short swipe from right center edge in DownLeft direction, jump to last app.​

Long tap on the top middle (1st scene) of the screen, toggles WiFi.​

Long tap on the top middle (2nd scene) of the screen, toggles mobile data.​

Long swipe from right top edge in Up direction, takes a screenshot.​

Long swipe from right bottom edge in Down direction, kill foreground app.​

6.

Autorun

​

You can assign the same task (which is set up to show the scene), to a new profile which gets triggered on the device boot. This will make these swipe gestures enable automatically few seconds (or so) after booting your smartphone.

However, you can always open the task inside Tasker app, and click on the play button (⏵) to run the task manually, which will show the scene (or enable the swipe gestures).

Since I'm using Nova Launcher, I also added the same task to a Nova's homescreen gesture, so that I can easily restart this swipe gesture from homescreen itself, whenever required, or just after editing the scene via Tasker.

This is very helpful

because whenever we edit a scene via Tasker, the scene will get automatically destroyed. So every time you modify a scene, we have to manually re-enable it.

7.

Demo, screenshots, TaskerNet & project backup

​

Demo

:

Google Pixel

: In this screenshot, I have mentioned all of the possibilities we have for the Pixel 6, which doesn't get into conflict with the existing system gestures provided by Google.

Others

: I suggest using these kind of directions in other android devices which doesn't have native gestures like left swipe from the right edge, and right swipe from the left side edge.

Screenshots

: This is the screen where we edit or add set of tasks to be performed, using if statements with conditions %stroke_len > (or %stroke_len <), AND %stroke_dir ~.

TaskerNet

: Projects for Pixel 6 and Galaxy S8.

Project Backup

: To start with setting up this project, if you want, you can also refer to these regularly updated backup of my setup where I included all the scenes, required task to activate the scene, and the project to autorun this setup on device boot. The folder includes files for both Galaxy S8 and Google Pixel 6. (You can refer here for assistance on how to import task and scene into your Tasker)

8.

Tips

​

If your device (like Google Pixel) already got a native swipe gesture like left swipe from the right screen edge, and right swipe from the left screen side edge, you should not create a similar gesture via Tasker, which will conflict with your existing system gestures.​

Swipe direction Down from a top horizontal scene might also end up in issues since most of the Android devices natively use the same gesture to pull down notification panel.​

Try not to use vertical directions and diagonal directions together. For example, in right side, don't use Up or Down series AND UpLeft, DownLeft series together. Both these series at a single location might bring conflicts and it may end up giving you wrong response because of failing to read your swipe correctly.​

Try not to avoid using tap. Instead, use long tap, to avoid accidental touches.​

Always keep the size of the scenes thin, because these scene are blocking scenes which makes area behind it untouchable. So anything below the scene is, impossible to touch. (Refer tip number 8 along with this)​

Always re-activate (show) the scene after making any changes, because making changes disables (destroy) the scene.​

Assign the (scene enabling) task to any swipe gestures of your launcher (if any) to make restarting the gesture easy. However, you can always open the task inside Tasker app, and click on the play button (⏵) to run the task manually.

This is a workaround to make these blocking scenes hide temporarily so that we can touch whatever was behind the scene. (Thanks to user ActivateGuacamole for this idea)

Few other valuable tips for choosing the right swipe length for tasks considering their frequency of usage. (Thanks to user ActivateGuacamole for this idea)

9. Why not those easy to use apps from PlayStore?

Because Tasker is powerful. Period.

I have tried few popular gesture setting apps but I always came back to Tasker itself because of the level of control, and customization we have here. Tasker can do impressive automations, which can also be implemented into this swipe gestures, something that can't be achieved with other easy to use and ready-made gesture apps.

With this method, I can add a set of actions (not just one single action), one by one, to be performed, into one single gesture. So if I wanted to do a swipe on the screen, and then another direction swipe, and then a click on a specific area, all these automatically, I can easily do with Tasker.

Examples:

Kill and remove foreground app from recent: You can watch this screen record video which shows my simple swipe gesture running the task where Tasker automates actions (a) open recent apps list, (b) a swipe action to swipe away the app, and (c) another swipe action to go to home screen. All this within a fraction of second. Impressive. isn't it?

Clear all recent apps: In Pixel 6, clear all button is placed at the end of the list. But watch this one, a simple gesture is enough. Tasker will take care of the rest. Again, Impressive. Isn't it?

For implementing such complicated automations, advanced settings and toggling, into a swipe gesture, Tasker is the best solution.

10.

End note.

​

It took days of questions, answers, trail and errors to first understand, and then to make this thing work flawless. Me and my couple of friends really find this useful in our smartphones, so I decided to share it with you also. If you find this useful for you, go ahead. And if you think this is not worth the time and effort required, you can kindly ignore.

I, a noob, wouldn't have made this possible without receiving a help from another person. So, a big thanks to u/adbenj for the initial guide and idea.

.

UPDATE 1:

Added TaskerNet in section "7. Demo, screenshots, TaskerNet & project backup".