[FREE] 🔒 Auth Extension- Check if Passcode lock is enabled on a device

Hello everyone
Today I am presenting my Auth extension :smile:


Features
This extension can be used to check if a user has enabled passcode lock on his/her device


Use
If you want to integrate authentication using device lock in your app you can easily do it by using this intent as discovered by @ShanmugaNathan2023

But it has a great limitation well detected by @TIMAI2 that

The extension aims to resolve this issue by checking if the user has a passcode lock set up on his/her device
Then you can use the intent to ask for password lock. Issue Resolved :smile:


Blocks

image

Returns true if passcode is setup, False otherwise.
Tested on emulator running android 10.


Download the aix

io.auth.aix (3.4 KB)


Support the project
If you liked the extension then do make a small funding starting from 0.5$ so I can continue to make such extensions for free.


Usage Policy- Important

I Sarthak Gupta authorize that you can use this extension in any of your projects and even publish them on the Play Store as long as you give me credit like this
Extension by Sarthak Gupta and a link to this post
If you don't want to give credit then contribute 4$ on buymeacoffee


Regards
Sarthak Gupta @techxsarthak

2 Likes

Could do with a success event

1 Like

This block returns true or false instantly then you can use your blocks... nice suggestion will surely update in version 2... hope the community can test and give feedback on this extension
Ps please comment your device name and if its working in your device

@TIMAI2 But this extension solves that passcode lock issue, right?

It tests if a lock code is in place. Works in companion on Android 12 and 14.

What I was suggesting is a success return event, so that if the code entered is correct, the user can then proceed into the app, because the user can back out of the authentication dialog.

1 Like

Yes user can back out, but you can use below steps to overcome,

when user skip the authentication we will receive empty ActivityStarter event,
In such cases we can use IF_ELSE block and start the ActivityStarter again and again which will be loop until correct password is entered.

1 Like

I didn't get a response for AfterActivity, one way or another...though does change a label to blank...

1 Like

Yes thats what I thought activity starter can call an event but I don't think that this can be used to detect if password was entered or not
PS I am working to implement it in the extension

Just looked into my project,
@TIMAI2 sorry for wrong steps,

It's not AfterActivity it's ActivityCancelled event.
Below corrected blocks:

ProjectFile:
applock.aia (1.9 KB)

Yep, I get that, but nothing comes back, for me, in "result"

image