QRUtils is a set of pre-built, customizable UI components for creating and reading QR codes. It provides different libraries for creating, scanning and reading QR codes. Installation is easy and implementation is easier.
- A customized QR code on the device's screen in a single line of code
- A fully functional QR scanning activity to launch in 1 to 3 lines of code
- Customization more than you'll probably need
This README will guide you through. Good luck!
QRUtils provides separate modules for different functionalities. All the modules listed here are concerned with creating or reading QR codes. See individual instructions for each module to know more:
QRView is a custom Android View that facilitates the generation of customized QR codes in as less as 3 lines of code. It can even generate QR codes directly from XML attributes. Forget 300 lines of code and multiple classes. This library is all you need. Read more about implementation and usage of QRView here.
QRActivity is a customizable, pre-built QR scanner activity which you can be built with required parameters and launched in order to scan or read QR codes. Other features include flashlight toggle and file picker to read QR codes from image files. Read more about implementation and usage of QRActivity here.
In your app/build.gradle
file add a dependency on one of the QRUtils libraries.
dependencies {
// QRView : for generating QR codes
implementation 'chtgupta.qrutils:qrview:0.1.0'
// QRActivity : for reading QR codes
implementation 'chtgupta.qrutils:qractivity:0.1.0'
}
To get started, see the individual instructions for each module:
There is a sample app in the app/
directory that demonstrates most
of the features of QRUtils. Load the project in Android Studio and
run it on your Android device to see a demonstration.
If you encounter a version incompatibility error between Android Studio and Gradle while trying to run the sample app, try disabling the Instant Run feature of Android Studio. Alternatively, update Android Studio and Gradle to their latest versions.
A note on importing the project using Android Studio: Using 'Project from
Version Control' will not automatically link the project with Gradle
(issue #1349).
When doing so and opening any build.gradle.kts
file, an error shows up:
Project 'QRUtils-Android' isn't linked with Gradle
. To resolve this
issue, please git checkout
the project manually and import with Import from external model
.
- Fork it
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that I can review changes
- 0.1.0
- Initial release
- Liked my work? Star it to show support!
- Used it in your app? Let me know and I'll include your app name, logo and link in this repository.
- Want to take this to another level? Read
CONTRIBUTING
again!
Chahat Gupta – @chtgupta – admin@speakapp.me
Distributed under the APACHE 2.0 license. See LICENSE
for more information.