QR code scanner using android studio - android

I am looking for a tutorial that shows how to make a Qr code scanner using Zxing and android studio, there are many on there internet but all of theme use eclipse, when i try to follow the same steps in android studio it doesn't work.

Thank you all for you responses , i find that there is an easy way to do that using build.gradle
here is the link :
http://www.lihongfei.com/integrate-zxing-in-android-studio/
there is a little bug to fix because the scan works for the first time , but not for the second.
just use this function to initiate the scan
public void performScan(){
IntentIntegrator scanIntegrator = new IntentIntegrator(this);
scanIntegrator.initiateScan();
}

Try this lib.
If wraps 2 popular libraries for QR code scanning for Android: ZXing and ZBar. Which to use - is up to you!

Related

Building a QR code scanning app on Android

I want to build a QR code scanner app, what can I use? And can anyone teach or send me a link/s on how to build it?
I recently had to create a QR code scanner app at work and I used Zxing library (zebra crossing). It is very easy to use and you can set the QR code scanner in a couple of minutes. I helped myself with this youtube video: https://www.youtube.com/watch?v=Fe7F4Jx7rwo
I hope this helps you!

Unavailable to use camera in Android

It's my first question but I will try to explain the problem properly. I am tring to use ZBar (Barcode reader) in my android app. I don't want to use another barcode reader installed on the phone but implement ZBar into my code. I tried tips from here on how this could be done.
The problem is I can't use hardware.Camera. I have attached a few print screens:
If you are using Android studio add in your gradle :
compile 'me.dm7.barcodescanner:zbar:1.8.4'
And read how to user: (Repo + Tutorial)
https://github.com/dm77/barcodescanner#zbar

ActivityNotFoundException while using ZXing

Android 2.3.3
As with most of the people using ZXing (new to using ZXing), I am getting the ActivityNotFoundException (I guess there is no need to paste my logcat as it's the same with all other people).
I have seen few questions related to ActivityNotFoundException with ZXing. Here is what I have understood so far. Please correct me if I am wrong..
If I have to use ZXing in my app, there are two options :
I can use the Intent and startActivityForResult(), if the user already has the ZXing application installed, and if doesn't, I can redirect him to the playstore to install it first and then use my application.
For my application to work, even if the ZXing application is not installed, I can add ZXing library to my project as a library, copy the code of IntentIntegrator class(from here) into a seperate class in my application and use IntentIntegrator. Is this the intended purpose of IntentIntegrator? or Am I getting it completely wrong?
Can someone help me with my doubts?
EDIT::: Seems like the second approach also needs to have the ZXing application installed on the device. Is there a way, that my application can work, without the need of ZXing app installation?
You haven't installed Barcode Scanner. Please use the IntentIntegrator as directed already in the documentation: https://code.google.com/p/zxing/wiki/ScanningViaIntent
It will handle installation for you.

ZXing Barcode Android library getting ClassNotFoundException

I am new to android. I am using zxing in my android project natively. I followed the steps here. But I get get classNotFoundException for capture activity of zxing lib when I call intent calling zxing android client. Also note that when I add capture activity project as library, firstly it adds properly, then when I say apply/ok & later see again then i see red x mark for this added lib. Even the src folder of added lib is not seen in source tab. I think there is some problem while adding lib but I don't know what & how to figure it out.
Please suggest.
Thank You.
The problem is that you are trying to use android/ as a library, and it is not a library. You are not supposed to copy this code and try to call it in your app. Instead, write your own app. Then integrate the core library (just core/) for decoding.
If you're new to all of this, you will probably have a lot of difficulty getting this working versus just integrating by Intent: http://code.google.com/p/zxing/wiki/ScanningViaIntent

Integrating Zxing 1.7 into Android app

I have compiled the Zxing core.jar and I have already added it to my Eclipse project, but I'm having trouble while trying to use the Zxing libraries I don't know where to start from. What I would like to do is to scan QR Codes directly from the device's camera. My actual app does show the camera preview in a SurfaceView, but it doesn't scan anything.
My question is how to actually scan from the camera? Without using the Zxing intent mechanism, I would like to embed Zxing directly into my project.
I'm a newbie, I would appreciate any kind of help you can provide me: code, links , etc. Thanks in advance.
The project has complete source code for Barcode Scanner in android/. You can just reference this.

Categories

Resources