Our Application runs entirely in Kiosk mode (All devices are on Android 5.1 Lollipop). The App is configured as Device Owner using DPM command.
We provided an Update App facility (from within the App) to receive APK from our own server.
When the App is running in Kiosk mode, the app gets downloaded but the install intent is not getting kicked off. If we however exit Kiosk Mode (using stopLockTask), the install goes through fine.
I guess it's an issue with setting Policy and/or whitelisting the relevant system app. I added com.android.packageinstaller as so mDpm.setLockTaskPackages(deviceAdmin, new String[]{getPackageName(),"com.android.packageinstaller"}); but it did not work.
Any help will be highly appreciated.