Jump to content


Sponsored Links

Recent Columns

  • James Norton's Photo
    The James Norton Column: MoDaCo reviews and battery tests

    The James Norton column

  • James Norton's Photo
    The James Norton Column: Camera Shoot-out

    The James Norton column

  • James Norton's Photo
    The James Norton Column: The MoDaCo Man

    The James Norton column


Recent Articles

  • icon
    MMW 89 - Does it spring?

    PaulOBrien -

  • icon
    MMW 88 - So much to discuss

    PaulOBrien -

  • icon
    Motorola Moto G 2nd Gen Review

    Mark Dearlove -

  • icon
    MMW 87 - Sweeter than an apple pie

    PaulOBrien -

  • icon
    Is the 2014 Moto X a true contender for the top spot?

    James Norton -

  • icon
    Ask MoDaCo: The Vodafone Smart Tab 4G

    PaulOBrien -


Recent Article Comments

  • Ricey155's Photo
    Nexus 9 Review

    Ricey155 -

  • 8eaker's Photo
    MMW 90 - L's bells!

    8eaker -

  • Dave UK's Photo
    LG G Watch R Review

    Dave UK -

  • Voxpop2011's Photo
    Motorola Moto G 2nd Gen Review

    Voxpop2011 -

  • PaulOBrien's Photo
    MMW 89 - Does it spring?

    PaulOBrien -

  • PaulOBrien's Photo
    MMW 88 - So much to discuss

    PaulOBrien -


Sponsored Links

Recent Topics

  • NothingSerious's Photo
    Nightly Kernel 3.4 (Based 100% on Mourta's, updated 11/25)

    NothingSerious -

  • Karsakoff's Photo
    Next Launcher Skin CrystalCyan

    Karsakoff -

  • ajdee2's Photo
    Can i onlock bootloader Huawei G740-L00

    ajdee2 -

  • Echo XD's Photo
    Porting Y300 Roms to My Device

    Echo XD -

  • MIERZVINSKI's Photo
    Any working APKtool for windows ?

    MIERZVINSKI -

  • Kowuku's Photo
    Problems witch OC

    Kowuku -


Recent Replies

  • korekore1's Photo
    3g on both sim slots

    korekore1 -

  • hecatae's Photo
    [DEV][ROM][5.11.] CAF Firefox OS - B2G for ZTE Open C / Kis 3

    hecatae -

  • hecatae's Photo
    Anyone else upgraded to Lollipop?

    hecatae -

  • luca020400's Photo
    [ROM] [ALL] [KK] Mahdi Rom 2.9 Final

    luca020400 -

  • Arpione's Photo
    [ROM] [4.4.2] Emotion UI 2.3 & 3.0 (Huawei UI)

    Arpione -

  • H3ROS's Photo
    [ROM][4.1.1][B209] AOSP MOD [11/11/2014]

    H3ROS -


Sponsored Links



- - - - -

Mastering Tasker - 4: PIN locking via Bluetooth Smart proximity


Welcome to part 4 of our feature, 'Mastering Tasker'. In this series of articles, we'll take you through getting the most out of the powerful, versatile but also scary-to-newcomers Tasker application. In this part - PIN locking via Bluetooth Smart proximity.

What today's article covers

Today we're going to talk about PIN locking your device using proximity to a Bluetooth Smart device. Keeping your device secure is very important so using a lock method such as a PIN lock really is vital. The thing is though, I personally find entering a PIN a right pain so i'd rather not do it. The solution I use is to have the PIN disabled automatically when the phone is near my FitBit (which I always have in my pocket) and enabled if that ever goes away (for example if someone has snatched my phone). It's actually a double win as if my phone pops up with a PIN box it reminds me i've left my FitBit behind. :)

Downloading 3rd party plugins

To start today we need to download the third party plugin we're going to use. To have a browse around the Play Store at which plugins are available you can obviously search for 'tasker plugin', but you can also search for 'locale plugin'. Locale is a similar context-based-functionality application to Tasker (it was actually around before Tasker) and Tasker can use its plugins... giving you even more choice! :)

For this guide i'm going to use a plugin called 'Secure Settings' - downloadable from the Play Store for free (with a premium option available).

Ready? Then let's go!

Finding the MAC address of your Bluetooth device

First of all you need to decide which device you are going to use to toggle your device lock. As mentioned above, I use a FitBit but that's not the only option. A Bluetooth Smart device of some description makes sense due to battery life and the ease with which you can chuck it in your pocket, but there a lots of them available - the HTC Fetch, Nokia Treasure Tag, the forthcoming iFind from Kickstarter... they should all work!

All Bluetooth devices have a unique MAC address (like regular network devices), and you need to find this as it's this that will be used to identify your Bluetooth device. The easiest way to do this is to download an application called Bluetooth Scanner from the Play Store.

Enable Bluetooth on your device, ensure your Bluetooth device is nearby and run the app. You'll be presented with a screen similar to this:


Here you can see it has found my FitBit One. Identify your device and take a note of the MAC address. You can exit the app now, we're done here.

Using the Bluetooth Near context

Now run Tasker and hit the big '+' button down in the bottom right to add a new profile. Click the 'State' button, followed by the 'Net' button followed by 'BT Near'. As we are using a State, this means that the profile will be continually active while the state is true, firing a task on entry and also a task on exit if defined.


There are a lot of options in the next screen, but we don't need to worry about most of them. All we need to do here is enter the MAC address we wrote down earlier (DD:90:2D:14:EF:99 in my example) in the 'Address box' and tick the 'Low-Energy (LE) Devices' and 'Unpaired Devices' boxes. Once you've done that, hit the Tasker icon at the top to go back. You'll see your new Profile in the list and you'll be prompted to hit the 'New Task' button. Do so!


Add the entry and exit tasks

You'll be prompted to optionally enter a name for your task at this point, you can enter one if you like, I don't generally bother - I just press the tick. ;) You are defining your Entry task at this point - i.e. what happens when your Bluetooth device is detected.

You'll now be at the Task Edit screen with an empty action list. In here you want to define the disabling of your device lock. Hit the + icon down the bottom, select 'Plugin' followed by 'Secure Settings'. For 3rd party plugins, the configuration is handled externally, by hitting the pencil icon next to the Configuration text.




In the Secure Settings UI, expand the 'Dev Admin Actions' section and click 'Password / Pin'. Ensure that the button says 'Disabled' (and that 'Device Admin Enabled' is checked so it can do its thing) then press on the disk icon to save. Press the Tasker icon at the top left again to save the action and you should be returned to the Task Edit screen showing your new action. One more press on the Tasker icon and you should be back at your Profile list showing your new entry task.

All you need to do now is to define an Exit task - so the when your Bluetooth device goes away, the PIN is enabled. Press and hold on the Entry task ('Secure Settings Clear Password') in the Profile screen and from the menu that pops up, select 'Add Exit Task'. Simply repeat what you did above, but this time click the 'Disabled' button so it says 'Enabled' and enter a PIN or password.

After saving the exit task you're done! :)


Hopefully setting this up has inspired you with all sorts of ideas about what you could do with other built-in / 3rd party Tasker actions and Bluetooth proximity... let us know if you come up with any great ideas in the comments below!

Enhance the profile with your Home zone and variables

I've actually enhanced my profile slightly in that I also disable PIN lock when I am at home, on my Home WiFi. To do this, I set variables on entry to the Home or Fitbit Near tasks and in the exit of each, I check the other isn't active by checking this variable in the 'if' part of the task, as you can see below.


Next time

In the next part of our Mastering Tasker feature we're going to look at how you can send push messages to your device from the web to launch any task you choose.

Please post your feedback in the comments, together with any requests / ideas for future parts!

About the author

PaulOBrien's Photo
Paul O'Brien founded MoDaCo in 2002 as a site focused on Windows Smartphones and has grown it since then by concentrating on providing a friendly community for both experienced and beginner mobile enthusiasts.

  • 0


3 Comments

In Tasker when entering the Bluetooth MAC, hitting the search icon should bring up a list of devices.

    • 0
It didn't bring up BT Smart devices in my experience!

P
    • 0

Hey guys, I've been new to tasker and I'm learning to get around it, and wanted to take a tour on your "Mastering Tasker - 1, 2, and 3 " but first post in the topics is really messed up and almost unreadable wit a lot of <br> and &#39 and similar tags. (#3 is ok but the pics are messed)

Could you fix it, please? Thanks

Here are the topics:

http://www.modaco.co...etting-started/
http://www.modaco.co...try-exit-tasks/
http://www.modaco.co...ternal-plugins/
 

 

edit: nevermind, the link on the end of the first post in each topic leads to the article in the news+articles section. 

    • 0