You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sample app avoids this by only inflating the layout when the camera permission is given.
We are migrating this library into our project and this would allow us to quickly port everything without rewriting all the view logic.
You can emulate this quickly by moving the line below from initQRCodeReaderView() to onCreate() while keeping the content variable as a class member variable:
The sample app will then crash (after quickly displaying a single camera frame) with:
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IllegalArgumentException: Both dimensions must be greater than 0
at com.google.zxing.common.BitMatrix.<init>(BitMatrix.java:50)
at com.google.zxing.common.GlobalHistogramBinarizer.getBlackMatrix(GlobalHistogramBinarizer.java:91)
at com.google.zxing.common.HybridBinarizer.getBlackMatrix(HybridBinarizer.java:86)
at com.google.zxing.BinaryBitmap.getBlackMatrix(BinaryBitmap.java:85)
at com.google.zxing.qrcode.QRCodeReader.decode(QRCodeReader.java:77)
at com.dlazaro66.qrcodereaderview.QRCodeReaderView$DecodeFrameTask.doInBackground(QRCodeReaderView.java:355)
at com.dlazaro66.qrcodereaderview.QRCodeReaderView$DecodeFrameTask.doInBackground(QRCodeReaderView.java:329)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered:
The sample app avoids this by only inflating the layout when the camera permission is given.
We are migrating this library into our project and this would allow us to quickly port everything without rewriting all the view logic.
You can emulate this quickly by moving the line below from
initQRCodeReaderView()
toonCreate()
while keeping the content variable as a class member variable:The sample app will then crash (after quickly displaying a single camera frame) with:
The text was updated successfully, but these errors were encountered: