scanning QR code using ZXING library

Updated 27 November 2017


What is QR Code?

QR is an acronym for Quick Response. It’s a smarter version of the barcode, and it was originally developed in Japan for the automotive industry. Machines can read QR codes more quickly than barcodes, and QR codes can store more data in less space too.

Implementing QR Scanner by using ZXING Library- it provides easiest way to implement a QR code Scanner for developers.

following steps to use this library.

  1. add the dependency to app level build.gradle

    • Add a “QRCodeReaderView” in the layout editor like you actually do with a button for example.
    • In your onCreate method, you can find the view, as usual, using findViewById() function.
    • Create an Activity which implements,onQRCodeReadListener and let implements required methods or set a onQRCodeReadListener to the QRCodeReaderView object.

  2. Make sure you have camera permissions in order to use the library.
  3. Start & Stop camera preview in onPause() and onResume() overriden methods.
  4. You can place widgets or views over QRDecoderView.



. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • Android Team
  • Raju Shingadiya
  • Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home