An error occurred with my app which ran in Nexus5 (Android6.0).
The error was
java.lang.RuntimeException: Fail to connect to camera service
open Settings -> Apps -> click you app -> Permissions -> open Camera permissions. you can see: http://developer.android.com/training/permissions/requesting.html