Search code examples
androidandroid-management-api

How to know if user disables or deletes work profile in settings?


I am trying to see if device status gets updated when the work profile is disabled or deleted on client side through Settings.

After making changes on the client, both disable and deleted, the status returned by enterprises.devices.get API is still ACTIVE.

Is there a way to find out there has been a change on the client?


Solution

  • Unfortunately, there's no way for EMM to detect this other than removing devices that haven't been checked in after a certain period of time.

    To achieve this, you can use the devices.get() method to check on either “lastStatusReportTime” or “lastPolicySyncTime” field on the Device resource and see whether the device is communicating to your backend. Then use devices.delete() to remove the device.