Lock the screen in android [duplicate]
Possible Duplicate:
how to programmaticaly lock screen android
Hie team gud eve, I have tried using keygaurdmanager its executing, but what i need is when i click on the application the screen should be locked immediately. can any one suggest me how its possible..
Like: Loc开发者_Go百科k app in android market
Thanks in Advance
This will help you ::
KeyguardManager mgr = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = mgr.newKeyguardLock(KEYGUARD_SERVICE);
lock.reenableKeyguard();
For more description
精彩评论