README
Ionic BioCatch Module
If you'd like to install this package, please run npm install biocatch-ionic
Using your module in an Ionic 3 app
import { BioCatch } from 'biocatch-ionic';
import { ToastController } from '@ionic/angular';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
public customerSessionID = 'VALUE_FOR_CUSTOMER_SESSION_ID';
constructor(private bioCatch: BioCatch, private toastController: ToastController) {
}
public async start() {
const wupUrl = 'https://YOUR_SERVER_URL/client/v3/web/wup?cid=YOUR_CUSTOMER_ID';
await this.bioCatch.start(this.customerSessionID, wupUrl, null);
this.presentToast('Data collection started!');
}
presentToast(message: string) {
this.toastController.create({message, duration: 1500, color: 'medium'}).then(toast => toast.present());
}
}