In my application I need to read Qr code. I searched the net and found Zing codes however lots of developers had problem with using it and it seems it is buggy!
If i assume that my customers has qr reader installed on their device, how can i use those applications and call them via implicit intents?
if user doesn't have any qr reader, what will happen to the application? if it crashes, may i ask user to download for example QrDroid and after that use it?
In android studio, You can use bellow process to create & Read QR Code &image look like bellw
Add library in app.gradle
In activity.main xml use bellow..
In MainActivity you can use bellow code
You can download full source code from GitHub. GitHub link is : https://github.com/enamul95/QRCode
Zxing is an excellent library to perform Qr code scanning and generation. The following implementation uses Zxing library to scan the QR code image Dont forget to add following dependency in the build.gradle
Code scanner activity:
Use a QR library like ZXing... I had very good experience with it, QrDroid is much buggier. If you must rely on an external reader, rely on a standard one like Google Goggles!
Easy QR Code Library
A simple Android Easy QR Code Library. It is very easy to use, to use this library follow these steps.
For Gradle:
Step 1. Add it in your root build.gradle at the end of repositories:
Step 2. Add the dependency:
For Maven:
Step 1. Add the JitPack repository to your build file:
Step 2. Add the dependency:
For SBT:
Step 1. Add the JitPack repository to your build.sbt file:
Step 2. Add the dependency:
For Leiningen:
Step 1. Add it in your project.clj at the end of repositories:
Step 2. Add the dependency:
Add this in your layout xml file:
Add this in your activity java files:
For customized scanner screen just add these lines when you start the scanner Activity.
You are done. Ref. Link: https://mrasif.github.io/easyqrlibrary
and in
onActivityResult():
Interestingly, Google now introduced Mobile Vision APIs, they are integrated in play services itself.
In your Gradle file just add:
Taken from this QR code tutorial.