Reputation: 3049
I am having problems using zxing library. I do everything as in this answer. And then to use library I used this tutorial. So I added core.jar in my app and a library zxing. I try to use it with this code
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
And when I compile and start my app and press button which calls this code, I get unexpected error and everything is just shut down. If I have a bar code scanner installed on my device and if I dont use this library, it works fine. But I have to use the app with phones without Internet connection, so I have to get this library working.
Thanks
Upvotes: 0
Views: 625
Reputation: 66866
The exception is ActivityNotFoundException
. You are not checking to see if Barcode Scanner is installed. No, you do not need to modify your Manifest.
What you should do is use the provided instructions for integrating by Intent instead of trying to roll your own. Use IntentIntegrator
: http://code.google.com/p/zxing/wiki/ScanningViaIntent
Upvotes: 1