Has anyone got task locking working in Android L? Could they share some details on how it works? I have seen the instructions below, but struggling to understand this.
Make a file device_owner.xml using below content, replace appropriate package name
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<device-owner package="com.your.packagename" name="Yourname" />
adb push device_owner.xml /data/system/device_owner.xml Reboot device.
from com.your.packagename app call
startLockTask();
from your activity
Even if you do not have userdebug, you can test it by calling startLockTask, without pushing any file
Taking Below Snip from Task Locking API

It is clear that startLockTask() api will be hv effect if device_owner.xml is present .
How do i check if my app is device owner ?
When you app is device owner , you app is Device Administrator option will be checked and checkbox will be gray out hence will not allow u to untick the checkbox.

You need to give system right while pushing device_owner.xml
Follow below steps :