title: Device Administration API, allow specific apps to use the camera
body: <p>We've been working on a few applications in the past few months that are going to be used at work, (small company, apps are not going to be published to the app store). Our employees receive a phone that should only be used in a working environment, and we would like to prevent the user from taking pictures with the device and apps like facebook. This can be done by the Android's Device Admin API, so we will create an additional application to enforce the rule to block the camera from being used. But one of our applications has a feature to take a picture (from documents) and upload them to a server. And with the camera being disabled it's a problem.</p>
  
  <p>My Question: Is it possible to allow certain applications to bypass the camera block? I've done some research but can not seem to find a callback for this feature.</p>
  
  <p>My idea was the following: create a Device Admin application which contains the application id's from our applications (since we made them we know them) So if the Device Admin app receives a broadcast that app XX wants to access the camera and app XX is inside an array of allowed app id's, the device admin app returns a true state (allowing the app to access the camera) and apps that are not in the array will be blocked. </p>
  
  <p>Is this possible and has someone done this before ? It would be nice if someone pointed us in the right direction :). Also i'm sure we are not the only one looking for an answer to this question. So we hope that this post will help people in the future struggling with this problem.</p>