-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to connect to camera service #24
Comments
@Kyson noticed with android M you'd need to turn on camera permission with the device |
I'm getting this sometimes as well, and also other apps that use the camera can't connect to it then. So far the only solution is rebooting the phone. I think we should do But I haven't figured out yet how to open the camera again in onResume(). |
Got the same problem on Nexus 5 and S3 Mini. I also guess its because a release is not called in the pause func. In my scenario i solved it by always calling finish() in on pause, which will call the destroySurface method. Inside the destroySurface method the release is called. But this only works if you want the QR Activity always be closed if paused or so. A more clever solution would be nice. |
Hi, In Android Marshmellow 6.x version the library gives the error and app crashes. * FATAL EXCEPTION: main Anybody has solution to this issue? |
Hey, |
Hi milanPansuriya are you running the app on Android 6.XX? You can use this code in your activity on create method. int currentapiVersion = android.os.Build.VERSION.SDK_INT;
Use this code outside the on create method. @OverRide
|
If you're running Android 5.0 or 6.0, this is not a QRCodeReaderView issue since you need to check the Camera permission in runtime before using the view (please check: http://developer.android.com/intl/training/permissions/index.html) |
I came up with the same problem and I'm sharing how I fixed it. It may help some people. First, check your Android version. If it is running on Android 6.0 and higher (API level 23+), then you need to :
For more information, have a look at the API documentation here |
hi,
i write codes as following,same to your demo
i have two activity,both need to read qrcode,and when i jump first activity to another ,a problem occurs:Failed to connect to camera service.
please help.thanks a lot
The text was updated successfully, but these errors were encountered: