Error While Using Zxing Library

717
February 15, 2018, at 11:45 PM

I have created an app that scans the barcode(am using zxing library), whenever I open the camera to scan the barcode it throws the below error

Error Log

02-15 17:52:04.856 11944-12430/com.example.android.purchase_order E/libc: Access denied finding property "camera.hal1.packagelist"
02-15 17:52:04.868 11944-12430/com.example.android.purchase_order W/CameraBase: An error occurred while connecting to camera 0: Status(-8): '1: validateClientPermissionsLocked:951: Caller "com.example.android.purchase_order" (PID 10243, UID 11944) cannot open camera "0" without camera permission'
02-15 17:52:04.868 11944-12430/com.example.android.purchase_order E/Camera: IOException Fail to connect to camera service mPropertyShowDialogstrue
02-15 17:52:04.870 11944-12430/com.example.android.purchase_order E/CameraInstance: Failed to open camera
                                                                                    java.lang.RuntimeException: Fail to connect to camera service
                                                                                        at android.hardware.Camera.<init>(Camera.java:606)
                                                                                        at android.hardware.Camera.open(Camera.java:427)
                                                                                        at com.google.zxing.client.android.camera.open.OpenCameraInterface.open(OpenCameraInterface.java:83)
                                                                                        at com.journeyapps.barcodescanner.camera.CameraManager.open(CameraManager.java:121)
                                                                                        at com.journeyapps.barcodescanner.camera.CameraInstance$3.run(CameraInstance.java:158)
                                                                                        at android.os.Handler.handleCallback(Handler.java:789)
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                        at android.os.Looper.loop(Looper.java:164)
                                                                                        at android.os.HandlerThread.run(HandlerThread.java:65)
02-15 17:52:04.929 11944-12140/com.example.android.purchase_order D/FA: Connected to remote service
02-15 17:52:04.943 11944-12011/com.example.android.purchase_order D/OpenGLRenderer: endAllActiveAnimators on 0x7bfb5abc00 (RippleDrawable) with handle 0x7c07dc66a0
02-15 17:52:05.001 11944-12430/com.example.android.purchase_order D/CameraInstance: Configuring camera
02-15 17:52:05.010 11944-12430/com.example.android.purchase_order W/CameraManager: Failed to set rotation.
02-15 17:52:05.010 11944-12430/com.example.android.purchase_order W/CameraManager: Camera rejected even safe-mode parameters! No configuration
02-15 17:52:05.012 11944-12430/com.example.android.purchase_order E/CameraInstance: Failed to configure camera
                                                                                    java.lang.NullPointerException: Attempt to invoke virtual method 'android.hardware.Camera$Parameters android.hardware.Camera.getParameters()' on a null object reference
                                                                                        at com.journeyapps.barcodescanner.camera.CameraManager.setParameters(CameraManager.java:353)
                                                                                        at com.journeyapps.barcodescanner.camera.CameraManager.configure(CameraManager.java:139)
                                                                                        at com.journeyapps.barcodescanner.camera.CameraInstance$4.run(CameraInstance.java:171)
                                                                                        at android.os.Handler.handleCallback(Handler.java:789)
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                        at android.os.Looper.loop(Looper.java:164)
                                                                                        at android.os.HandlerThread.run(HandlerThread.java:65)
02-15 17:52:05.078 11944-11944/com.example.android.purchase_order D/CameraPreview: pause()

What am I missing?Thanks.

  • tribulationalinstitute.com
READ ALSO
How to get a callback in activity when a new google/yahoo or other account get added to mobile?

How to get a callback in activity when a new google/yahoo or other account get added to mobile?

I need to get the callback when an user adds account to mobile through settingsI am trying to use Sync Adapter but unable to get it

122
how to set header Connection:keep-alive to Connection:close in a rest API

how to set header Connection:keep-alive to Connection:close in a rest API

I am working on a project where I need to send a header which is called connection:close right now it is sending by default connection:keep-alive so when I am passing a custom header in postman but it is no more workingbelow I have attached a snapshot...

204
Improve Firestore Offline cache - Android

Improve Firestore Offline cache - Android

So half of my application relies quite a bit on Firestore

155
FargmentTransaction is not working

FargmentTransaction is not working

In my code, I want to switch fragments through ImageView onClickI wrote the code for it but my app closes if I click on the image

136