在Android Kiosk应用程序上显示USB权限对话框? [英] Show USB permission dialog over Android Kiosk application?

查看:140
本文介绍了在Android Kiosk应用程序上显示USB权限对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我有一个使用startLockTask命令固定到设备上的应用程序,它具有多个限制,因此用户无法从应用程序中退出或更改设备的设置.

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.

但是,用户应该能够通过USB将文件从设备传输到计算机,但是当设备连接到新" PC时,USB权限对话框:

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?

推荐答案

今天也遇到了同样的问题,

Faced the same problem today,

在我的情况下,我通过添加 com.android.systemui 包解决了此问题,同时在 setLockTaskPackages DPM的方法中添加了白名单应用程序.

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

此后,我可以看到在 LockTask 模式下阻塞的对话.

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

这篇关于在Android Kiosk应用程序上显示USB权限对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆