In the Part 1 of this recipe, we were able to write a small note to a tag, but when we tapped the phone on the written tag, the application started but no content was displayed. In this recipe, we will complete the application by implementing the read tag content logic.
First, have a look at the Leaving a (small) note – Part 1 recipe in Chapter 4, Writing Tag Content – Real-life Examples, as we need to use the result code files in this recipe.
In Part 2 of the recipe, we will read the text in the tag and place it in
EditText. You can jump to step 5 if you have done Part 1 of the recipe and don't want to create a different project.
Open Eclipse and create a new Android application project named
NfcBookCh6Noteand package named
Import the code and resources files from the Leaving a (small) note – Part 1 recipe in Chapter 4, Writing Tag Content – Real-life Examples.