Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZXing how to scan QR-Code AND 1D barcode?

Tags:

People also ask

Can 1D barcode scanner scan QR codes?

QR codes consist of different squares, dots, hexagons, and other shapes to encode data. QR codes are best read by 2D barcode scanners. These codes cannot be read by standard or 1D barcode scanners.

How do I scan QR code with ZXing?

On click of button_scan_qr_code , CaptureActivity will start scanning using default camera. Once it scans any QR code, it sends back the result to onActivityResult the MainActivity . ZXing also provides online QR Code Generator. Enter the required fields, generate and scan it to get the results.

Can Iphone scan 1D barcode?

1D barcodes in iOS. Barcodes are said to have one dimension if there's a single line (such as a line traced by a scanner's laser) that can cross all lines of the symbol. iPhones don't have a built-in laser for scanning, but the single-line scanning can be emulated with the camera.


I just imported the ZXing library in my app, I know how to set up the putExtra function to scan QR-Code barcode:

INTENT = new Intent("com.google.zxing.client.android.SCAN");
INTENT.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(INTENT, 0);

and if I like to scan a 1D barcode:

INTENT = new Intent("com.google.zxing.client.android.SCAN");
INTENT.putExtra("SCAN_MODE", "PRODUCT_MODE");
startActivityForResult(INTENT, 0);

but how do I make the App able to scan both?? (1D and 2D barcode).

Thanks! Marco