Own QR code scanner app for android - android

I'm beginner in android and I need to create own QR code scanner app.
After searching for some library, of course I found zxing library (http://code.google.com/p/zxing/), but if I understand right, there must be installed BarcodeScanner application to use it and this library call this app. This variant is bad for me, because I need only my own app.
But if I'm not right, how to use this library without installing BarcodeScanner?
Also I found this: http://www.blackdogfoundry.com/blog/zbar-bar-code-qr-code-reader-android/, and I'm not sure that it will work fine with all devices.
Did anyone do some qr readers, what did you use? Do you know some other good libraries for this, except of zxing?

ZXing is good and useful library. I think you are mixing up library itself and application
which is also produced by the project

I wouldnt be so quick to dismiss Barcode Scanner.
I recently used it in an App that needed to read barcodes. It works seamlessly with my App. The only downside is that it needs to be installed by the user, but to be honest weighting that up against the time and money it would take to develop a Barcode reader from scratch, its a no brainer. If the user does not have it installed it will not break your app.
I know this is not the answer you were looking for but just thought I would offer my experience

You may also try to call the BarCode scanner App and obtain the result in the parameter of strings rather than importing the whole zxing library into your project due to substantial cost to code integration into your project . Using intents and overriding the OnActivityResult is already a good solution.

XZing is your answer!
yeah yeah they try to push it to use as an external library, but that relies on the user having it installed.... but it's all open source and you can use it however you prefer.
So download that code, integrate it directly into your app and there you go.

Related

Is it not possible to read QR codes in an android application without having a third party app installed?

I am looking at making use of QR codes in an application of mine.
I did some research / Googling and I found that this library is apparently a good option to use:
http://sourceforge.net/p/zbar/news/
But I read there it says that is still needs an application that can read qr codes for it to work?
Is there not a library that just makes use of the camera and then decodes the qr code in the application that is using the library?
If you need to scan QR codes in your application, this is the way to go :https://code.google.com/p/zxing/
You can also integrate the necessary libraries in your project in order to avoid to launch a scan using the Intent way (so a third-party app installed on your device would be necessary).
If you Google it, you'll find a lot of guides to do that: the first I got is http://www.androidaz.com/development/zxing-qr-reader-direct-integration but there's a plenty of tutorials out there.
ZBar can be installed as a library in the project, and used as any other activity.
You can Check:
https://github.com/DushyanthMaguluru/ZBarScanner/blob/master/examples/ZBarScannerDemo/src/com/dm/zbar/android/examples/MainActivity.java
That's the example of how to use ZBAR to read a QR, in the onActivityResult you can handle the results (in this case the example makes a toast).
You can follow the installation explanation here:
https://github.com/ZBar/ZBar/tree/master/android

how to import the ZXing library for my app for Encoding QR codes(while there is preinstalled ZXing scanner app for my mobile)

I am trying to do an app to create a final QR code for the information of multiple barcodes
that I have scanned.
I am wondering how would you import the ZXing lib to your code?
Assume that user already has ZXing scanner in their mobile, can I just connect with the app to generate the barcode without importing all the lib since it will make my app heavy?
For importing , QRencoder.java from ZXing, what are the necessary part of codes that I need?
Or is it even possible?
I found this two months ago : http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/
And I have tried installing that apache but it is so painful process for me. So is there any other ways around?
Regards
Thet
Yes, just use Intents. You don't need any code beyond the bit of integration code here: http://code.google.com/p/zxing/wiki/ScanningViaIntent The same class has methods for encoding a barcode on screen.

android, zxing, styling the response

alright so I've searched for quite sometime on this and I can't seem to find just the kind of answer that answers my questions...so here goes nothing! And mind you, I'm new to android dev soooo I may have stupid questions that some of you may get irritated at, but we all have to learn some how right?
I'm trying to develop an application that will allow users to scan in a QR code and then display the information that is encoded into it in a nice organized way.
It seems like ZXing doesn't like the idea of integrating their code with other applications e.g. you have to use their application from the market and point to it via intents... well if I do it this way, can I decode the contents so that I can have access to the content and do as I want with it?
What would I have to include in my project from the ZXing folder that I downloaded to make it all work? And would I have to build all of the objects with in that folder in order to use them in my project?
Any help would be greatly appreciated. Thanks!
I have decided to go other routes.
The "Android way" is to do everything via intents.. However, zxing is a special case. You can follow the intent route, or you can (as it's apache licensed), download the source code and adapt as necessary. We did that for the game Barcode Beasties ( mandatory self promoting download link here : https://market.android.com/details?id=com.fawepark.android.barcodebeasties ) and that meant we could also brand the scan page as well.
If you want use the software integrated, then just download the source and either compile it as a library or just include it in your source folder as another folder.

Generate a QR Code in an Android Application

I have been trying to generate a QR code using Zxing. Following the minimal instructions available on the Zxing project site, I was not able to get this integrated into my application. I have tried following this answer here (as well as many other search results), but BufferedImage does not seem to be available in the Android SDK. In short, Zxing is not playing nice with my application, or the documentation is not fully explaining the process properly.
I am looking for a simple way to pass in a string and generate a QR code image representing the string. Ant code samples, or even a nudge in the right direction would greatly appreciated.
I created an application at one point that needed to be able to generate a QR also.
I, like you started with trying to use ZXing to do it. The project is definitely capable of generating the QR image, but I was never able to get it working correctly.
The only integration they offer for QR generating is thru intents, and it just spits your QR into its own blank Activity.
I tried pulling out enough of the project that I'd be able to use the generator classes, but I could never get it working properly.
In the end I decided to go with the google charts api. Since it requires network it wasn't an ideal solution for me, but it was far easier / less complicated, and I was able to actually get it to work.
Edit:
Since the time of this post I have created a sample project that demonstrates how to download and show QR codes using the Google Image Charts API. The sample project can be located here: https://github.com/FoamyGuy/QRMaker. I hope it can help someone.
I've been through the frustration of trying to integrate the ZXing library into my code and get rid of the need of having to install the third-party application. I finally got it to work.
You need to add the core.jar file from the latest ZXing release source to your project. You also need to add two more classes to your package to get it to work.
Just follow this step-by-step guide.

Embedded ZXing - what am I missing?

Sorry if this has been answered before, but I am trying to make an application that will include the ability to scan barcodes on Android. I'm looking at using ZXing as the library, however, I want to embed the scanner in my application so that the user doesn't have to have the ZXing barcode scanner installed to use my application. From the description of ZXing, it sounds like this is possible.
I've gotten as far as building ZXing, linking it into my project in Eclipse, then creating a new reader instance. However, I'm lost when it comes to starting the barcode reader and implementing the callbacks. IMO, this is when the documentation here gets hazy.
If someone could explain how to use ZXing properly, that would be of great help.
Cheers!
Personally, I'm a fan of using multiple apps as plug-ins. That way, the user doesn't have to have the same code on the phone multiple times (storage is limited, after all), and - more importantly - if ZXing improves the barcode scanner (which they do often), the user will automatically have the latest and greatest version without you having to integrate and modify it again to fit your needs.
You can simply detect for the presence of the app, and prompt the user to install it if it doesn't exist. You can simply link to the pname: Uri to the zxing app, which will automatically fire up the market and allow the user to install the app.
That said, if you really want to embed the code, one way would be to download the relevant source files, rename the package names and intent names so they don't clash with ZXing's code, and then simply call the intent to scan the barcode (like you would normally do when you use the barcode scanner as a plug-in). If you do that, be sure to credit ZXing for their work in your documentation, and make sure their terms of service allow for using and modifying their source code.
Complete source code to Barcode Scanner is in the android/ directory. That is about the best explanation you could ask for.
If you're rewriting it with new code for your own purpose, I think that's more up to you than for the project to explain.
You might get more useful information at the project discussion group.

Categories

Resources