1.1.0 • Published 11 months ago

bureau-aadhaar-qr-sdk v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

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

  1. Installing the package
npm install "bureau-aadhaar-qr-sdk"
  1. Import the SDK in your application
import { BureauAadhaarQRSDK } from bureau-aadhaar-qr-sdk
  1. 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();
  }
}
  1. 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

  1. A credential ID will be required for accessing SDK.

Library Used

  1. Ionic Framework with Cordova
  2. AngularJS Support