ZXing Orient


Source link: https://github.com/SudarAbisheck/ZXing-Orient

ZXing Orient

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

Screenshots

Demo App

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

  • Selection of Specific Barcode Types:

    void initiateScan(Collection<String> desiredBarcodeFormats);
      void initiateScan(Collection<String> desiredBarcodeFormats, int cameraId)

    Some Formats include:

    Barcode.PRODUCT_CODE_TYPES /** Collection of UPC_A, UPC_E, EAN_8, EAN_13, RSS_14 **/  Barcode.ONE_D_CODE_TYPES /** Collection of UPC_A, UPC_E, UPC_EAN_EXTENSION, EAN_8, EAN_13,  
    
    CODABAR, CODE_39, CODE_93, CODE_128, ITF, RSS_14, RSS_EXPANDED **/  Barcode.TWO_D_CODE_TYPES /** Collection of QR_CODE, DATA_MATRIX, PDF_417, AZTEC **/
    Barcode.EAN_8  Barcode.RSS_14 Barcode.CODABAR ...  Barcode.QR_CODE Barcode.DATA_MATRIX ...

    For all other supported types, take a look at Barcode.java

  • Selection of Camera

    void initiateScan(int cameraId);
      void initiateScan(Collection<String> desiredBarcodeFormats, int cameraId);
    
  • UI Settings

    ZxingOrient integrator = new ZxingOrient(MainActivity.this);
     integrator.setIcon(R.drawable.custom_icon)
    // Sets the custom icon .setToolbarColor("#AA3F51B5")
    
     // Sets Tool bar Color .setInfoBoxColor("#AA3F51B5")
    
     // Sets Info box color .setInfo("Scan a QR code Image.")
    // Sets info message in the info box .initiateScan(Barcode.QR_CODE);
      new ZxingOrient(Activity.this) .showInfoBox(false) // Doesn't display the info box   .setBeep(false)  // Doesn't play beep sound .setVibration(true)  // Enables the vibration .initiateScan();
    
    

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.

Resources

Virtual Gamepad: Use computer keyboard to play AndroidPhone Games.

A small library to simplify RecyclerView adapter by using auto mapping item view with model.

Lumberjack - a customisable file/notification/console logger for Timber (each functionality is packed into it's own module)

Smart app rate dialog for Android which takes user rating into consideration. If the user rates the app below the defined threshold rating, the dialog will change into a feedback form. Otherwise, It will take the user to the Google PlayStore.

FloatingView can make the target view floating above the anchor view with cool animation.

Shows a DialogFragment with Camera or Gallery options. The user can choose from where provider wants to pick an image.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes