Search code examples
android-management-api

Under what circumstances, the status of the device will change to disabled or deleted


There are four state for deivce, I only find ACTIVE and PROVISIONING, how can device state will change to DISABLED or DELETED?


Solution

  • DISABLED - The device is disabled.

    DELETED - The device was deleted. This state will never be returned by an API call, but is used in the final status report published to Cloud Pub/Sub when the device acknowledges the deletion.

    If you want to change the device state you need to modify the field by a patch request. You can do this by calling enterprises.devices.patch

    Note that when calling enterprises.devices.patch, ACTIVE and DISABLED are the only allowable values. To enter the device into a DELETED state, call enterprises.devices.delete

    You can find more info on this page https://developers.google.com/android/management/reference/rest/v1/enterprises.devices