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

Support zxing URI scheme [feature request] #148

Open
dlenski opened this issue Aug 1, 2022 · 1 comment
Open

Support zxing URI scheme [feature request] #148

dlenski opened this issue Aug 1, 2022 · 1 comment

Comments

@dlenski
Copy link

dlenski commented Aug 1, 2022

The no-longer-maintained ZXing Barcode Scanner app (com.google.zxing.client.android) supports a URI scheme that allows web apps to scan barcodes and retrieve the results…

As documented at https://github.com/zxing/zxing/wiki/Scanning-From-Web-Pages, these URIs look like the following:

  • http://zxing.appspot.com/scan?ret=http%3A%2F%2Ffoo.com%2Fproducts%2F%7BCODE%7D%2Fdescription&SCAN_FORMATS=UPC_A,EAN_13
  • zxing://scan?same_params

Basically, when one of these links is opened, an Android mobile browser will redirect to the app, scan a barcode, and then redirect back to the return UI specified, filling in query parameters like {RAWCODE} (the raw text of the barcoe) and {FORMAT} (e.g. QR).

I have used this facility in a couple of web apps I've written myself. (I'm also a contributor to the core ZXing library, and the maintainer of a Python wrapper for it.)


tl;dr It would be really great if this much more modern barcode scanning app would handle the ZXing URI schemes, since this would allow web apps that rely on this mechanism to continue working.

@dlenski
Copy link
Author

dlenski commented Aug 1, 2022

Here are where the intent filters for the ZXing URI schemes are defined in the ZXing Barcode Scanner app: https://github.com/zxing/zxing/blob/master/android/AndroidManifest.xml#L61-L88

And most of the implementation is in…

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

1 participant