Nemesys
Nemesys

Reputation: 39

QR Reader for Android

I'm developing an app for Android that is a QR Reader. I've been googling and I've found Zxing, this recognizes a QR code in an image, but how can I do to capture this image directly from camera view?

Upvotes: 0

Views: 531

Answers (2)

Algar
Algar

Reputation: 5984

To work with the camera view you need a CameraSourcePreview and you need to bind this preview to the barcode tracker.

I haven't used ZXing my self but I'm constantly surprised that Google's own barcode class doesn't show up higher in the google search results than it does. I strongly recommend using this built in functionality available in Google Play services through the namespace com.google.android.gms.vision.barcode. It's fast and robust by parsing the barcodes locally and it supports all standard barcode formats.

A good resource to get started is Android QR Code Reader Made Easy. This will give you the app you (probably) want in no time! You will have full control of the source code and you can easily expand upon the example (or equally easily implement it in an existing project).

Upvotes: 0

RazrBoy
RazrBoy

Reputation: 353

I'm a newbie in the Android Space but I'd like to share what has worked for me.

The best way would be to Integrate ZXing's Barcode Scanner app into your app.

There are two ways you can do this :

  1. The Intents Method : This is the most simple and effortless way to get your app up and running in a few minutes. For this to work you must have zxing's app installed on your phone.

  2. The Native Method : A step-by-step guide on integrating your app with ZXing's Barcode Scanner app using the source-code shared by this beautiful open-source project. Using this method you can create a standalone app regardless of zxing's app installed on the phone.

Upvotes: 1

Related Questions