I'm using the Android Management API with a DEVICE_OWNER
policy that has "playStoreMode": "BLACKLIST"
and an application with "installType": "BLOCKED"
to blacklist specific application. Here's the policy I'm using for development:
{
"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"
}
The problem I'm seeing is that the blacklisted app is only removed 'by the administrator' when the user manually syncs the policy with Google's 'Device Policy' app.
How can I make the blacklisted app remove itself automatically ?
Also of note, the device appears to be both compliant and non compliant with the policy at the same time. Using the API to inspect a device with the blocked app installed:
...
"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>"
}
],
...