Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use smart lock API in my application to unlock pattern mode?

I am using Android 5.0. The version provides the SmartLock function which allows unlocking the password/pattern by connecting with a trusted device. I have a bluetooth low energy (BLE) device which registered as trusted device. I want to use the BLE to unlock (pattern mode) the phone. It will unlock the phone when the BLE and phone are connected and data is available by the event

if (BluetoothLeService.ACTION_DATA_AVAILABLE.equals(action)) 
// Calling unlock by the SmartLock API

If anyone who worked with SmartLock, please give me some guidance to do it? I did not find any SmartLock API to do it. enter image description here

like image 680
Jame Avatar asked Nov 24 '16 07:11

Jame


People also ask

How do you enable Smart unlock?

Step 1: Launch the Settings app on your Android and navigate to Security. Step 2: Under Device Security, tap on the Smart Lock option. Next, enter your device PIN. Once verified, you'll find all the Smart Lock options available.

What is Smart Lock app?

Smart Lock for Android Security that just works: with Smart Lock turned on, your Android phone stays unlocked when it's connected to a trusted device — like your smartwatch — or when it's in a familiar spot — like your pocket. So it's ready to use when you need it.


1 Answers

There is no external API as such for SmartLock. You can check Google Docs for reference on it.

You can check this sample out on GitHub and here you will find the tutorial on how to integrate smart lock API in your app.

like image 52
AlphaQ Avatar answered Oct 07 '22 19:10

AlphaQ