How to handle zxing if not installed on Device? - android

I'm developing an app that has QR code reading ability, i'm using the Zxing library, launching via intent, so the Barcode Scanner is handling the QR reading functionality, my question is, if the user doesnt have the Barcode Scanner App installed on their device, is there a way to bring them to the app store to get the application for their device?
Peter

You should be using the ZXing IntentIntegrator, which will automatically give the user the option to visit the Play Store if the app is not installed on their device.
Here is a sample project using IntentIntegrator, including a JAR edition of that class (in the project's libs/ directory).

Related

Is there a way to embed logic in a QR code?

I have a requirement where I need to generate a QR code which, when scanned, displays the following behaviour.
When scanned for the first time, if my ios/android app is not installed then it takes the user to the appstore to prompt them to install the app.
When scanned again, if the app is already installed then it should open the app to a particular screen in the app.
Is it possible to create a QR code (or is it the app?) that behaves like this?
This behaviour is not be implemented in QR code. This will be implemented in your app.
I talk about Android. Same will be for iOS.
QR code will give you applicationId. (like com.stackexchange.marvin)
Get list of installed apps. See this question for getting installed apps list.
If user has installed this package name already, then open the app. See this question.
If not installed then open play store page.
Related question:
https://stackoverflow.com/a/8778268/6891563

Distributing the ZXing APK file with my app

I wish to use the ZXing barcode scanner app along with my app and their site recommends "distributing the project's release, rather than building from source, for best user experience".
https://code.google.com/p/zxing/wiki/FrequentlyAskedQuestions
I've searched and searched and haven't come across a way to have one's own APK file in Google Play and have someone else's APK be loaded along with it when a user installs my app.
Has anyone had any experience doing this with an APK or more specifically the ZXing Barcode Scanner?
I know I can prompt the user midstream to download the app but that is not ideal for the user experience I'm interested in offering.
You cant deploy a second apk with your apk as far as I know. The best you can do is make the acquisition of the 3rd party app you want to send intents to as smooth as possible.
For instance when the user hits the button with the intention of scanning search for the zxing package and if not found redirect the user to download zxing from the playstore.
Using ZXing to create an android barcode scanning app

how does "com.google.zxing.client.android.SCAN" work in android?

I developed a BarcodeScanner app with ZXING library. for that I downloaded the complete library and added it to my proj and called an Intent with URI:"com.myproject.vinscan.client.android.SCAN". but later I found that, instead of downloading and including all packages of ZXING into our proj, we can just use the URI for Inetnt as "com.google.zxing.client.android.SCAN". My doubt is, how is it working without the libraries. It is working even in offline mode(without WIFI/GPRS). are the libraries included in the android SDK itself?
If you are accessing it via the intent, as com.google.zxing.client.android.SCAN it needs the Barcode Scanner application to be installed on the client. (Reference)
If it isn't installed, it redirects to the website and prompts the user to download. So strictly speaking, the user will have to be connected to the internet atleast once, in order to download the Barcode Scanner application (if he doesn't already have it)
Alternately
If you were to add a reference to the ZXing core library, into your project, you will be able to access it without having to direct the user out, to download Barcode Scanner.

Working with 2 apps android

I'm working with android and I have a question. How I can do if I am doing an app that need another app. For example one of my option needs an app that reads code QR (2D) how can I work with both?
Thanks
You should be integrating via intent. See here for details how: https://code.google.com/p/zxing/wiki/ScanningViaIntent.
By doing it this way you eliminate the need to try to copy the barcode scanner app into your own which I think you'll find to be somewhat difficult(Not to mention you won't be tasked with trying to maintain a project that is not yours as new verions of the OS are released). You'll also be saving your users the space of another copy of the barcode scanner application.
Integrating via intent is the way that the authors of barcode scanner intended for you to use it along with your own application.

How to display Barcode Scanner in android

Hi guys iam developing an Android application which needs a Barcode Scanner to be launch when i click on a button .I have seen so many apps in the internet like Zxing.But i have seen that we need to install the project in our device and call an intent from our app to launch it.Here i dont want to use the installed app in my own app.Is it possible to develop a Bar Code Scanner through code so that it doesnt depends on the installed applications in the device.And at the same time i need to capture the Barcode and display in a Textview.Any suggestions is highly appreciated.
You could just use the source code from the ZXing app instead of making your own scanner. Their source code is included on their downloads page at http://code.google.com/p/zxing/. It would definitely be more work than just relying on an intent to their application, but a lot less work than making a barcode scanner from scratch.

Categories

Resources