Android NFC help
Posted: Mon Aug 01, 2022 4:34 pm
Hi
I have a very requirement to read the unique ID of an NFC ID card, and display it on the screen. I've written a simple app which does this but it seems to return incorrect data. The ID should be unique to each card and 14 characters long. The response I receive is 4 characters and appears to be special characters, example below:
Desktop Reader: 0455A50A435291
App Reader: o2}o
I've used the examples in the dictionary and the other posts on the forum which suggest I should be reading the "id" field as below:
Am I reading the wrong location? Or is this an encoding problem? Perhaps I'm just not understanding what needs to be done. I'd appreciate any help. Looking at other posts it seems Jacques is an expert in this area?
I should say I am new to Android, but I've been using LC (and loving it) for a few years. I'd really appreciate some help.
Thanks.
I have a very requirement to read the unique ID of an NFC ID card, and display it on the screen. I've written a simple app which does this but it seems to return incorrect data. The ID should be unique to each card and 14 characters long. The response I receive is 4 characters and appears to be special characters, example below:
Desktop Reader: 0455A50A435291
App Reader: o2}o
I've used the examples in the dictionary and the other posts on the forum which suggest I should be reading the "id" field as below:
Code: Select all
on nfcTagReceived pTag
put pTag["id"] into tID
answer tID
end nfcTagReceived
I should say I am new to Android, but I've been using LC (and loving it) for a few years. I'd really appreciate some help.
Thanks.
