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

Problem with looping the http://zxing.appspot.com/scan function #844

Closed
cooperk937 opened this issue Aug 9, 2017 · 1 comment
Closed

Comments

@cooperk937
Copy link

Hi,

I love ZXing and have used it for a few projects now. My most recent problem is a bit trickier. I want to make a web browser that links to http://zxing.appspot.com/scan to retrieve barcode data.

It works perfectly, until I try to run the function twice, even with a few seconds gap in between.

To prove my error, I have created 2 files; index.html and return.html and you can experience this here:
http://karl-cooper.co.uk/zxingtest/v1/

The first one always works, the second one never does, you are greeted with 'you need to install free Barcode Scanner -app' even though I obviously have it as I used it seconds ago.

File sources are as follows:
index.html (this is used to start the loop)
<a style="font-size:52px;" href="http://zxing.appspot.com/scan?ret=http%3A%2F%2Fwww.karl-cooper.co.uk%2Fzxingtest%2Fv1%2Freturn.html%3Fcode%3D%7BCODE%7D&SCAN_FORMATS=CODE_39,CODE_93,CODE_128,DATA_MATRIX,ITF,CODABAR,EAN_13,EAN_8,UPC_A,QR_CODE">Click here to start recursive scanning</a>

return.html (this is used to continue the loop)
`Thank you for the data from the barcode, now I will send the user back to read another!

<script> setInterval(function() { window.location.href = "http://zxing.appspot.com/scan?ret=http%3A%2F%2Fwww.karl-cooper.co.uk%2Fzxingtest%2Fv1%2Freturn.html%3Fcode%3D%7BCODE%7D&SCAN_FORMATS=CODE_39,CODE_93,CODE_128,DATA_MATRIX,ITF,CODABAR,EAN_13,EAN_8,UPC_A,QR_CODE"; }, 3000 ); </script>`

PLEASE NOTE THAT I TESTED THIS ON A SAMSUNG GALAXY S7 AND IT ISN'T WORKING.

@srowen
Copy link
Contributor

srowen commented Aug 9, 2017

I don't think that will work, but it's not related to the app. URIs you open that way aren't handled by Intents, I think. But if you can suggest a concrete change, reopen this.

@srowen srowen closed this as completed Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants