1.1.0 • Published 1 year ago
bureau-aadhaar-qr-sdk v1.1.0
Aadhaar Ionic SDK
This SDK allows you to integrate Aadhaar-QR SDK code functionality into your Ionic applications. The SDK is based on Ionic Framework with AngularJS support and is designed for Android platforms.
NPM Package Link
https://www.npmjs.com/package/bureau-aadhaar-qr-sdk
Installation
- Installing the package
npm install "bureau-aadhaar-qr-sdk"
- Import the SDK in your application
import { BureauAadhaarQRSDK } from bureau-aadhaar-qr-sdk
- Initializing the SDK in your home.page.js/ts
import { BureauAadhaarQRSDK } from bureau-aadhaar-qr-sdk
export class MyComponent {
constructor(private barcodeScannerService: BureauAadhaarQRSDK) { }
async scan() {
try {
const content = await this.barcodeScannerService.startScanner(clientId);
console.log(content);
} catch (error) {
console.error(error);
}
}
stopScan() {
this.barcodeScannerService.stopScanner();
}
}
- For this change
src/app/home/home.page.html
<ion-header [translucent]="true">
<ion-toolbar>
<ion-title> Aadhaar QR Scanner </ion-title>
</ion-toolbar>
</ion-header>
<ion-content [fullscreen]="true">
<ion-button expand="full" (click)="startScanner()">
SCAN
</ion-button>
<ion-row class="scan-button">
<ion-col class="ion-no-padding">
<ion-button expand="full" (click)="stopScanner()">Stop</ion-button>
</ion-col>
</ion-row>
</ion-content>
Notes
- A credential ID will be required for accessing SDK.
Library Used
- Ionic Framework with Cordova
- AngularJS Support