Reputation: 21
I am using Android Management API to run my APP in Kiosk Mode. It's relying on a USB Device to work correctly, but the prompt for accepting the connection throws an LOCK TASK MODE VIOLATION Error. At this moment my App gets stuck (propably since the authorization prompt can't be displayed) and can only be reset by reboot.
As explained in this post you can whitelist com.android.systemui, but how can this be applied to the Android Management API?
Upvotes: 0
Views: 751
Reputation: 21
Alright, i figured it out. I reread this section of the management api documentation. Seems like this is the way to "whitelist" apps for Lock Task Mode, although it's a bit misleading.
So you simply just add the packages as "FORCE_INSTALLED" to your policy, even already installed packages from your system. So in my case:
{
...
"applications": [
{
"packageName": "com.example.app",
"installType": "KIOSK",
"defaultPermissionPolicy": "GRANT"
},
{
"packageName": "com.android.systemui",
"installType": "FORCE_INSTALLED",
"defaultPermissionPolicy": "GRANT"
}
]
}
Upvotes: 2