Failed to configure camera
See original GitHub issueCamera not working when rotating device.
Used TextureView, Nexus 9 (API 23)
Logs
D/CameraInstance: Opening camera D/CameraInstance: Closing camera D/CameraInstance: Opening camera D/CameraInstance: Configuring camera I/CameraManager: Camera Display Orientation: 90 W/CameraManager: Failed to set rotation. W/CameraManager: Camera rejected even safe-mode parameters! No configuration E/CameraInstance: Failed to configure camera E/CameraInstance: java.lang.RuntimeException: getParameters failed (empty parameters) E/CameraInstance: at android.hardware.Camera.native_getParameters(Native Method) E/CameraInstance: at android.hardware.Camera.getParameters(Camera.java:1890) E/CameraInstance: at com.journeyapps.barcodescanner.camera.CameraManager.setParameters(CameraManager.java:365) E/CameraInstance: at com.journeyapps.barcodescanner.camera.CameraManager.configure(CameraManager.java:141) E/CameraInstance: at com.journeyapps.barcodescanner.camera.CameraInstance$4.run(CameraInstance.java:178) E/CameraInstance: at android.os.Handler.handleCallback(Handler.java:739) E/CameraInstance: at android.os.Handler.dispatchMessage(Handler.java:95) E/CameraInstance: at android.os.Looper.loop(Looper.java:148) E/CameraInstance: at android.os.HandlerThread.run(HandlerThread.java:61) E/Camera: Error 2 E/Camera: Error 2 E/Camera: Error 2 E/Camera: Error 2 D/CameraPreview: pause() D/CameraInstance: Closing camera
May be there is a way to use SurfaceView and set its size equal to BarcodeView’s size, not large? Thank you.
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
Some bugs around permission handling may have been fixed since this issue was opened. Please create a new issue if this persists in v3.5.0.
Problem still occurs in v3.5.0 and Android 6 but you can easily fix this by dynamically adding CAMERA permission (https://developer.android.com/training/permissions/requesting.html)