Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include and use ZXing Library in Android with eclipse?

Tags:

android

I am new to the concept of ZXing,so i want to know the step by step process to use the ZXing in android and i am using elicpse as IDE.Any one knows about it please help me.

like image 733
Rajapandian Avatar asked Aug 14 '09 08:08

Rajapandian


1 Answers

As advised by the moderator, I am posting what did to import zxing into my android app, on this post. Seems like many people refer to this post to get an answer for zxing.

The zxing guys have made it easier to create a android project with 1.7. Its not as painful as it used to be. This is a quick blog for anyone who would like to create a zxing project for android quickly.

  • Checkout the zxing sources from zxing.org
  • Create a Android project on your eclipse
  • Delete main.xml
  • Right click on “src” directory and hit import. Browse to the following directories in the order mentioned. As you add them for import one by one, ensure that you have the src directory in the edit field of the import wizard. And that you select only the “com” directory on the left directory tree. Do not select src.
    • core
    • android-integration
    • android
    • Ensure that your android sdk version is 9, anything lesser and androidmanifest.xml will cry.
    • Strings.xml in one of the languages will crib, just put a / before the ‘ character

For the benefit of people,

  • I have a android hello world integrated with zxing 1.7 http://www.4shared.com/file/bFx8Y5Ys/zXingJune2010.html
  • Another blog that has interesting direction for integrating zxing http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/
like image 183
Siddharth Avatar answered Oct 01 '22 05:10

Siddharth