yuriy-budiyev / code-scanner

Code scanner library for Android, based on ZXing
MIT License
1.09k stars 266 forks source link

Crash on google play pre-launch & also on production on clients devices #180

Open arbelkf opened 1 year ago

arbelkf commented 1 year ago

Great job, I have this error that keeps popping up on google play pre-launch and sometimes on real clients devices.

Exception java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera. (Camera.java:557) at android.hardware.Camera.open (Camera.java:402) at com.budiyev.android.codescanner.CodeScanner$InitializationThread.initialize (CodeScanner.java:829) at com.budiyev.android.codescanner.CodeScanner$InitializationThread.run (CodeScanner.java:815)

I have tried to check the code to see where the problem is - I think that the code on GitHub is different then the one when using the : implementation 'com.github.yuriy-budiyev:code-scanner:2.3.2'

I am pretty sure that this is not a permissions problem, I check permission before sending the Intent. maybe try-catch block on this function will be a fast solution.

please help, Thanks in advance