Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-qrcodejs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-qrcodejs

Cordova plugin for generating QR code

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
increased by31.25%
Maintainers
1
Weekly downloads
 
Created
Source

QRCodeJS

An Apache Cordova plugin for generating QR code as Base64 encoded URL string.

It's a pure JavaScript implementation that can run an just any platform.

All platforms are supported:

  • Android
  • Blackberry
  • Browser
  • iOS
  • OSX
  • Ubuntu
  • Windows
  • etc (remembers? it's pure JavaScript)

How to use it

ionic plugin add https://github.com/MenelicSoftware/cordova-plugin-qrcodejs

or

cordova plugin add https://github.com/MenelicSoftware/cordova-plugin-qrcodejs

Then at the top of your Typescript code:

cordova.plugins.qrcodejs.encode('TEXT_TYPE', 'myemail@mydomain.me', (base64EncodedQRImage) => {
      console.info('QRCodeJS response is ' + base64EncodedQRImage);
      //TODO: use your base64EncodedQRImage
    }, (err) => {
      console.error('QRCodeJS error is ' + JSON.stringify(err));
    });

Or with more options


let options = {
	width: 256,
	height: 256,
	colorDark: "#000000",
	colorLight: "#ffffff",
};

cordova.plugins.qrcodejs.encode('TEXT_TYPE', 'myemail@mydomain.me', (base64EncodedQRImage) => {
	console.info('QRCodeJS response is ' + base64EncodedQRImage);
  //TODO: use your base64EncodedQRImage
}, (err) => {
	console.error('QRCodeJS error is ' + JSON.stringify(err));
}, options);

Tested on

  • Browser
  • Android
  • ? (please, let me know if it works for you on other platforms)

Credits

It is based on the great work done by the Blackberry team at https://github.com/blackberry/phonegap-plugin-barcodescanner/ wich is based on work done by https://github.com/jeromeetienne/jquery-qrcode

License

  • Apache-2

  • Copiright Menelic Limited.

Keywords

FAQs

Package last updated on 16 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc