PassAndroid
PassAndroid copied to clipboard
Creating a Pass by scanning a barcode doesn't work
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.
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)
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.
Same issue here, does not detect that Barcode Scanner is installed and asks to install it over and over again.
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.
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