www.it-ebooks.info www.it-ebooks.info PROFESSIONAL NFC APPLICATION DEVELOPMENT FOR ANDROID™ INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix CHAPTER 1 Overview of Near Field Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 CHAPTER 2 NFC Essentials for Application Developers . . . . . . . . . . . . . . . . . . . . . . . 23 CHAPTER 3 Getting Started with Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 CHAPTER 4 Android Software Development Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 CHAPTER 5 NFC Programming: Reader/Writer Mode . . . . . . . . . . . . . . . . . . . . . . . . . .115 CHAPTER 6 Reader/Writer Mode Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 CHAPTER 7 NFC Programming: Peer-to-Peer Mode . . . . . . . . . . . . . . . . . . . . . . . . . . .181 CHAPTER 8 Peer-to-Peer Mode Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207 CHAPTER 9 NFC Programming: Card Emulation Mode . . . . . . . . . . . . . . . . . . . . . . .229 APPENDIX A URI Prefi xes for NDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 APPENDIX B Android NFC Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 www.it-ebooks.info www.it-ebooks.info PROFESSIONAL NFC Application Development for Android™ www.it-ebooks.info www.it-ebooks.info PROFESSIONAL NFC Application Development for Android™ Vedat Coskun Kerem Ok Busra Ozdenizci www.it-ebooks.info © 2013 John Wiley & Sons, Ltd. Registered offi ce John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom For details of our global editorial offi ces, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com. The right of the author to be identifi ed as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other coun- tries, and may not be used without written permission. Android is a trademark of Google, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in this book. A catalogue record for this book is available from the British Library. 978-1-118-38009-3 (paperback) 978-1-118-38056-7 (ePub) 978-1-118-38055-0 (eMobi) 978-1-118-38054-3 (ePDF) Set in 9.5/12 Sabon LT Std Roman, by MPS Limited, Chennai Printed in the United States at Bind-Rite www.it-ebooks.info My beloved love; Istanbul, the magnifi cent I am so lucky to be born out of you, and my passionate ambition is to be buried into you as well. —Vedat Coskun To my dear family. Her zaman yanımda olan aileme. —Kerem Ok To my lovely family and Ugurcan who encouraged me to do my best. —Busra Ozdenizci www.it-ebooks.info www.it-ebooks.info
Description: