Search code examples
androidqr-codezxingbarcode-scanner

how to import the ZXing library for my app for Encoding QR codes(while there is preinstalled ZXing scanner app for my mobile)


I am trying to do an app to create a final QR code for the information of multiple barcodes that I have scanned. I am wondering how would you import the ZXing lib to your code? Assume that user already has ZXing scanner in their mobile, can I just connect with the app to generate the barcode without importing all the lib since it will make my app heavy?

For importing , QRencoder.java from ZXing, what are the necessary part of codes that I need? Or is it even possible?

I found this two months ago : http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/ And I have tried installing that apache but it is so painful process for me. So is there any other ways around?

Regards

Thet


Solution

  • Yes, just use Intents. You don't need any code beyond the bit of integration code here: http://code.google.com/p/zxing/wiki/ScanningViaIntent The same class has methods for encoding a barcode on screen.