question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle QR code scan intents

See original GitHub issue

At first, thanks for this great app! It looks a lot nicer than the original Barcode Scanner app from zxing while being at least as powerful and fast!

One downside I noticed while using BinaryEye is that most of the apps calling a QR Code reader application use the native Barcode Scanner intent (com.google.zxing.client.android.SCAN), which is not handled by BinaryEye. I would find it very useful to be able to select BinaryEye as a target application for scanning QR Codes. Sadly, there does not seem to exist an package-independant Intent for querying any installed QR code scanner apps.

A quite simple workaround would be to add a new intent filter with the same name as Barcode scanner and handle it inside CaptureActivity.java.

What do you think of such a functionality? I would be willing to look into it, but I wanted to discuss it here first.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
ialokimcommented, Aug 27, 2019

AFAIK, it did not open for the QR code scan intend of Firefox for Android: (mostly tested with Firefox for Android)

and (from #10):

I’m using syncthing from fdroid. When trying to add another device via QR code, the app asks if barcode reader should be installed (it even specifically asks for/suggests zxing) even though BinaryEye (also from fdroid) is installed. This does not happen if zxing is installed.

This happens because most likely Firefox and Syncthing (and most other apps) are using the IntentIntegrator from the ZXing library. Inside this Java file, all apps “known to respond properly to the intent” are hardcoded.

So, in my opinion the way to go is:

  • properly evaluate the intent’s extra options within BinaryEye (which appears to be nothing but SCAN_FORMATS and SCAN_CAMERA_ID)
  • create a PR for the ZXing library to include BinaryEye as a compatible application
  • create PRs for all apps using the IntentIntegrator.java class (most likely copies of ZXing’s one)

Edit:

1reaction
rugkcommented, May 21, 2019

AFAIK, it did not open for the QR code scan intend of Firefox for Android: (mostly tested with Firefox for Android) See https://support.mozilla.org/kb/scan-qr-codes-firefox-android

IMHO, you should really implement this, as the original ZXing app is not so nice and buggy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scan QR Code To Open Specific Content In An App
In this article we are going to discuss how we can scan QR code to open specific content in an app. Consider an...
Read more >
Get barcode | Documentation - Android Developers
Open a barcode or QR code scanner. Locale support. Functionality, Locales. Preview creation using App Actions test tool, en-US.
Read more >
How to use the Barcode Data Intent? - Technical Support Portal
The Intent API can be used to manage the barcode scanner as with using the Datacollection BarcodeReader class, but without the need to ......
Read more >
Generate QR code in Android that handles Intent
Create a simple activity which has a single button Scan QR. You can use any open-source library to scan the data in a...
Read more >
Integrate a QR code scanner in my Android app or call one via ...
IMO, the UX may be better, but with the slight risk of potential issues in the future. (The ZXing team also prefers that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found