To clarify that (since the original posting is quite old): My app makes use of ZXing barcode scanner using the ZXing helper classes IntentIntegrator and IntentResult, no other things are used because it has to be compatibl with API version 7:
I'm using the latest helper classes from
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
Using them my onActivityResult method is called immediately after ZXing is started - of course with an empty result again. When ZXing finishes reading the barcode (much later), no more results are sent back to my app.
My code is quite simple (and copied out of the inline documentation of the IntentIntegrator), scanning is started this way:
if (v==scanButton)
{
com.google.zxing.integration.android.IntentIntegrator integrator = new IntentIntegrator(this);
integrator.initiateScan();
}
...and fetching 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());
}
}
}
On my android the latest ZXing code from Google Playstore is installed.
On Wed, Nov 28, 2012 at 7:08 AM, Satz Klauer <
satzk...@googlemail.com> wrote:
> @Lachezar: what fragments?