My application uses the ZXing barcode scanner using the ZXing helper classes IntentIntegrator and IntentResult.
Now I found that there are no more scan results sent from ZXing, the associated return values ββare empty / null.
So I updated to the latest helper classes http://code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentIntegrator.java and http : //code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentResult.java
Now my onActivityResult method is called immediately after starting ZXing - of course, with an empty result again.
My code is pretty simple, the scan starts like this:
if (v==scanButton) { com.google.zxing.integration.android.IntentIntegrator integrator = new IntentIntegrator(this); integrator.initiateScan(); }
and getting the results this way:
public void onActivityResult(int requestCode, int resultCode, Intent intent) { com.google.zxing.integration.android.IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent); if (scanResult != null) { String format; format=scanResult.getFormatName(); if ((format!=null) && (format.length()>0)) { if ((format.equals("EAN_8")) || (format.equals("EAN_13")) ||(format.equals("UPC_A")) ||(format.equals("UPC_E"))) getEANData(scanResult.getContents()); } } }
My android has the latest ZXing code installed. Any ideas why this is no longer working?
source share