Hello, is there some good solution how to remove listener in NFC native plugin?
I saw that plugin source on github has nfc.removeNdefListener function but it is not expose on the Ionic layer therefore it is not possible to use it.
I tried add function removeNdefListener to @ionic-native/nfc index.js file but unfortunately it still doesn’t work.
this.nfc.addNdefListener(() => {
console.log(‘successfully attached ndef listener’);
}, (err) => {
console.log(‘error attaching ndef listener’, err);
}).subscribe((event) => {
…
});
I can not resolve my problem because each time I click on the button new listener is creating and call event function many times.
Thank you.