1

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!

Fred
  • 2,191
  • 1
  • 12
  • 14
user-123
  • 874
  • 1
  • 13
  • 34

2 Answers2

1

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.

Fred
  • 2,191
  • 1
  • 12
  • 14
  • Thanks! Does it mean that in order to do so, all the employees' devices should be erased? – user-123 May 25 '19 at 16:00
  • 1
    Yes. If you want to set up a device into fully managed mode it first needs to be erased and factory reset. – Fred May 25 '19 at 17:20
  • Thanks, and can this mode be disabled by the end user? – user-123 May 25 '19 at 19:52
  • 1
    It depends on the policy you set. Once a device is set up in fully managed mode it remains in this mode until the next factory reset, and you can prevent the user from triggering a factory reset by setting `factoryResetDisabled = true` in the policy. – Fred May 25 '19 at 19:56
  • Ok, I guess this solution with Android Management API doesn’t fit my needs. I don’t want to “control” users’ devices to this extent. Are you familiar with another solution that fits better my needs? – user-123 May 26 '19 at 06:01
  • The [device admin mode](https://developer.android.com/guide/topics/admin/device-admin) allows you to disable the camera without factory reset, however this mode is [deprecated](https://developers.google.com/android/work/device-admin-deprecation) and starting with Android 9 it will no longer allow to disable the camera. The recommendation is now to use fully managed mode for corporate-owned devices and work profile mode for employee-owned devices. – Fred May 26 '19 at 17:13
  • Thanks, what about Device Policy Controller? Can I use it somehow with my needs? – user-123 Jun 03 '19 at 10:17
0

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

Katrus
  • 15
  • 2