I'm fairly new to Android and the changes in DeviceOwner/Screen Pinning over the last 3 versions are confusing me a bit.
I can make an app lock as long as I set the device owner with an EMM or adb commands.
It looks like you used to be able to start screen pinning (not Kiosk or Single App Mode - just regular screen pinning) programmatically with setLockTaskEnabled()
without being Device Owner. But I can't find documentation on that anywhere. All the documentation seems to point to ONLY locking the screen programmatically if you are under one of the 2 (3 if rooted) Device Owner methods.
Can anyone tell me if it's possible to start screen pinning programmatically and how? Or point me in the right direction?
Thanks
Ugh.
I just had to read one more API doc:
You can still call startLockTask()
(note different than the one I was trying to call).
https://developer.android.com/about/versions/android-5.0.html#ScreenPinning
Not sure that the documentation is as clear as it could be with all this - or the naming conventions but there we are.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.