Can we check which policies are enforced on the device by the device admin.I want to enable/disable certain features and show prompt to the user based on policies enforced on device.
For eg: I want to disable camera option in my app when the camera restriction policy has being enabled by an admin on the device.This will help to improve the usability.
Please note my app is not device admin app.
The getter methods on
DevicePolicyManager
are available to all apps, AFAIK. So,getCameraDisabled(null)
should tell you if the camera is disabled. Only an appropriate device admin can change the camera-disabled setting, though.