An error occurred with my app which ran in Nexus5 (Android6.0).
The error was
java.lang.RuntimeException: Fail to connect to camera service
Add Camera Permission before Opening the Camera:
follow the Link for adding Permissions: https://developer.android.com/training/permissions/requesting.html