开发者

How to set maximum time to lock?

开发者 https://www.devze.com 2023-03-23 20:22 出处:网络
I\'m trying to set the maximum time to lock with DevicePolicyManager.s开发者_如何学运维etMaximumTimeToLock(), but this seems to have no effect. Admin-mode is enabled and lockNow() works without a prob

I'm trying to set the maximum time to lock with DevicePolicyManager.s开发者_如何学运维etMaximumTimeToLock(), but this seems to have no effect. Admin-mode is enabled and lockNow() works without a problem. Is there anything else that needs to be done to use setMaximumTimeToLock() ?

tgr


Are trying to keep your screen from going off? Use this in your onCreate. I believe it has to go before calling setContentView.

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
0

精彩评论

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