Search code examples
cordovaphonegap-pluginsqr-codebarcode-scannercordova-plugins

phonegap QR/barcode generator plugin


I want to make an app that generates a barcode/qr image in phonegap for Ios. Is there any plugins existing for this?

If not, is there any JS/HTML5 scripts that can be used?

I tried google, but did not find much usefull info (found one for android, but need something for Ios)

Thank you for your reply :)


Solution

  • Solution A: web service

    If your app can require an internet connection to generate QR codes, you can use a web service.

    QR code example for URL www.example.com:

    Google Chart API (deprecated)

    http://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=http://www.example.com/&choe=UTF-8&chld=L|1
    

    QR code example

    ZXing web service

    http://zxing.org/w/chart?chs=150x150&cht=qr&chl=http://www.example.com/&choe=UTF-8&chld=L|1
    

    QR code example

    As mentioned by Sean Owen.

    Solution B: plugin

    If you don't mind using a plugin, you can use the official BarcodeScanner plugin to generate (and read) codes.