easy-biometric-fingerprint
v1.0.0
Published
Biometric Fingerprint for CapacitorJS
Maintainers
Readme
easy-biometric-fingerprint
Biometric Fingerprint for CapacitorJS
Install
npm install easy-biometric-fingerprint
npx cap syncQuick intro
This plugin was developed for Android App with CapacitorJS. The plugin's main purpose is to verify whether a fingerprint is valid on the device. ⚠️ The fingerprint must be previously registered in the mobile system.
📋️ Requirements
- capacitor/android 7.x.x
- capacitor/core 7.x.x
- Open the plugin's android/build.gradle file and add the dependency before building the app.
dependencies {
implementation 'androidx.biometric:biometric:1.1.0'
}
💻️ Quick example
The best way to add the plugin to CapacitorJS app (ex: Angular) is importing the plugin into component.
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { FingerPrint } from 'easy-biometric-fingerprint';
@Component({
selector: 'app-root',
imports: [CommonModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
async verifyFingerPrint() {
try {
const result = await FingerPrint.authenticate();
if (result.success) {
// Do any function or action into your app
console.log('FingerPrint OK...');
} else {
console.error('Error:', result);
}
} catch (error) {
console.error('Error:', error);
}
}
}
API
authenticate()
authenticate() => Promise<{ success: boolean; }>Returns: Promise<{ success: boolean; }>
Contact, Reports or Bugs
Thanks for checking out the project. You can take a peek about my work by visiting my website.
🌍 Website: Visit
