How to use default password lock screen in our Android application?
Asked Answered
W

4

9

I am new in android. I want to use default password lock screen in my android application. I want to open that lock screen when sms is come in my device. I want to use (settings > Location & Security > setup screen lock with password ).

Can anyone tell me the intent of this Activity. Please help me I am stuck on this.

Thanks in advance.

Wicklow answered 7/11, 2011 at 11:19 Comment(1)
join ur self in chat.stackoverflow.com/rooms/6890/androiddevSomnambulation
W
3

I got the solution using APIDemo. Please check APIDemo/app/DeviceAdmin.

Thanks.

Wicklow answered 8/11, 2011 at 8:44 Comment(1)
Link no longer works but here is the link to DeviceAdminSample.java: android.googlesource.com/platform/development/+/master/samples/…Yuma
R
1

I don't believe the intent is exposed but being open source, you could make your own.

Rondarondeau answered 7/11, 2011 at 11:35 Comment(0)
C
1

com.android.settings.ChooseLockGeneric vulnerability (CVE-2013-6271) in Android 4.3 allows a malicious application to remove all existing Device Locks activated by a user without confirmation: http://thehackernews.com/2013/12/CVE-2013-6271-Android-device-lock-bypass.html

Caprifoliaceous answered 2/12, 2013 at 17:26 Comment(0)
D
0

I found the intent by connecting my phone in debugging mode.I found the following info.

Starting activity: Intent { cmp=com.android.settings/.ChooseLockPattern }

This might vary with different devices but you can invoke right activity by setting flags. I Hope this will enough to start for you.

For more precise following is the line you should observe in ddms

Starting: Intent { cmp=com.android.settings/.ChooseLockGeneric } 

Do some r and d with intent flags I think you will get the solution as per your requirement.

Dorser answered 7/11, 2011 at 11:38 Comment(1)
Neither of those are reliable. Anything that directly references com.android has the potential of breaking on current devices (if device manufacturers reimplemented those activities in their own package) or on future devices (if Android refactors their code or marks those activities as not exported).Sensory

© 2022 - 2024 — McMap. All rights reserved.