Possible Duplicate:
How to force using zxing lib with only my application?
I use zxing to scan QRCode in Android app. I use Intent to show it:
Intent intent = new Intent("com.google.zxing.client.android.healthcode.SCAN");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
It is working, but if I have more app installed that use Zxing lib, I have a list of app to open this intent.
How can I force my app to use my lib ? What is the best way ?
I can’t imagine you actually have two apps that respond to “com.google.zxing.client.android.healthcode.SCAN” since that is your own made-up string, so I assume that’s a typo. (If it isn’t you have more problems here, including using our namespace when you are not allowed to.)
The
Intentthat you are sending is wrong, it should be “com.google.zxing.client.android.SCAN’. UsesetPackage()to specify the app that should handle it. To use Barcode Scanner, set “com.google.zxing.client.android”.Better still, use the supplied
IntentIntegratorcode in the project inandroid-integration.