Phonegap 3.0.0: BarcodeScanner Plugin

user1448982 picture user1448982 · Aug 9, 2013 · Viewed 26.8k times · Source

currently I'm trying to install the BarcodeScanner Plugin for Phonegap Version 3.0.0. I can't find any working documentation on how to install it correctly and I didn't figure it out myself. So I would really appreciate any help!

Thank you in advance! Best regards, Andreas

Answer

Jonathan Naguin picture Jonathan Naguin · Aug 9, 2013

Actually there are a couple of discussions about this issue on the github page of the plugin here and here.

I managed to have a version working in iOS and Android, you can check it here. There is another fork that has made a pull request to the original with changes for 3.0.0 even I am not quite sure that the plugin works in iOS.

Instructions to install (Using cordova cli)

  1. Download the repo using GIT or just a ZIP from Github.
  2. Add the plugin to your project (from the root of your project):

    cordova plugin add <path_download_plugin>

  3. You can start using plugins.barcodeScanner to invoke the plugin in your HTML/JS code.
  4. Do not forget to call cordova prepare to copy your files to each platform project.