You'll need four apps: Tasker
, Secure Settings
, NFC Trigger
and its companion tag-reuse plugin
.The installation order matters!
Install and open Tasker first.
Open Tasker and go to settings. Check the box for Allow External Access. This will let NFC Trigger tell Tasker to start a task.
Create a new task (I called mine Unlock). Click the plus (+) to add a new action then select plugin. Choose Secure Settings then Dev Admin Actions then Password/Pin. Check the box next to Device Admin Enabled and enter a password to unlock your phone. Tap the save icon at the top of the screen. Tap the Tasker logo to go back to the Task Edit screen.
Add two more actions: the first is very similar to above, but in Secure Settings select Actions -> Keyguard - Off.
The third action sets a user-defined variable in Tasker, named NeedsLock, to 1 (check the box labeled use maths).
Create a new task that re-secures your phone (I called mine Reengage). Make an IF statement that checks if NeedsLock is 1 (using maths), then inside the IF statement add three actions that reverse the actions of the Unlock task (re-enable keyguard, set password, set NeedsLock to 0).
Your Tasks screen should look like above, with two tasks!
Make a new Profile that activates the Reengage task whenever the display turns off. Now that Tasker is configured, it's time to set up the NFC Trigger app.
Create a new trigger and select NFC, then tap Next.
On the next screen create a new action, and scroll down to select Tasker -> Tasker Task. Then tap Next.
Tap the magnifying glass icon to be provided with a list of Tasker tasks to choose from. Choose Unlock (or whatever you named your login task), and tap Add to Task.
If no tasks appear in the list, it means you installed/opened NFC Trigger before configuring Tasker to allow outside access, so you'll need to uninstall and reinstall NFC Trigger.
Give your task a name-- this name appears as a notification when the task is triggered, so I called mine "Authenticating ring." Tap Next.
NFC Trigger will ask you to scan your desired tag. If it scans but displays an error, you may have forgotten to install the Tag Reuse plugin app for NFC Trigger-- no biggie, just grab it from Google Play and try again.
The above message will display, then tap Done.
Repeat to create an NFC Trigger task for each tag you want to unlock your phone-- I added an "Authenticating manicure" task and attributed it to my nail polish tag.
Now try it out! Lock your phone's screen, then press the power button to wake it up. The password screen should appear, and when you bring the tag against the phone, it should unlock! Enjoy your new mod and show it off to your friends!
This guide was first published on May 14, 2014. It was last
updated on Nov 16, 2018.
This page (NFC + Tasker Automation) was last updated on May 04, 2015.