I am trying to use this plugin in my Ionic 5 app: https://www.npmjs.com/package/cordova-plugin-k-nfc-acr122u
I installed plugin using cordova plugin add cordova-plugin-k-nfc-acr122u and i i dont now like use it. Plugin declares :
and i try use connect function but it don't work. enter image description here
Please help, thx.
I solved the problem myself, maybe it will be useful to someone, Import
import { KNfcAcr122U } from 'plugins/cordova-plugin-k-nfc-acr122u/types';
I declare:
const kNfcAcr122U: KNfcAcr122U = window['KNfcAcr122U'];
and I use the connect function:
kNfcAcr122U.connect(this.callbackSuccess, this.callbackError);
callbackSuccess(event): void {
console.log(event,'success');
}
callbackError(): void {
console.log('error');
}