[英]Android Device Admin app enabled by default
I have a question about admin apps on Android that I can't find the answer to. 我有一个关于Android上的管理应用程序的问题,但找不到答案。 I followed the guide on creating an admin app from here: https://developer.android.com/guide/topics/admin/device-admin#java
我遵循了有关从此处创建管理应用程序的指南: https : //developer.android.com/guide/topics/admin/device-admin#java
I successfully created an admin app but there's something that's confusing me. 我成功创建了一个管理应用程序,但有些让我感到困惑。 I have a fresh device (Moto G6) and when I go into Settings->Security&Location->DeviceAdminApps I see a list of admin apps on the device.
我有一个新设备(Moto G6),当我进入“设置”->“安全性和位置”->“ DeviceAdminApps”时,会看到该设备上的一系列管理应用程序。 Right now it lists my app and a Google Play Services app titled "Find My Device".
现在,它列出了我的应用程序和一个名为“查找我的设备”的Google Play服务应用程序。 The only difference, though, is that the google app was on by default.
不过,唯一的区别是,默认情况下,Google应用处于启用状态。 Normally, and including in my app, when I try to use an admin feature (through DevicePolicyManager), an android page pops up asking me to enable it as an admin app.
通常,包括我的应用程序在内,当我尝试使用管理功能(通过DevicePolicyManager)时,会弹出一个android页面,要求我将其启用为管理应用程序。 Since the Google app is already enabled, that pop up doesn't need to appear.
由于已经启用了Google应用,因此不需要显示该弹出窗口。
So, my question is how do I make an app an admin app by default (without needing the pop up page)? 因此,我的问题是如何在默认情况下使应用成为管理员应用(无需弹出页面)? I assume something needs to be done on boot up but I have no idea what that Google app does.
我认为在启动时需要做一些事情,但是我不知道该Google应用程序会做什么。 Does anyone out there have any idea?
外面有人有什么主意吗?
So, my question is how do I make an app an admin app by default (without needing the pop up page)?
因此,我的问题是如何在默认情况下使应用成为管理员应用(无需弹出页面)?
Build your own firmware with your own custom build of Android, where you pre-install your device admin app and set things up for it to be pre-enabled. 使用自己的自定义Android版本来构建自己的固件,在该版本中,您可以预安装设备管理应用程序,并对其进行设置以使其预先启用。
Alternatively, I think if you create a device owner app, it will be enabled upon installation, but that installation happens when the device is being first set up. 另外,我认为如果您创建设备所有者应用程序,则会在安装时启用该应用程序,但是该安装会在首次设置设备时进行。
Ordinary device admin apps require users to agree to enable them, for blindingly obvious security reasons. 出于显而易见的安全原因,普通设备管理员应用要求用户同意启用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.