Failed to connect to camera service

Few things:

  1. Why are your use-permissions and use-features tags in your activity tag. Generally, permissions are included as direct children of your <manifest> tag. This could be part of the problem.
  2. According to the android camera open documentation, a runtime exception is thrown: if connection to the camera service fails (for example, if the camera is in use by another process or device policy manager has disabled the camera) Have you tried checking if the camera is being used by something else or if your policy manager has some setting where the camera is turned off?
  3. Don’t forget the <uses-feature android:name="android.hardware.camera.autofocus" /> for autofocus.

While I’m not sure if any of these will directly help you, I think they’re worth investigating if for no other reason than to simply rule out. Due diligence if you will.

EDIT As mentioned in the comments below, the solution was to move the uses-permissions up to above the application tag.

Leave a Comment