App2 Conclusion

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the The newline Guide to NFCs with React Native course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to The newline Guide to NFCs with React Native, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course The newline Guide to NFCs with React Native

Hello, we have learned a lot in this module. Let's do a review here. We started our n-deaf journey by writing n-deaf into NFC tags with NFC tools app. And we also try to write a naive test case to parse it. Then we formally study the n-deaf. Some important points to keep in mind. n-deaf message is an array of n-deaf record. To know what kind of payload is inside the n-deaf record, we need to check both TNF in the header and the type field. TNF1 refers to well-known TNF. In this case, the type field maps to record type definition, or RTD for short, which is another spec defined by an NFC forum. Once we confirm the payload type, we can then decode and encode the payload accordingly. In this module, our payload type is RTDURI, which can encode lots of different URI types into n-deaf record. Then we walk through how to use our NFC library to process n-deaf. For encoding, we have factory method for common n-deaf records, such as URI record and text record, as well as an encode message function to group multiple n-deaf records into one n-deaf message. For decoding, we provide constants for TNF and common RTD. Once you confirm which payload type you are dealing with, you can call a specific decode payload method to parse the actual payload, to actually write or read n-deaf from our mobile device. We also learn how to request a specific NFC technology handler. In our case here, it's the n-deaf handler. This pattern will also be used in the next module. These specific NFC technology handlers provide technology related operations for us to use. In our case here, since we are dealing with n-deaf, it is the write n-deaf message API. There are also several technology independent APIs we can use, such as Get Tech , which resolves to the NFC tag object we just found. Finally, we show you how to use deep linking with NFC tags. In order to use this technique, several native setup are required according to different mobile platforms. For iOS, we mainly rely on custom URL types, so we modify our info.plist to include it. For Android, we register for a special intent called n-deaf discovered, along with the custom URL i-s game. I hope you enjoyed and have learned something along this journey. In the next module, we will move even further to see how we can deal with specific tech types beyond n-deaf. By utilizing specific hardware features, we can build even more interesting applications. I will see you there. [BLANK_AUDIO]