androidandroid-management-apiandroid-applicationinfoapplication-blocks

can we able to lock all applications in android device through android-management-api?


While applying lock command through android-management-api in the device, the device will be locked. But if users know the password, they can able to unlock the device and use the applications in the device.

My requirement is to disable all applications for a specific amount of time. Is there any possibility to achieve this functionality through android-management-api?


Solution

  • If you want to lock the device and prevent user access entirely, you can reset the device’s password and then lock the device using issueCommand: RESET_PASSWORD and LOCK.

    You can also use Devices.patch() and set state to “DISABLED” to disable all the applications (for fully managed devices) or work apps (when enrolled in work profile) from the device.

    If perhaps you want to achieve this because of compliance issues, then the IT admin can wipe the device (for fully managed), remove any corporate apps from the device, or remove the work profile. This can also be automated by using compliance rules.