Closed zigou13 closed 4 years ago
@don please
The call to nfc.write needs to happen inside the NDEF listener callback.
ok thank you
Here's an old example that should still work. I add a tag discovered listener, passing my writeTag
function as the callback https://github.com/don/phonegap-nfc-writer/blob/9f32ad17115457f75319b41c890ba1669a2b18a5/www/main.js#L32
Then in writeTag
, I ignore any data in the nfcEvent and write my new data to the tag. https://github.com/don/phonegap-nfc-writer/blob/9f32ad17115457f75319b41c890ba1669a2b18a5/www/main.js#L3-L20
IONIC 5 Hello, when writing NFC, I got this error
Attempt to invoke virtual method 'android.os.Parcelable android.content.Intent.getParcelableExtra (java.lang.String)' on a null object reference
For reading the NFC, it works perfectly, here is the code below