开发者

Lock the screen in android [duplicate]

开发者 https://www.devze.com 2023-04-03 11:18 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: how to programmaticaly lock screen android
This question already has answers here: Closed 11 years ago.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号