How to limit ZBar QR code reader to only detect QR codes? - android

I have implemented ZBar reader in my android application and are only using it to read QR codes. How can I limit ZBar to only detect QR codes?

I found the answer randomly an another ZBar question answer by #Sydwell
The following code solves the problem:
scanner = new ImageScanner();
// Only enable the codes your app requires
scanner.setConfig(Symbol.QRCODE, Config.ENABLE, 1);

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

QR code scanner using android studio

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!

How to use ZXing library without installing barcodescanner app

I have been developing an android app to scan the barcode and QR code and send the results to some other application (HTTP). I have read most of the documentation over internet and here in stack over flow and got it working. I could able to run the stand alone zxing android app on my device, also I could run my own separate android app to use Zxing intent to scan the bar code.
But even after reading so many questions here and some of the blogs in internet, I could not get my strict requirements.
I want to achieve following things.
1. I do not want to install a separate barcode scanner app in my device to get my own app to work (to scan the barcode).
2. I used following code
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
startActivityForResult(intent, 0);
and when I run the app in my devide, it asks 'Select the application to complete this action' and it shows 'Google' and 'Google Goggles' and it opens the Google page default camera and scans the barcode. I wanted CaptureActivtiy default capturing page to come (not Google's one) to scan the bar code.
3. I have tried using ZXing in my own app as library but it did not work.
Could you please tell where exactly I am going wrong to get this done ?
I found "zxing" complicated to use. Then I tried with "ZBar Android Version Library". It was so simple.
You can download the library from here: http://sourceforge.net/p/zbar/news/2012/03/zbar-android-sdk-version-01-released/
Within the downloaded package, there is a very simple example. Just follow it or include the example to your app. Hopefully your task will be done.
You are showing that you want to integrate by Intent. That's the recommended way to do it, and you can make it even easier, and restrict the list of apps that reply with IntentIntegrator. It's about 5 lines of code: https://code.google.com/p/zxing/wiki/ScanningViaIntent
However this contradicts what you're saying about wanting to implement the scanning in your app. You should clarify what you want.
If that's the case, you need to build your own scanning app, and reuse core.jar and perhaps bits of Barcode Scanner in android/. This is not supported -- you're on your own. Please don't clone our app.

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