b1zantine / ZXing-Orient

An Barcode Scanner Library based on the ZXing Library with support for Portrait Orientation.
Apache License 2.0
74 stars 24 forks source link

ZXing Orient Download Android Arsenal

An Android Library based on ZXing Library with support for Portrait Orientation and some cool stuffs.

Screenshots

Portrait Screenshot Landscape Screenshot

Demo App

Get it on Google Play

Basic Setup

  1. Provide the gradle dependency

    compile 'me.sudar:zxing-orient:2.1.1@aar'
  2. Start the Scanner

    new ZxingOrient(MainActivity.this).initiateScan();
  3. Handle the Result

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent intent){
    
        ZxingOrientResult scanResult = 
                           ZxingOrient.parseActivityResult(requestCode, resultCode, intent);
    
        if (scanResult != null) {
            // handle the result
            ...
        }
        ...
    }

Note : In API 23 and above, don't forget to request permission for Manifest.permission.CAMERA before calling ZXing Orient.

Advanced Setup

Generate QR Codes

To generate QR codes add this line when necessary

new ZxingOrient(thisActivity).shareText("Some Random Text");

License

This library is available under the Apache License, Version 2.0.