18

So I'm working on a project, and I'm wondering if there is a way I can implement the barcode scanner into my android app? So it would go from my app, open the camera and take the "picture", get the info, and go back to my app with that info?

James
  • 5,622
  • 9
  • 34
  • 42

4 Answers4

11

Here is an example of a third-party library for scanning barcodes: https://github.com/zxing/zxing/wiki/Scanning-Via-Intent

dckrooney
  • 3,041
  • 3
  • 22
  • 28
  • 1
    Sean here from the project -- yep this is exactly what you want. Use IntentIntegrator. It's like 10 lines of code to do exactly what you want. – Sean Owen Apr 29 '10 at 22:25
4

As I am not an experienced Android developer, I don't know if you can talk back and forth between applications due to sandboxing. However, there is a barcode scanner called zxing which is "an open-source, multi-format 1D/2D barcode image processing library implemented in Java. Our focus is on using the built-in camera on mobile phones to photograph and decode barcodes on the device, without communicating with a server."

Seems pretty solid, so I would recommend using that.

JasCav
  • 34,458
  • 20
  • 113
  • 170
1

If you are more comfortable creating apps using App Inventor, there is a barcode module based off of the ZXing library: http://appinventor.googlelabs.com/learn/reference/components/other.html#BarcodeScanner

jjclarkson
  • 5,890
  • 6
  • 40
  • 62