-
Notifications
You must be signed in to change notification settings - Fork 23
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
Pausing and detaching causes crash on Android #61
Comments
Certainly looks like a bug, can you share crash log from adb logcat. Meanwhile i will also check if i can find some workaround for your usecase. |
Of course. I can't attach docs here, but here it is on pastee: |
Hi: I looked at your paste... but I could not find any crash there. Are you sure you did not have any filters on logcat like appName or log level. |
Sorry, missed your response. There doesn't seem to be anything in the log when it crashes, but I'll try it again. |
Hi, on my end all I see the is app die. Have you found anything in the code? |
Hey , thanks for sharing the crash. Let me have a look at the code.... Will get back ASAP. |
Thank ya |
Well, naturally not ideal, but if anyone else runs into this, I solved it by just using a Video object and sampling the bitmap data to the Scanner.scanBitmapData() method |
Hi, |
Wow old post haha, but I solved it by using a different class on Android. I created a video object to use and render the camera. Then on a timer I take a snapshot from the camera object and pass that to the QR reader ANE to analyze |
For my application, users can scan QR codes back to back. I pause in between each scan (calling detach and pausePreview on scan), display a confirmation for about a second, then resume preview and reattach.
Works fine on iOS, but on Android calling resumePreview doesn't do anything. My workaround for android is to only call detachScannerFromPreview (to prevent rapid scanning before the user can move on to the next QR code) and then call attachScannerToPreview() after a second or so (leaving the preview active).
This works for about 2-3 scans before simply crashing each time.
Firstly, am I doing this right? Is detaching and pausing the right way to accomplish what I'm looking to do? If so, any ideas why it doesn't work on Android and why calling detach and attach a few times causes a crash?
The text was updated successfully, but these errors were encountered: