Source link: https://github.com/nisrulz/qreader


Badges/Featured In

Show some ❤?

Android library which makes use of Google's Mobile Vision API to enable reading QR Code.

The library is built for simplicity and ease of use. It not only eliminates most boilerplate code for dealing with setting up QR Code reading , but also provides an easy and simple API to retrieve information from QR Code quickly.

Requires Google Play Services


Starting with 1.0.4, Changes exist in the releases tab.

#Integration QREader is available in the Jcenter, so getting it as simple as adding it as a dependency

  • For gradle version < 4.0

    compile 'com.github.nisrulz:qreader:{
    latest version
  • For gradle 4.0+

    implementation 'com.github.nisrulz:qreader:{
    latest version

where { latest version } corresponds to published version in

Usage Docs


  1. Add a SurfaceView to your layout
  1. Setup SurfaceView and QREader in onCreate()
// QREader private SurfaceView mySurfaceView; private QREader qrEader; ..  @Override protected void onCreate(final Bundle savedInstanceState) {



 // Setup SurfaceView
// -----------------
mySurfaceView = (SurfaceView) findViewById(R.id.camera_view);

 // Init QREader
// ------------
qrEader = new QREader.Builder(this, mySurfaceView, new QRDataListener() {

  public void onDetected(final String data) {

 Log.d("QREader", "Value : " + data);

 text.post(new Runnable() {


public void run() {









  1. Initialize and Start in onResume()
protected void onResume() {


// Init and Start with SurfaceView
  // -------------------------------

  1. Cleanup in onPause()
protected void onPause() {


// Cleanup in onPause()
  // --------------------

  1. Some provided utility functions which you can use
  • To check if the camera is running

    boolean isCameraRunning = qrEader.isCameraRunning()
  • To stop QREader

  • To start QREader

Check the included sample app for a working example.

Pull Requests

I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:

  1. Match coding style (braces, spacing, etc.) This is best achieved using CMD+Option+L (Reformat code) on Mac (not sure for Windows) with Android Studio defaults.
  2. If its a feature, bugfix, or anything please only change code to what you specify.
  3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
  4. Pull requests must be made against develop branch. Any other branch (unless specified by the maintainers) will get rejected.
  5. Check for existing issues first, before filing an issue.
  6. Have fun!

Created & Maintained By

Nishant Srivastava ( @nisrulz)

If you found this library helpful or you learned something from the source code and want to thank me, consider buying me a cup of ☕?

  • PayPal
  • Bitcoin Address: 13PjuJcfVW2Ad81fawqwLtku4bZLv1AxCL


Tap Bar with infinite scrolling.

A cool and elegant Submit Button.

A PaperShredder view for android.

Endless support for RecyclerView.

An Android text view with scrolling text change animation.

Minimalist, annotation based, hook framework for Android built on top of AspectJ.


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