This plugin enables fingerprint authentication for the android A370 tablets.
The CorewiseFingerprintAuth
object provides functions to make interacting with the fingerprint scanner available in the A370 tablets easier, and has two functions to validate or register a big fingerprint in the tablet via the fingerprint scanner.
To add it to your project, run the command
cordova plugin add corewise-plugin-fingerprintauth --save
For ionic 2/ typescript users, add the plugin with the same command above, then define an interface Window with a property corewise of data type any. Then also declare a global window variable out side of your class and then use it as follows, preferrably when the ionic platform is ready/ all plugins has been loaded to the DOM.
interface Window {
CorewiseFingerprintAuth: any;
}
declare var window : Window;
...
export class MyClass{
this.platform.ready().then(() => {
// to register a fingerprint
window
.CorewiseFingerprintAuth
.registerFingerprint(function(successID){
//on fingerprint registration success it returns the id of the fingerprint that has been stored in the flash memory
//do something with the id i.e. store it in a db or something
},function(error){
//do some error handling
});
// to validate a fingerprint
window
.CorewiseFingerprintAuth
.validateFingerprint(function(successID){
//on fingerprint validation success it returns the id of the fingerprint matched in the flash memory
//do something with the id i.e. store it in a db or something
},function(error){
//do some error handling
});
});
}
- CorewiseFingerprintAuth.registerFingerprint
- CorewiseFingerprintAuth.validateFingerprint
This function registers the fingerprint via the scanner and returns the id of the fingerprint stored in flash memory after registration,
CorewiseFingerprintAuth
.registerFingerprint(function(successID){
//on fingerprint registration success it returns the id of the fingerprint that has been stored in the flash memory
//do something with the id i.e. store it in a db or something
},function(error){
//do some error handling
});
This function validates the fingerprint via the scanner and returns the id of the fingerprint stored in flash memory after validation,
CorewiseFingerprintAuth
.validateFingerprint(function(successID){
//on fingerprint validation success it returns the id of the fingerprint matched in the flash memory
//do something with the id i.e. store it in a db or something
},function(error){
//do some error handling
});
- Android
For now the plugin supports the only registering and validation of big fingerprints but in the future once the vendor releases better documentation for the API, i'll also support the small fingerprints as well.
- For now there are no known bugs but if you do find one, please create an issue as always and I'll look into it during my spare time :)