clide313
clide313

Reputation: 1507

Set Password policy from an app Android

I'm trying to create an app that when installed on a device allow me to set the device password policy and eventualy to lock the phone programaticaly

Thanks for the help.

Upvotes: 0

Views: 1123

Answers (2)

Eumel
Eumel

Reputation: 11

http://developer.android.com/guide/topics/admin/device-admin.html you can't set the password yourself but you can tell them to enter a new one and lock the device if you want.

Yes you can! See DevicePolicyManager.resetPassword(...) and DevicePolicyManager.lockNow().

Requires android:permission="android.permission.BIND_DEVICE_ADMIN"

Cheers!

Upvotes: 1

L7ColWinters
L7ColWinters

Reputation: 1362

http://developer.android.com/guide/topics/admin/device-admin.html you can't set the password yourself but you can tell them to enter a new one and lock the device if you want.

Prompt user to set a new password.

Lock device immediately.

Wipe the device's data (that is, restore the device to its factory defaults).

Upvotes: 0

Related Questions