Skip to content

Pausing and detaching causes crash on Android #61

@mrfrasier

Description

@mrfrasier

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions