0

I am trying to disable the camera on a custom android 12 ROM based on the state of another peripheral.

I looked into the function setCameraDisabled(Component Name, Boolean) and tried to invoke it. It results in a security exception. How do we get the component name? What other methods are there to disable the android camera completely on the device?

Anerudh
  • 11
  • 3
  • Does this answer your question? [how to disable camera function in android programatically](https://stackoverflow.com/questions/13697816/how-to-disable-camera-function-in-android-programatically) – abdo Salm Sep 06 '22 at 09:11
  • @abdoSalm . The problem comes with the Component name. How exactly do I use the Component name? Because that is what is giving the security exception and I don't know how to make it admin. – Anerudh Sep 06 '22 at 09:28
  • Does this answer your question? [Can I still use Device Admin API only to disable the CAMERA for android 11 and above as Device Admin API is deprecated](https://stackoverflow.com/questions/75894196/can-i-still-use-device-admin-api-only-to-disable-the-camera-for-android-11-and-a) – Solomon Ucko Mar 31 '23 at 02:12

0 Answers0