Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable unlocking screen programmatically

  1. I need to lock the Android phone when the user leaves a defined WiFi area
  2. I need to prevent the user from unlocking the phone when he/she is out side the defined WiFi area
  3. I need to unlock the phone when user is back to the WiFi area

I guess list items 1 and 3 can be done programmatically.

Is it possible to do the 2nd item?

like image 762
Mithun Sreedharan Avatar asked Oct 03 '11 11:10

Mithun Sreedharan


1 Answers

Locking can be done using this method: How to lock the screen of an android device Unlocking look here: How to display Activity when the screen is locked?

For your problem 2, i see 2 solutions

a. If the user unlocks the screen, a message is fired: check at that moment if you are in the area and if not, instantly lock again

b. create your own locksreen with no possibility to unlock yourself

like image 84
Xavjer Avatar answered Sep 17 '22 12:09

Xavjer