Book Image

Near Field Communication with Android Cookbook

By : Vitor Subtil
Book Image

Near Field Communication with Android Cookbook

By: Vitor Subtil

Overview of this book

Table of Contents (17 chapters)
Near Field Communication with Android Cookbook
About the Author
About the Reviewers

Working with the NDEF record

Android provides an easy way to read and write data when it is formatted as per the standard NDEF. This format is the easiest way for us to work with tag data because it saves us from performing lots of operations and processes of reading and writing raw bytes. So, unless we need to get our hands dirty and write our own protocol, this is the way to go (you can still build it on top of NDEF and achieve a custom, yet standard-based protocol).

Getting ready

  • Make sure you have a working Android development environment. If you don't, ADT Bundle is a good environment to start with (you can access it by navigating to

  • Make sure you have an NFC-enabled Android device or a virtual test environment; refer to the Testing your app all together recipe from Chapter 1, Getting Started with NFC.

  • It will be assumed that Eclipse is the development IDE.

How to do it...

We are going to create an application that writes any NDEF record to a...