Reputation: 2139
I have included Zxing barcode reader from source in my application. Everything is working alright, Except the barcode reader quits after successfully reading the barcode. It does not throw any errors and my applications onActivityResult
is not even called.
How I'm calling Zxing:
Intent intent = new Intent("com.aeon.android2chrome.android.SCAN");
Intent.putExtra("com.google.zxing.client.android.SCAN.SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
Note : I'm using com.aeon.android2chrome
(my package) so that the phone does not ask which barcode reader to open with if zxing is already installed. I have appropriately changed that in the Zxing manifest.
I also get a weird error in the log
02-04 20:29:46.710: W/IInputConnectionWrapper(29716): showStatusIcon on inactive InputConnection
No other errors. Could someone please give me a few points on what is wrong or what could be wrong?.
Upvotes: 2
Views: 253
Reputation: 2139
After alot of scratching my head, I have found the problem. The problem was I had the tag android:noHistory="true"
in my activity's manifest. removing it fixed the problem
Upvotes: 2
Reputation: 393771
I think I had a similar problem when trying to include the Zxing source code. I solved it by using the zxing.integration.android package which opens the BarCode scanner application (or shows the user a link to install it). It's a better and cleaner practice to open the installed BarCode scanner application and not use some not-up-to-date source version you happened to download.
Upvotes: 1