Bharat Godhani
Bharat Godhani

Reputation: 110

Activity for locking android device

Is it possible make an activity, that will lock the android device?


Upvotes: 1

Views: 265

Answers (1)

Quintin Robinson
Quintin Robinson

Reputation: 82325

For this you can take advantage of the Device Administration API introduced in Android 2.2. This does require the user to accept that your application wants to have control of the device but obviously you would need to disclose that information anyway. Also it should be noted that on a phone (at least in the US) you must always have access to make emergency phone calls.

Using the API you can enforce a pin lock be set and also invoke the lock screen at will in addition to many other administration features.

Upvotes: 1

Related Questions