开发者

unable to lock device through device administration api

开发者 https://www.devze.com 2023-02-24 05:49 出处:网络
i want to set 2 minutes of user inactivity that can occur before the device locks using setMaximumTimeToLock.

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

精彩评论

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