How to integrate ZXING in Android App

89 views
Skip to first unread message

Sergio Luceno

unread,
Dec 21, 2010, 8:02:01 AM12/21/10
to zxing
Hi!

I'm workin in an Android app which has to decode Qr codes.

I know that I can call the barcode scanner via intent to scan the code
and obtain the result into my application. But i don't wanna force
users to have two applications installed....

What I would like to do is:

Take a picture with the application which I am developing.

Install some Zxing libraries, so I will able to do something like...
Result = ZxingLibrary.decodeQR(my_photo);

I've been 3 days trying to do this... but i didn't find how...

Maybe I am trying to do something impossible? Can someone help me?

Sorry if i made mistakes writing, i'm not good at all with English....

Thanks in Advance!

Lachezar Dobrev

unread,
Dec 21, 2010, 4:54:53 PM12/21/10
to zx...@googlegroups.com
Not impossible at all!
Although I can not reveal any code directly I can tell you I have
successfully done that.

A few pointers that I've «borrowed» from the Barcode Scanner application:
Ditch taking pictures. Use the camera preview. While much lower
resolution, the preview can handle many more frames per second, that
enhances the success rate dramatically.
Consider following the Barcode Scanner's main view layout idea: have
the camera preview run on a background surface that takes up the whole
screen, and set up controls overlaying it.
I urge you not to blindly copy Barcode Scanner's code, but read and
learn from it.

However... 3 days is barely enough to get you started. Have patience.

2010/12/21 Sergio Luceno <sluc...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages