by Fran T
Version 4 (January 29, 2026)
Download (37 downloads)
Demonstrates using the user interface to unlock the device. An optional PIN can also be given to unlock with. A swipe gesture will always be made to unlock the device if no screen lock is set for the device, or if Android Smart Unlock/Extend Unlock is active. With the Android Extend unlock feature, you can set up on-body detection, trusted locations, or connected Bluetooth devices where the screen lock is suspended and the device can be unlocked with a simple swipe.
If you provide a PIN to unlock with, the flow will perform a hard lock of your device so that a PIN will be required to unlock. If no PIN is provided, the flow will wait for you to soft-lock your device, as by pressing the power button.
The center column of the subroutine under the Preferred Activity? block supports the case where the phone dialer app initially blocks the key guard. It can be omitted from your own flow if for example your device isn't a phone, your flow reacts to voice commands, or it's otherwise not possible for the user to be in a call when the screen needs to be unlocked.
The buttons clicked on in the Android Unlock screen are specified by their IDs rather than their text, so the flow should work regardless of the language or alphabet set for the device.
To include the unlock blocks in your own flow, simply copy the contents of the Subroutine here. The πππππππΏππ variable can optionally be specified for the unlock screen PIN.
Note that there's an inherent security risk when storing your PIN in a flow, as with the Atomic Store block.
Also see:
https://llamalab.com/automate/community/flows/21295
Updates:
β’ Now works for older versions of Android
β’ Added support for unlocking when the phone dialer app initially blocks the key guard; enhanced the demo to show hard and soft unlocking
| 5 stars | 1 | |
| 4 stars | 0 | |
| 3 stars | 0 | |
| 2 stars | 0 | |
| 1 star | 0 | |
| Reports | 0 |
Rate and review within the app in the Community section.