"undefined" on NFC reader
Closed this issue · 2 comments
cilluo commented
my code is
function ArletndefMessage(nfcEvent) {
var tag = nfcEvent.tag,
ABCD = tag.ndefMessage;
alert(ABCD);
}
I always show "undefined"
but I can read only ID by
function ArletndefMessage(nfcEvent) {
var tag = nfcEvent.tag,
ABCD = tag.id;
alert(ABCD);
}
how can I read other Value (tag.ndefMessage, tag.type, tag.maxsize)?
thanks.
don commented
The nfcEvent contains a tag object. You can access other properties with the dot notation. e.g. tag.maxSize
See the docs for an example of the tag object https://github.com/chariotsolutions/phonegap-nfc#sample-event-on-android
don commented
Duplicate of chariotsolutions/phonegap-nfc#132