Hello, we have learned a lot in this module. Let's do a review here.
We started our
NDEF journey by writing
NFC tags with
NFC Tools app, and we also tried to write a naive test case to parse it.
Then, we formally studied the
NDEF. Some important points to keep in mind:
NdefMessageis an array of
To know what kind of payload is inside the
NdefRecord, we need to check both
TNFin the header and the
TNF1 refers to
WELL_KNOWNTNF. In this case, the
Type fieldmaps to
Record Type Definition, or
RTDfor short, which is another spec defined by NFC Forum.
Once we confirm the payload type, we can then decode and encode the payload accordingly. In this module, our payload type is
RTD_URI, which can encode lots of different URI types into
How to process NDEF in React Native#
Then, we walked through how to use our NFC library to process NDEF.