开发者

unable to lock device through device administration api

i want to set 2 minutes of user inactivity that can occur before the device locks using setMaximumTimeToLock.

DevicePolicyManager mDPM;
ComponentName mDeviceAdminSample;
...
long timeMs = 1000*60*2;
mDP开发者_运维技巧M.setMaximumTimeToLock(mDeviceAdminSample, timeMs);

but the above code is not working. please tell the suitable one.

thanks.


Have you implemented a DeviceAdminReceiver?

This answer says it is necessary:
Locking an android phone (lock pattern or similar)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜