zxing intent "google goggles" doesn't recognize barcodes

659 views Asked by At

I've made a little App for android with Zxing Intent, but it has a problem, because google goggles receives the Intent and do nothing, because it's not capable of decoding barcodes. Is there a way to restrict google goggles, but not other Barcode scanners?

1

There are 1 answers

0
Sean Owen On BEST ANSWER

Google Goggles does decode barcodes. Which Intent? You can restrict to Barcode Scanner by calling Intent.setPackage("com.google.zxing.client.android") though this would also exclude apps like Barcode Scanner+.

The better solution is to use the IntentIntegrator code supplied from the project. There you can supply the names of packages you want to include, and could use TARGET_ALL_KNOWN minus the Goggles packages if you wanted.