Reputation: 21
The goal is to have a QR code reader in a single application. The fallback plan is to use the Bardcode Scanner without having it die when the phone is rotated 90 degrees.
Initially, intents were used to call the zxing bardcode reader. However, that requires that the Barcode Scanner be installed as a separate application. We want users to be able to download one application. Additionally, when the Android Inspire phone was rotated 90 degrees, that caused the zxing Bardcode application to restart.
How should the zxing be integrated into a single Android application that can read QR codes? A eclipse project was created. The android/src was imported into the project. The core/src was imported into the project. It compiles. However, the call to the intent never comes back when calling the intent. Here are the lines:
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("com.google.zxing.client.android.SCAN.SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 1);
Thanks for any insight.
Upvotes: 2
Views: 5166
Reputation: 66866
http://code.google.com/p/zxing/wiki/ScanningViaIntent
This is how you integrate via Intent, which does not involve adding any source code. Your snippet is not right to call via Intent either; see above.
Upvotes: 6