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.

anddev
  • 3,144
  • 12
  • 39
  • 70

4 Answers4

3

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

Thanks.

anddev
  • 3,144
  • 12
  • 39
  • 70
  • Link no longer works but here is the link to DeviceAdminSample.java: https://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.java – Timothy C. Quinn Dec 11 '15 at 23:31
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

1

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

Kuffs
  • 35,581
  • 10
  • 79
  • 92
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.

Ashwin N Bhanushali
  • 3,872
  • 5
  • 39
  • 59
  • 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). – CommonsWare Nov 07 '11 at 13:41