Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including a QR-scanner application with PhoneGap

I starting to write an application that will need to have a QR code reading capabilities embedded in it. Meaning that I basically want to have an option from inside my application to scan a QR code and then perform some logic related to my application.

I got some explanations about how to do it in Android (though haven't tried it yet), but now that I've decided to use PhoneGap I want to know if it changes anything.

Does the usage of PhoneGap mean that I will have a generic way to include a QR-scanner application inside my own application, or do I still need take care of the QR-scanner application including for every platform?

like image 988
Haji Avatar asked Jan 14 '12 13:01

Haji


1 Answers

Advanced features like this require a PhoneGap plugin, with an native implementation for each platform. See http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins

The good news is that the BarcodeScanner plugin is already implemented for Android, BlackBerry and iOS, see https://github.com/phonegap/phonegap-plugins

This plugin support 1D barcodes as well as QR codes and other 2D codes by integrating ZXing (http://code.google.com/p/zxing/)

Note that for now, integrating a plugin in a PhoneGap application needs a different procedure for each platform. See the PhoneGap Wiki referenced above as well as build & install instructions in the README file for each plugin.

like image 134
Nicolas Lehuen Avatar answered Sep 17 '22 22:09

Nicolas Lehuen