Shark
Shark

Reputation: 165

ZXing Integration Manual/ help finding other functions

Is there any detailed manual for ZXing library integration? I have already successfully integrated the appusing intents .. but the way i understood it was NOT by looking at the ZXing site(wiki), frankly i read that man page a dozen times and i couldn't figure out how to work it. During my search i found a blog where someone had given the source code for a basic scanner. I finally understood how to call ZXing app from there using:

Intent intent = new Intent(
                    "com.google.zxing.client.android.SCAN");

And i receive data from the app using:

final String code = intent.getStringExtra("SCAN_RESULT");
final String format = intent.getStringExtra("SCAN_RESULT_FORMAT");

My doubt: Are there anymore calls that return other kinds of data. For example just after scanning , there's a piece of text that say stuff like "Plain text found" or "Item found" . can i have this returned to my app via intents?. I've googled a lot on this and also search SE but havent found anything. I know there's a Wiki for this (but I've found nothing like the above posted code there! :S ) Any kind of help will be appreciated! Thanks in advance!

Upvotes: 0

Views: 691

Answers (1)

Sean Owen
Sean Owen

Reputation: 66886

This is all you need to know: http://code.google.com/p/zxing/wiki/ScanningViaIntent I take it you already found it. Did you try it -- what do you mean you couldn't figure out how to work it? It's a few lines of code.

You are trying to manually recreate what the integration code already does for you. You don't need to do what you are trying to do above, which is why the official docs don't tell you to do this. It's easier.

Everything you're asking is already addressed on that page. For example, see the javadoc for the class:

http://code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentIntegrator.java

http://code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentResult.java

Upvotes: 1

Related Questions