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

Creating a Pass by scanning a barcode doesn't work #343

Open
guerda opened this issue May 12, 2021 · 4 comments
Open

Creating a Pass by scanning a barcode doesn't work #343

guerda opened this issue May 12, 2021 · 4 comments

Comments

@guerda
Copy link
Contributor

guerda commented May 12, 2021

I want to create a pass by scanning an existing barcode.
I have the Zxing barcode scanner installed. Once I press the scan barcode button, the app asks me if I want to install the Barcode Scanner app.
It is already installed but PassAndroid cannot detect it or cannot open it.

Screenshot_20210512-093036

I tried uninstalling and reinstalling the barcode scanner app, but to no avail.

Android 11
Zxing barcode scanner 4.7.8
PassAndroid. 3.5.7 (fdroid)

@ioogithub
Copy link

Yes, I can confirm this feature doesn't work at all. I have the barcode scanner app already installed, it always asks me to install it again. There is no way to actually scan a barcode and import it into the app.

I also tried to cut and paste the output from a barcode into the text field but this also did not work as it generates a barcode completely different.

Scanning needs to work, until then I can't create any files with the app.

@f69m
Copy link

f69m commented Jun 21, 2022

Same issue here, does not detect that Barcode Scanner is installed and asks to install it over and over again.

@nomis
Copy link

nomis commented May 25, 2023

The queryIntentActivities() call is returning no apps for com.google.zxing.client.android.SCAN (on Android 13).

If I ignore this and explicitly use com.google.zxing.client.android as the package then it works.

If I don't set a package then I get prompted for installed barcode scanner apps:

  • Barcode Scanner (com.google.zxing.client.android) works
  • Binary Eye (de.markusfisch.android.binaryeye) causes PassAndroid to crash when receiving a response

If I use an intent that doesn't match any installed apps then PassAndroid crashes, but handling this is probably the best way to detect if the app is installed when querying for it doesn't work.

@Invisi
Copy link

Invisi commented Sep 18, 2023

I've managed to get queryIntentActivities() to return the apps again by adding the following to the AndroidManifest.xml:

<queries>
    <intent>
        <action android:name="com.google.zxing.client.android.SCAN"/>
    </intent>
</queries>

Probably a good idea to add the other used intent as well:

<intent>
    <action android:name="com.google.zxing.client.android.ENCODE"/>
</intent>

Unfortunately I'm neither a Java/Kotlin nor an Android dev, so I'm not entirely sure whether that breaks on other systems or versions aside from mine. Same goes for the second intent, it's likely missing other details.

Related SO answer: queryIntentActivities returning empty list in android 11

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

5 participants