android java lang runtimeexception fail to connect to camera service

I had the same issue that none of the answers here solved, so after solving it I am adding my way of solving it. This applies to new android versions that support setting permissions per app (since Marshmallow, 6.0). The permission for camera could be disabled and should be enabled from the app settings.
Settings -> Apps -> [Your App] -> Permissions

More info about this here: http://developer.android.com/training/permissions/requesting.html

Leave a Comment