-
Notifications
You must be signed in to change notification settings - Fork 23
Description
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?