I'm implementing a feature in an android app that scans a QR code and does some stuff with the data returned.
My current solution is to request the scan activity from the zxing package.
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, REQUEST_QR_SCAN);
However when the app isn't present on a user's phone, this will not work and causes an error. I want to avoid checking if the user has this specific app installed, as they may have opted for a different QR Scanner.
I can't seem to find a way of making the intent say "I want to scan a QR code" and then allowing the user to choose a suitable app. e.g. as they would if selecting an image from a gallery app.
Are there any solutions?