Skip to content
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

Switching between phonegap app and other app causes incomplete barcodes to scan #7

Open
jameswagoner opened this issue Oct 13, 2014 · 5 comments

Comments

@jameswagoner
Copy link

I start the app fresh and scan a few barcodes, working as expected. I then switch to the browser to lookup a url. Once I switch back the app and continue to scan (I have to click the scan button to reconnect), I only get first part of the barcode. I need to either restart the scanner or completely close the app and reopen it.

Is there any additions that should be added to ensure the scanner reconnects?

@warrenbell
Copy link

Reinitialize in a Cordova "on resume" event, assuming you are talking about opening up Safari directly and not in your scanning app with something like an inAppBrowser plugin.

@ahornsby
Copy link

I had that problem too, barcodes seemed to intermittently truncate 2 digits from the end. Have added the onResume event as per suggestion, so hopefully that will fix it. Thanks.

@ahornsby
Copy link

Still intermittently get the truncation problem when initially opening the app. The "on resume" or closing and re-opening it does fix it, but weird how it happens in the first place. It's consistently the last 2 digits of any barcode that are missing.

@jameswagoner
Copy link
Author

I can confirm the truncating of the last two characters. I am working on
the resume event as well. Glad to hear is does work.

Only problems I encounter with startup is occasionally I need to press the
scan button to get the app connected to the scanner or even restart the
scanner.

On Thu, Oct 16, 2014 at 3:50 AM, Andrew Hornsby [email protected]
wrote:

Still intermittently get the truncation problem when initially opening the
app. The "on resume" or closing and re-opening it does fix it, but weird
how it happens in the first place. It's consistently the last 2 digits of
any barcode that are missing.


Reply to this email directly or view it on GitHub
#7 (comment)
.

James Wagoner

@ahornsby
Copy link

Just to clarify, the resume event will fix the truncation only by resuming the app rather than having to close it completely. It hasn't stopped the truncation from randomly happening in the first place! Would like to be able to pin down what is causing it. Am wondering whether I need to reinitialize on each new page, or just periodically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants