FORUMS
Remove All Ads from XDA

[GUIDE][Difficulty: Beginner] Enable 'Smart Lock' on Bluetooth LE devices

833 posts
Thanks Meter: 1,866
 
Post Reply Email Thread
Android 5.0 Lollipop added the ability to keep your device unlocked so long as you stay connected to a trusted bluetooth device. Dubbed "Smart Lock", the feature is quite useful if you own a smart wearable that you keep on you at all times. However, Smart Lock is unavailable for devices that connect to your phone via Bluetooth Low Energy. Some manufacturers offer the ability to simulate Smart Lock through keeping their app on in the background (such as Xiaomi's Mi Band and the Mi Fit app), but others do not.

If you, for instance, own a basic Fitbit or one of the new Honor Z1 bands among others, then you'll be able to keep your phone unlocked so long as your wearable is in range of your phone by following this Tasker guide.

Prerequisites
  1. Secure Settings plug-in
  2. Bluetooth 4.0 LE enabled device
  3. A Bluetooth LE Scanner app

Instructions
  1. Ensure that Secure Settings is set as a Device Administrator by opening the app and going to the Preferences screen. This is so the plugin has the ability to enable/disable the lockscreen.
  2. Bring your phone and your device close together. Open the BLE Scanner app you downloaded above, and press SCAN.
  3. Write down the MAC ID of the device that shows up at the top of the list. This should be the address of the Fitbit or other wearable, in case the name doesn't properly populate.
  4. Click + to create a new Profile and name it "Watch Near" or anything else you want.
  5. Select the State context, then select "BT Near" under "Net."
  6. Once you're in the BT Near setting, type in the Bluetooth Address that you wrote down earlier under "Address." Additionally, select "Low-Energy (LE) Devices" and "Unpaired Devices". Leave everything else unchecked and/or default.
  7. Press the back key to save and exit the context setup.
  8. Tasker will now ask you to set up a new task associated with this context. Click on "New Task" and optionally give the task a name. Before we move on, here's a picture of what the context screen should look like.


Now that you've got the context set-up, we're going to make a simple entry and exit task to correspond to when your phone connects/disconnects to your smart wearable.
  1. Plugin --> Secure Settings. Under the Dev Admin Actions dropdown, select Password/Pin. Make sure that the box is set as "DISABLED" and that Device Admin Enabled is checked. Press the save icon up top to exit, then press the back key once you're back in Tasker.
  2. Press back once more to exit the task creation. Now expand the Profile you just created by tapping on its name. Long-press on the Task that launches, the select "Add Exit Task."
  3. Within this new task, you're going to do the opposite of what you did above. Plugin --> Secure Settings. Select Password/Pin under Dev Admin Actions again, but this time change the box to "ENABLED" and set up the password or pin code that you desire. Exit out all the way after you're done.

That's it! Your phone should now automatically disable the pin/password when your bluetooth device is in range, otherwise it will re-enabled it. You can expand the power of this task by adding some alerts for when your device and phone disconnects, the choice is up to you!
The Following 5 Users Say Thank You to MishaalRahman For This Useful Post: [ View ] Gift MishaalRahman Ad-Free
 
 
mclaudio77
7th March 2016, 08:58 PM |#2  
Guest
Thanks Meter: 0
 
More
Does it work only with bt le?

Enviado do meu Mi 4i
7th March 2016, 10:53 PM |#3  
MishaalRahman's Avatar
OP Editor in Chief
Thanks Meter: 1,866
 
More
Quote:
Originally Posted by mclaudio77

Does it work only with bt le?

Enviado do meu Mi 4i

Smart Lock already works with regular bluetooth devices out of the box, so I wouldn't recommend using Tasker for that. But yes, if you put in the Bluetooth MAC ID into Tasker it will work the same way.
8th March 2016, 12:01 AM |#4  
Member
Flag Tehran
Thanks Meter: 41
 
More
Does not work with my meizu pro5 and Xiaomi mi band 1s (Android 5.1.1)
Still I need to put my finger on finger scanner or putting the pin code to unlock the device
8th March 2016, 09:02 AM |#5  
Senior Member
Thanks Meter: 96
 
More
Will it break the device protection and the encryption
8th March 2016, 11:58 AM |#6  
Senior Member
Thanks Meter: 112
 
More
This is great thanks, I am using this with a cheap Bluetooth tracker keyring I got from eBay for 99p.

Edit

I need to test this a little more with the tag. The tag seems to power its self off which means it doesn't then trigger BT Near.
8th March 2016, 12:20 PM |#7  
fjuniper's Avatar
Senior Member
Flag Bristol
Thanks Meter: 97
 
More
Where is the Secure Settings plug-in? There is an app of that name, by intangibleObject - is that what you mean?
8th March 2016, 01:32 PM |#8  
Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by fjuniper

Where is the Secure Settings plug-in? There is an app of that name, by intangibleObject - is that what you mean?

The Secure Settings Plugin is in an app called "Tasker".

However, having setup this instructions it seems to me that Secure Settings or TAsker never triggers a lockscreen/password protection to be active. What is your default state ? OS Version ? Do you have any initial password options enabled ?
8th March 2016, 01:59 PM |#9  
fjuniper's Avatar
Senior Member
Flag Bristol
Thanks Meter: 97
 
More
Quote:
Originally Posted by deepsync

The Secure Settings Plugin is in an app called "Tasker".

Ah, thanks - I have Tasker, but didn't realise what the OP meant.
Quote:
Originally Posted by deepsync

However, having setup this instructions it seems to me that Secure Settings or TAsker never triggers a lockscreen/password protection to be active. What is your default state ? OS Version ? Do you have any initial password options enabled ?

I haven't had time to try it yet - I am on Marshmallow and have a BT LE step counter to test it with, when I have a chance.
8th March 2016, 03:57 PM |#10  
Member
Thanks Meter: 6
 
More
Please Do. It works but somehow Timing of tasker to Check connection is not really good
2nd July 2016, 08:57 PM |#11  
Ozonethegreat's Avatar
Senior Member
Flag Seattle
Thanks Meter: 12
 
More
This can be accomplished using the delayed lock app in conjunction with the Tasker plugin without having to use secure settings

Sent from my Nexus 5 using Tapatalk
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes