How to disable the camera using the Android Management API

2k views Asked by At

I am trying to create an app that restricts camera on Android for my enteprise.

Until now I used device admin, but as far as I know, it's deprecated since API 28. As I understand, I should use Device Management API and restrict camera using policies.

What I did is created an enterprise, and enrolled my device with a Work Profile that included camera disabled policy, but the Android stock camera app is still working. The Android Device Policy app does show that the camera disabled policy is applied.

What am I doing wrong?

Also, I noted that the end user can simply go to the Account settings of the phone and delete the work profile. Can it be prevented?

Thanks!

2

There are 2 answers

7
Fred On

In order to disable the camera on the whole device you need to set up the device in fully managed mode. To do so you can use one of the available provisioning methods, like the QR code method. You will need to factory reset the device before provisioning it in fully managed mode.

0
Katrus On

You can set this policy when using AMAPI: "cameraDisabled": true, to disable camera usage on your managed devices.