Book Image

Near Field Communication with Android Cookbook

By : Subtil
Book Image

Near Field Communication with Android Cookbook

By: Subtil

Overview of this book

An easy-to-follow guide, full of hands-on examples of and real-world applications. Each recipe is explained and placed in context. If you want to learn how to create NFC-enabled Android applications, this is the book for you. Perhaps you already know a bit about Android application developments but have never used NFC, or perhaps you know a little about NFC android development but want some more advanced features and examples. In either case, this book will get you up and running quickly. You are expected to have Android programming knowledge.
Table of Contents (12 chapters)
11
Index

Introduction


As we saw in the previous chapters, the NFC Forum is responsible for developing standards-based NFC specifications to allow interoperability between different devices and tags. One of the specifications created by the NFC Forum is NFC Data Exchange Format (NDEF). The NDEF specification defines the message encapsulation format to exchange information between two NFC-enabled devices or devices with the NFC tag. NDEF is a lightweight, binary message format that can be used to encapsulate several custom payloads. Using this abstraction layer allows us to create the standard tag content compatible with all the NFC Forum tag types, ignoring the fact that each tag type has different hardware setups and memory layouts.

The NDEF Message is composed by one or more NDEF records, and each record contains the payload and a header in which the data length and type and identifier are stored.

In this chapter, we will create some examples that will allow us to work with the NDEF standard and start...