{"id":15458846,"url":"https://github.com/nisrulz/qreader","last_synced_at":"2025-04-05T05:09:45.563Z","repository":{"id":49444718,"uuid":"53607983","full_name":"nisrulz/qreader","owner":"nisrulz","description":":white_square_button: [Android Library] Read QR codes using google's mobile vision api, but without the hassle","archived":false,"fork":false,"pushed_at":"2021-10-29T00:42:24.000Z","size":744,"stargazers_count":371,"open_issues_count":16,"forks_count":108,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-29T04:12:05.445Z","etag":null,"topics":["android","android-library","qrcode","reader"],"latest_commit_sha":null,"homepage":"http://nisrulz.github.io/qreader","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nisrulz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-10T18:36:51.000Z","updated_at":"2025-01-28T11:27:13.000Z","dependencies_parsed_at":"2022-08-30T06:11:14.335Z","dependency_job_id":null,"html_url":"https://github.com/nisrulz/qreader","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fqreader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fqreader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fqreader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fqreader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nisrulz","download_url":"https://codeload.github.com/nisrulz/qreader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289429,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","qrcode","reader"],"created_at":"2024-10-01T23:02:36.903Z","updated_at":"2025-04-05T05:09:45.539Z","avatar_url":"https://github.com/nisrulz.png","language":"Java","readme":"![Image](img/github_banner.png)\n\n### Specs\n[![API](https://img.shields.io/badge/API-14%2B-orange.svg?style=flat)](https://android-arsenal.com/api?level=14)\n\n### Badges/Featured In\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-QREader-green.svg?style=true)](https://android-arsenal.com/details/1/3478)  [![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23121-blue.svg)](https://www.androiddevdigest.com/digest-121/)\n\n\n### Show some :heart:\n[![GitHub stars](https://img.shields.io/github/stars/nisrulz/qreader.svg?style=social\u0026label=Star)](https://github.com/nisrulz/qreader) [![GitHub forks](https://img.shields.io/github/forks/nisrulz/qreader.svg?style=social\u0026label=Fork)](https://github.com/nisrulz/qreader/fork) [![GitHub watchers](https://img.shields.io/github/watchers/nisrulz/qreader.svg?style=social\u0026label=Watch)](https://github.com/nisrulz/qreader) [![GitHub followers](https://img.shields.io/github/followers/nisrulz.svg?style=social\u0026label=Follow)](https://github.com/nisrulz/qreader)\n[![Twitter Follow](https://img.shields.io/twitter/follow/nisrulz.svg?style=social)](https://twitter.com/nisrulz)\n\nAndroid library which makes use of Google's Mobile Vision API to enable reading QR Code.\n\nThe 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.\n\n\u003e Requires Google Play Services\n\n# Changelog\nStarting with `1.0.4`, Changes exist in the [releases tab](https://github.com/nisrulz/qreader/releases).\n\n#Integration\nQREader is available in the Jcenter, so getting it as simple as adding it as a dependency\n\n- For gradle version \u003c 4.0\n\n    ```gradle\n    compile 'com.github.nisrulz:qreader:{latest version}'\n    ```\n\n- For gradle 4.0+\n\n    ```gradle\n    implementation 'com.github.nisrulz:qreader:{latest version}'\n    ```\n\nwhere `{latest version}` corresponds to published version in [ ![Download](https://api.bintray.com/packages/nisrulz/maven/com.github.nisrulz%3Aqreader/images/download.svg) ](https://bintray.com/nisrulz/maven/com.github.nisrulz%3Aqreader/_latestVersion)\n\n\n# Usage Docs\n\n### Steps\n\n1. Add a `SurfaceView` to your layout\n\n  ```xml\n  \u003cSurfaceView\n    android:id=\"@+id/camera_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:layout_above=\"@+id/info\"\n    /\u003e\n  ```\n\n1. Setup `SurfaceView` and `QREader` in `onCreate()`\n\n  ```java\n  // QREader\n  private SurfaceView mySurfaceView;\n  private QREader qrEader;\n  ..\n\n  @Override\n  protected void onCreate(final Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n    ..\n    ..\n\n    // Setup SurfaceView\n    // -----------------\n    mySurfaceView = (SurfaceView) findViewById(R.id.camera_view);\n\n    // Init QREader\n    // ------------\n    qrEader = new QREader.Builder(this, mySurfaceView, new QRDataListener() {\n      @Override\n      public void onDetected(final String data) {\n        Log.d(\"QREader\", \"Value : \" + data);\n        text.post(new Runnable() {\n          @Override\n          public void run() {\n            text.setText(data);\n          }\n        });\n      }\n    }).facing(QREader.BACK_CAM)\n        .enableAutofocus(true)\n        .height(mySurfaceView.getHeight())\n        .width(mySurfaceView.getWidth())\n        .build();\n\n  }\n  ```\n\n1. Initialize and Start in `onResume()`\n\n  ```java\n    @Override\n    protected void onResume() {\n      super.onResume();\n\n      // Init and Start with SurfaceView\n      // -------------------------------\n      qrEader.initAndStart(mySurfaceView);\n    }\n  ```\n1. Cleanup in `onPause()`\n\n  ```java\n    @Override\n    protected void onPause() {\n      super.onPause();\n\n      // Cleanup in onPause()\n      // --------------------\n      qrEader.releaseAndCleanup();\n    }\n  ```\n1. Some provided utility functions which you can use\n  + To check if the camera is running\n\n    ```java\n    boolean isCameraRunning = qrEader.isCameraRunning()\n    ```\n\n  + To stop `QREader`\n\n      ```java\n      qrEader.stop();\n      ```\n  + To start `QREader`\n\n      ```java\n      qrEader.start();\n      ```\n\n  \u003e ##### Check the included sample app for a working example.\n\n# Pull Requests\nI 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:\n  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.\n  2. If its a feature, bugfix, or anything please only change code to what you specify.\n  3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)\n  4. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.\n  5. Check for existing [issues](https://github.com/nisrulz/qreader/issues) first, before filing an issue.  \n  6. Have fun!\n\n### Created \u0026 Maintained By\n[Nishant Srivastava](https://github.com/nisrulz/nisrulz.github.io) ([@nisrulz](https://www.twitter.com/nisrulz))\n\n\u003e 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 :coffee:\n\u003e  + [PayPal](https://www.paypal.me/nisrulz/5)\n\u003e  + Bitcoin Address: 13PjuJcfVW2Ad81fawqwLtku4bZLv1AxCL","funding_links":["https://www.paypal.me/nisrulz/5"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisrulz%2Fqreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnisrulz%2Fqreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisrulz%2Fqreader/lists"}