Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use zxing core as library on my Android project?

Tags:

android

I'm building the Android scanning app using zxing library. I have built the zxing core and included the core.jar into my application build path. I don't want to use the intent solution provided in this url "http://code.google.com/p/zxing/wiki/ScanningViaIntent".

My question is: How can I open the camera, capture the contentious images and pass to zxing core library to decode it, when the decode method return the success stop the camera and print the result?

I found the following link useful for me: http://www.arp123.com/post/Identified-in-the-Android-use-ZXing-barcode-QR-Code.html But I'm having problems in continuous scanning. When compared to zxing 1.6 Android barcode scanner app my solution is not good. If someone can help me or guide me to sort this out I would really appreciate it.

like image 568
Sam Avatar asked Feb 15 '11 11:02

Sam


1 Answers

What I did was to export the core folder to a jar and use as a library in my project. Them from the android client folder I use the camera package and the most of the classes from the client.android package (only one activity remained though, captureActivity). I deleted the encode, history, result, share and wifi package and removed any references of this packages in the camera or android package.

I took the remaining classes (camera and android classes) and I integrated them into my project

thanks

like image 171
omega Avatar answered Oct 12 '22 07:10

omega