https://github.com/bsorrentino/cordova-plugin-aztec-qrcode
Generate QRCode using Aztec format
https://github.com/bsorrentino/cordova-plugin-aztec-qrcode
aztec aztec-code cordova qrcode
Last synced: 8 months ago
JSON representation
Generate QRCode using Aztec format
- Host: GitHub
- URL: https://github.com/bsorrentino/cordova-plugin-aztec-qrcode
- Owner: bsorrentino
- License: mit
- Created: 2017-03-29T22:06:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T16:05:00.000Z (about 8 years ago)
- Last Synced: 2025-01-19T08:42:50.553Z (10 months ago)
- Topics: aztec, aztec-code, cordova, qrcode
- Language: JavaScript
- Size: 557 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cordova-plugin-aztec-qrcode
Generate QRCode using Aztec format
## Supported platforms
* **IOS**
> Native implementation using [Core Image Filter `CIAztecCodeGenerator`](https://developer.apple.com/library/content/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/filter/ci/CIAztecCodeGenerator))
* **Browser**
> Implementation based on [bwip-js](https://www.npmjs.com/package/bwip-js)
## Add Plugin
```
cordova plugin add https://github.com/bsorrentino/cordova-plugin-aztec-qrcode.git --save
```
## Usage
### Basic implementation
In HTML template create a **div** as **QRCode container**
```html
```
In javascript call the provided API gives a reference to container
```javascript
PKBarcodeFormatAztec.generate(
document.getElementById('qrCode'),
"message to encode",
function(e) => {
console.log( "QRCODE showed on", element);
},
function(err) {
console.log("ERROR ", err);
});
```
### Ionic implementation
In HTML template create a **div** as **QRCode container**
```html
```
In javascript call the provided API gives a reference to container
```javascript
@ViewChild('qrCode') qrCode: ElementRef; //HTMLDivElement;
generate() {
PKBarcodeFormatAztec.generate(
this.qrCode.nativeElement,
"message to encode",
(element) => {
console.log( "QRCODE showed on", element);
},
(err) => {
console.log("ERROR ", err);
});
}
```
### Note for IOS platform
**Dependencies**
> Since the plugin has been written in swift we need to install also the [cordova-plugin-add-swift-support](https://www.npmjs.com/package/cordova-plugin-add-swift-support). It provides a way to configure IOS toolchains to support swift 3.0