NFC Application Development for Android

NFC Application Development for Android NFC Application Development for Android

27.02.2013 Views

INTRODUCTION iv Chapter 7 and Chapter 8 contain material on peer-to-peer mode, in a format similar to the previous two chapters. Chapter 9 contains some information on card emulation (CE) mode. The details of CE mode are not covered in this book for two main reasons. The potential audience for CE mode seems very small when compared to the other modes. The standards of the other modes (i.e., reader/writer and peerto-peer) are mostly well established, whereas fi nalized standards for CE mode programming on Android technology are still missing. Hence, it will be better to wait for the introduction of fi nalized CE programming standards for Android. HOW THIS BOOK IS STRUCTURED This book is structured in a top-down fashion. The chapters are isolated from each other, so that readers who have enough knowledge on the topic can just skip that chapter. The chapters are not integrated with each other in any way. The only exception is that dual chapters are created for the reader/ writer (Chapter 5 and Chapter 6) and peer-to-peer (Chapter 7 and Chapter 8) operating modes — the earlier chapter explains how to program using the related mode, and the later one provides examples of that mode. Hence, the reader who does not have a complete understanding of programming using the related mode should read both chapters, while the reader who is confi dent about the programming of that mode can skip the earlier chapter and browse the later one containing the examples. WHAT YOU NEED TO USE THIS BOOK For NFC programming on Android, fi rst you need to create an Android development environment. The most suitable way to do that is to install Android Development Tools (ADT) Bundle. ADT is available on Windows, MAC, and Linux operating systems. Moreover, in order to test NFC reader/ writer mode applications, you need to have an NFC-enabled mobile phone and an NFC tag; in order to test NFC peer-to-peer mode applications, you need to have two NFC-enabled mobile phones; and in order to test card emulation mode applications, you need to have an additional Java Card that can be plugged-in to the mobile phone. The source code for the samples is available for download from the Wrox website at: www.wrox.com/remtitle.cgi?isbn=1118380096 CONVENTIONS To help you get the most from the text and keep track of what’s happening, we’ve used a number of conventions throughout the book. NOTE Notes indicates notes, tips, hints, tricks, or and asides to the current discussion. As for styles in the text:

➤ We highlight new terms and important words when we introduce them. ➤ We show keyboard strokes like this: Ctrl+A. INTRODUCTION ➤ We show fi le names, URLs, and code within the text like so: persistence.properties. ➤ We present code in two different ways: We use a monofont type with no highlighting for most code examples. We use bold to emphasize code that is particularly important in the present context or to show changes from a previous code snippet. SOURCE CODE As you work through the examples in this book, you may choose either to type in all the code manually, or to use the source code fi les that accompany the book. All the source code used in this book is available for download at www.wrox.com. Specifi cally for this book, the code download is on the Download Code tab at: www.wrox.com/remtitle.cgi?isbn=1118380096 Throughout each chapter, you’ll also fi nd references to the names of code fi les as needed in listing titles and text. Most of the code on www.wrox.com is compressed in a .ZIP, .RAR archive, or similar archive format appropriate to the platform. Once you download the code, just decompress it with an appropriate compression tool. NOTE Because many books have similar titles, you may fi nd it easiest to search by ISBN; this book’s ISBN is 978-1-118-38009-3. Alternately, you can go to the main Wrox code download page at www.wrox.com/dynamic/books/ download.aspx to see the code available for this book and all other Wrox books. ERRATA We make every effort to ensure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you fi nd an error in one of our books, like a spelling mistake or faulty piece of code, we would be very grateful for your feedback. By sending in errata, you may save another reader hours of frustration, and at the same time, you will be helping us provide even higher quality information. To fi nd the errata page for this book, go to www.wrox.com/remtitle.cgi?isbn=1118380096 v

➤ We highlight new terms and important words when we introduce them.<br />

➤ We show keyboard strokes like this: Ctrl+A.<br />

INTRODUCTION<br />

➤ We show fi le names, URLs, and code within the text like so: persistence.properties.<br />

➤ We present code in two different ways:<br />

We use a monofont type with no highlighting <strong>for</strong> most code examples.<br />

We use bold to emphasize code that is particularly important in the present context<br />

or to show changes from a previous code snippet.<br />

SOURCE CODE<br />

As you work through the examples in this book, you may choose either to type in all the code manually,<br />

or to use the source code fi les that accompany the book. All the source code used in this book<br />

is available <strong>for</strong> download at www.wrox.com. Specifi cally <strong>for</strong> this book, the code download is on the<br />

Download Code tab at:<br />

www.wrox.com/remtitle.cgi?isbn=1118380096<br />

Throughout each chapter, you’ll also fi nd references to the names of code fi les as needed in listing<br />

titles and text.<br />

Most of the code on www.wrox.com is compressed in a .ZIP, .RAR archive, or similar archive <strong>for</strong>mat<br />

appropriate to the plat<strong>for</strong>m. Once you download the code, just decompress it with an appropriate<br />

compression tool.<br />

NOTE Because many books have similar titles, you may fi nd it easiest to search<br />

by ISBN; this book’s ISBN is 978-1-118-38009-3.<br />

Alternately, you can go to the main Wrox code download page at www.wrox.com/dynamic/books/<br />

download.aspx to see the code available <strong>for</strong> this book and all other Wrox books.<br />

ERRATA<br />

We make every ef<strong>for</strong>t to ensure that there are no errors in the text or in the code. However, no one<br />

is perfect, and mistakes do occur. If you fi nd an error in one of our books, like a spelling mistake<br />

or faulty piece of code, we would be very grateful <strong>for</strong> your feedback. By sending in errata, you may<br />

save another reader hours of frustration, and at the same time, you will be helping us provide even<br />

higher quality in<strong>for</strong>mation.<br />

To fi nd the errata page <strong>for</strong> this book, go to<br />

www.wrox.com/remtitle.cgi?isbn=1118380096<br />

v

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!