I have a phone specific problem when I open a camera on this one particular Nexus 5. Its the
An error occurred while connecting to camera: 0 --- Fail to connect to camera service error. On at least a dozen other phones everything works just fine. Other apps that use the camera on the Nexus 5 are not crashing (indicating its not all apps that can't access the camera, just mine).
There are a number of other questions on this and I have tried all of them. They all talk about missing permissions, and making sure the camera is destroyed after use.
To be clear my manifest requests and uses the camera properly:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera2" />
And I am releasing the camera when destroying:
public void releaseCamera()
if (_camera != null)
_camera = null;
Can you think of any reason what-so-ever that I am getting this. I have a suspicion that theres some sort of bug because I am using camera and not camera2 but that is a wild guess. Reading the updates for API 6.0 there is a section on camera that says:
In This release, the model for accessing shared resources in the
camera service has been changed from the previous “first come, first
serve” access model to an access model where high-priority processes
Again without re-writing the entire app to use camera2 (not an option) I can't say for certain what's going on.
Here is my code where I open the camera (and what works on e