在 Android 10 Go 设备(例如 Wiko Y61)上缺少覆盖("Draw over other apps")权限 window

Missing overlay ("Draw over other apps") permission window on Android 10 Go devices, such as Wiko Y61

我正在开发 Android 本机应用程序。为了支持我的功能,我需要锁定一些智能手机(来自我的利益相关者的请求)。

我想使用可以在 Play 商店中找到的 AppLock。 但是,在智能手机型号“Wiko Y61”中,此类应用程序无法运行,因为“覆盖权限”设置在系统上未激活。消息是“因性能问题而禁用”。

有人可以帮我解决这个问题吗?

覆盖/“显示在其他应用程序之上”权限是disabled on Android Go device as of Android 10,如消息所述,出于性能原因。在设备升级到Android10之前安装并获得权限的应用程序例外,否则,应用程序无法获得该权限。

如果您需要锁定设备,您应该查看 APIs for managing dedicated enterprise devices. Normal Android apps are otherwise generally restricted from doing things that could lock down a device, as that capability is also quite useful for malware seeking to take over a device. You're better off using the APIs that were intended for this, as hacky workarounds in this area are likely to be broken in the future (see, for instance, other restrictions being imposed on the overlay permission)。