我将 Android Management API 与具有将特定应用程序列入黑名单的DEVICE_OWNER
策略"playStoreMode": "BLACKLIST"
和应用程序一起使用。"installType": "BLOCKED"
这是我用于开发的政策:
{
"name": "enterprises/<enterprise>/policies/<policy>",
"version": "1",
"applications": [
{
"packageName": "<enterprise app id>",
"installType": "FORCE_INSTALLED"
},
{
"packageName": "<blocked app id>",
"installType": "BLOCKED"
}
],
"alwaysOnVpnPackage": {
"packageName": "<enterprise app id>",
"lockdownEnabled": true
},
"playStoreMode": "BLACKLIST"
}
我看到的问题是,当用户手动将策略与 Google 的“设备策略”应用同步时,被列入黑名单的应用仅“由管理员”删除。
如何使列入黑名单的应用程序自动删除?
另外值得注意的是,该设备似乎同时符合和不符合该政策。使用 API 检查安装了被阻止应用程序的设备:
...
"name": "enterprises/<enterprise>/devices/<device id>",
"managementMode": "DEVICE_OWNER",
"state": "ACTIVE",
"appliedState": "ACTIVE",
"policyCompliant": true,
"nonComplianceDetails": [
{
"settingName": "applications",
"nonComplianceReason": "APP_INSTALLED",
"packageName": "<blocked app id>"
}
],
...