An error occurred with my app which ran in Nexus5 (Android6.0).
The error was
java.lang.RuntimeException: Fail to connect to camera service
I had added the permission to the AndroidManifest.xml.
But the app is OK with another phone(Android5.1), and genymotion AVD(Android 4.0).
The key code is below
 @Override
public void onResume() {
    super.onResume();
    try {
        mCamera = Camera.open();
    }catch (Exception e){
        Log.e(TAG,"open camera failed",e);
    }
}
 
     
     
     
     
     
     
    