Search code examples
javascriptcordovaphonegap-pluginsbarcode-scanner

Phonegap 3.0.0: BarcodeScanner Plugin


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


Solution

  • 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.