Search docs/
Getting StartedPlugins

Luxand

This plugin let you integrate Luxand Face SDK into your ionic projects, so you can implement face authentication easily in your application.

https://github.com/molobala/cordova-plugin-luxand

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Contact Us Today!

Installation

npm install codova-plugin-luxandnpm install @ionic-native/luxandionic cap syncionic cordova plugin add codova-plugin-luxandnpm install @ionic-native/luxand
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS

Usage

React

See here.

Angular

import { Luxand } from '@ionic-native/luxand';


constructor(private luxand: Luxand) { }

...

//init Luxand  Face SDK

this.luxand.init({
 licence: "",
 dbname: "data.dat",
 loginTryCount: 3
})
  .then((res: any) => console.log(res))
  .catch((error: any) => console.error(error));
// register a face
this.luxand.register({
 timeout: 20000//20 seconds
})
.then(r=>{
 console.log("Your FACE ID:", r.id);
 console.log("Your AGE:", r.extra.AGE);
 console.log("Your GENDER:", r.extra.GENDER);
 console.log("SIMILING:", r.extra.SMILE>35? "YES": "NO");
 console.log("EYE OPENED:", r.extra.EYESOPENED>45? "YES": "NO");
})
.catch(err=>{
 if(err.messgae === "Already registered") {
   //extra data available
   console.log("Your AGE:", r.extra.AGE);
   console.log("Your GENDER:", r.extra.GENDER);
   console.log("SIMILING:", r.extra.SMILE>35? "YES": "NO");
   console.log("EYE OPENED:", r.extra.EYESOPENED>45? "YES": "NO");
 }
})
//to login using a face
this.luxand.login({
timeout: 20000
}).then(r=>console.log(r))
.catch(err=>console.log(err));