androidandroid-permissionskiosk-modemtpandroid-usb

Show USB permission dialog over Android Kiosk application?


So I have an application that is pinned to the device with startLockTask command and it has several restrictions so the user cannot escape from the application or change settings of the device.

However, the user should be able to transfer files from the device to a computer via USB, but when the device is connected to a "new" PC, the USB permission dialog: Allow access to device data is not shown because of the LockTask mode.

Is there any way to open that dialog in front of my application?


Solution

  • Faced the same problem today,

    in my case I solved it by adding com.android.systemui package, while adding my whitelist application's in setLockTaskPackages DPM's method.

    After this I can see the dialogue which was blocking up in LockTask mode.