Fingerprint readers are pretty much useless in the default state. You can unlock the phone, or authorize a purchase, but other than this the usage of this extra hardware is limited. It always felt to me like a missed opportunity -until now!
Meet the content aware Tasker fingerprint reader
This very simple project will assign multiple functionalities to theTasker fingerprint reader profile depending on what you are doing or where you are. In this example, I will show you how instantly cast the current website to the big screen (PC). This way you will be able to add additional functions to the reader depending on windows opened, or your location. Imagination is your limit.
How does it work
Bear in mind that Fingerprint scanner tools app is new and under active development. The Tasker support is limited, however, this is OK. We are going to use Tasker fingerprint reader project to assign more than one profile to the fingerprint scanner. When the fingerprint is activated, Tasker will check what else you have been doing (or where you are) and will execute the correct profile accordingly. If your fingerprint scanner is in front of the device, consider using a swipe action instead, to share your URL. I had some feedback so far with mixed results regarding the front fingerprint reader that doubles as a home button.
We need to get the reader to act as a universal trigger for our conditions. We will need a task Scanned finger that will trigger other profiles for us. We can link this to a variable %FingerScanned. The profile will change the value of this variable from 0 to 1 for 2 seconds. This should be sufficient for Tasker to notice the change, and respond to it. If you have any issues with Tasker responding tho the variable change, try increasing the wait action to 3 sec. Open the Fingerprint scanner tools and assign this task.
Cast the current Chrome window
When the chrome is opened and the variable %FingerScanned changes to 1, our profile will share the current URL via Join to a device of our choice. You can prompt a device selection if you wish, but for super fast sharing, I designated a single device for doing so.
I’m using the Autoinput UI Query to get the value of the URL in the browser. In most of the cases, the web address will start with www or http(s) and the combination of thereof.
To capture the URL we will need a regex:
If you have any issues configuring the Query – use Variable Setup to return to the Chrome and select the address bar. This will set up the URL capture automatically. I have also set up a custom variable %address which will contain the address from the chrome tab.
Before we can push the page to the computer, we need to check the URL. Sending a push URL starting with www won’t open the website automatically. The easiest way to make sure we are sending correctly formatted URL is to run search/replace action. The default value for the %prefix variable will be http:// . We need this if a website does not support https protocol. We are looking for either http or https in the URL, and if %prefix is found it is set in the Join URL push. Look for https:// and select replace. Do not enter anything in the replace with field as we just want this to be removed from our address do the same for the http://.
Join dev Joao Dias promised a fix in the next join update so A2-A4 actions may no longer be needed. Indeed this is fixed as of 22/Nov/2016
The last action is the Join Push. Go to the URL and enter %address . This way the URL will be pushed correctly to the PC and will open the website automatically.
As you can see, this way we can assign multiple actions to our reader despite imposed limitations. I have reached out to the dev Daniel Huber, and more Tasker functionality is planned. Now that you know how to use the fingerprint reader without bonding it with a single task permanently, nothing should stop you adding extra actions to other apps.
Perhaps, casting a YouTube video with a single tap (no chromecast needed) should be the next tutorial? Let me know what do you think about Tasker fingerprint reader project and how you going to use the reader in your profiles.
Profile: Cast Chrome Application: Chrome State: Variable Value [ %FingerScanned eq 1 ] Enter: Chrome A1: AutoInput UI Query [ Configuration:Only Visible: true Only Clickable: false App Package: com.android.chrome Check Screen State: false Text: ((?<=http:\/\/|https:\/\/|https:\/\/www.|http:\/\/www.|www.))?.* Regex: true Variables: address Timeout (Seconds):20 ]
A2: Variable Set [ Name:%prefix To:http:// Do Maths:Off Append:Off ] A3: Variable Search Replace [ Variable:%address Search:https:// Ignore Case:On Multi-Line:Off One Match Only:On Store Matches In:%prefix Replace Matches:On Replace With: ] A4: Variable Search Replace [ Variable:%address Search:http:// Ignore Case:On Multi-Line:Off One Match Only:On Store Matches In:%prefix Replace Matches:On Replace With: ]A5: Join Send Push [ Configuration:Device: [email protected] Url: %prefix%address Timeout (Seconds):60 ]
Scanned Finger A1: Variable Set [ Name:%FingerScanned To:1 Do Maths:Off Append:Off ] A2: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ] A3: Variable Set [ Name:%FingerScanned To:0 Do Maths:Off Append:Off ]
You will need:
Android ver: 6+ (Used 7.0),
Apps: Join (or AutoRemote), Fingerprint scanner tools (Tasker support need to be unlocked)
Needs: Fingerprint Reader
You can download the project file from here.