Near Field Communication with Android Cookbook

Discover the endless possibilities of using Android NFC capabilities to enhance your apps through over 60 practical recipes
Preview in Mapt

Near Field Communication with Android Cookbook

Vitor Subtil

Discover the endless possibilities of using Android NFC capabilities to enhance your apps through over 60 practical recipes
Mapt Subscription
FREE
$29.99/m after trial
eBook
$18.90
RRP $26.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$18.90
$44.99
$29.99 p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Near Field Communication with Android Cookbook Book Cover
Near Field Communication with Android Cookbook
$ 26.99
$ 18.90
Robot Operating System Cookbook Book Cover
Robot Operating System Cookbook
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $31.98
Add to Cart

Book Details

ISBN 139781783289653
Paperback286 pages

Book Description

Near Field Communication, or simply NFC, is an emerging technology with endless applicability. Its low battery consumption and simplicity are the keys to its success.

Near Field Communication with Android Cookbook is a hands-on book that will help you to set up your development environment, get to know the basics of NFC, and then use what you learn to create more enhanced and practical applications. This practical guide will teach you all you need know about NFC to get you started in developing outstanding out-of-the-box applications.

Table of Contents

Chapter 1: Getting Started with NFC
Introduction
Requesting NFC permissions
Indicating that your app uses NFC
Defining minimal requirements
Verifying whether the device has an NFC adapter
Downloading Open NFC Android Edition
Downloading Open NFC SDK Edition
Configuring the Open NFC Android add-on into your Android SDK
Configuring an NFC-enabled testing AVD
Configuring the Connection Center tool
Testing your app all together
Chapter 2: Detecting a Tag
Introduction
Understanding the foreground dispatch system
Understanding the tag dispatch system
Verifying if your app started because of an NFC intent
Filtering tags by their content type
Filtering tags by their content type programmatically
Filtering tags by their technology
Filtering tags by their technology using programs
Filtering URI tags
Chapter 3: Writing Tag Content
Introduction
Working with the NDEF record
Writing a URI-formatted record
Writing a text-formatted record
Using Android Application Record
Working with external types
Working with custom mimes
Chapter 4: Writing Tag Content – Real-life Examples
Introduction
Making a phone call with one tap – Part 1
Sending a predefined SMS – Part 1
Visiting our website
Leaving a (small) note – Part 1
Chapter 5: Reading Tag Content
Introduction
Obtaining NDEF Message from Intent
Getting the data out of the message
Reading a text-formatted record
Reading a URI-formatted record
Reading external types
Reading custom mimes
Chapter 6: Reading Tag Content – Real-life Examples
Introduction
Making a phone call with one tap – Part 2
Sending a predefined SMS – Part 2
Leaving a (small) note – Part 2
Getting the tag information
Chapter 7: Sharing Content across Devices
Introduction
Creating a basic peer-to-peer Hello World application
Sending texts to other devices
Sending a friend invite on Facebook
Inviting a friend to play a game – Part 1
Chapter 8: Error Handling and Content Validation
Introduction
Handling tag-writing errors
Handling tag-reading errors
Testing the tag data for integrity
Chapter 9: Extending NFC
Introduction
Turning other adapters on/off
Configuring a Wi-Fi network
Starting a Wi-Fi hotspot
Inviting a friend to play a game – Part 2
Controlling hotel room access with Arduino and NFC – Part 1
Controlling hotel room access with Arduino and NFC – Part 2
Chapter 10: Real-life Examples – NFC Utilities
Introduction
Creating multi-action tags
Choosing the best format for our data
Locking tags
Joking with a friend

What You Will Learn

  • Work with the foreground dispatch system NFC data exchange format
  • Create several applications to consolidate knowledge and see what NFC can be used for
  • Read and write tags with URI, text, mime, and external types
  • Share content across two NFC-enabled devices
  • Extend NFC usage using Bluetooth and Wi-Fi
  • Combine NFC with social networks and games
  • Use Open NFC for Android to set up a virtual development and testing environment

Authors

Table of Contents

Chapter 1: Getting Started with NFC
Introduction
Requesting NFC permissions
Indicating that your app uses NFC
Defining minimal requirements
Verifying whether the device has an NFC adapter
Downloading Open NFC Android Edition
Downloading Open NFC SDK Edition
Configuring the Open NFC Android add-on into your Android SDK
Configuring an NFC-enabled testing AVD
Configuring the Connection Center tool
Testing your app all together
Chapter 2: Detecting a Tag
Introduction
Understanding the foreground dispatch system
Understanding the tag dispatch system
Verifying if your app started because of an NFC intent
Filtering tags by their content type
Filtering tags by their content type programmatically
Filtering tags by their technology
Filtering tags by their technology using programs
Filtering URI tags
Chapter 3: Writing Tag Content
Introduction
Working with the NDEF record
Writing a URI-formatted record
Writing a text-formatted record
Using Android Application Record
Working with external types
Working with custom mimes
Chapter 4: Writing Tag Content – Real-life Examples
Introduction
Making a phone call with one tap – Part 1
Sending a predefined SMS – Part 1
Visiting our website
Leaving a (small) note – Part 1
Chapter 5: Reading Tag Content
Introduction
Obtaining NDEF Message from Intent
Getting the data out of the message
Reading a text-formatted record
Reading a URI-formatted record
Reading external types
Reading custom mimes
Chapter 6: Reading Tag Content – Real-life Examples
Introduction
Making a phone call with one tap – Part 2
Sending a predefined SMS – Part 2
Leaving a (small) note – Part 2
Getting the tag information
Chapter 7: Sharing Content across Devices
Introduction
Creating a basic peer-to-peer Hello World application
Sending texts to other devices
Sending a friend invite on Facebook
Inviting a friend to play a game – Part 1
Chapter 8: Error Handling and Content Validation
Introduction
Handling tag-writing errors
Handling tag-reading errors
Testing the tag data for integrity
Chapter 9: Extending NFC
Introduction
Turning other adapters on/off
Configuring a Wi-Fi network
Starting a Wi-Fi hotspot
Inviting a friend to play a game – Part 2
Controlling hotel room access with Arduino and NFC – Part 1
Controlling hotel room access with Arduino and NFC – Part 2
Chapter 10: Real-life Examples – NFC Utilities
Introduction
Creating multi-action tags
Choosing the best format for our data
Locking tags
Joking with a friend

Book Details

ISBN 139781783289653
Paperback286 pages
Read More

Read More Reviews

Recommended for You

Internet of Things with ESP8266 Book Cover
Internet of Things with ESP8266
$ 31.99
$ 22.40
Android 5 Programming by Example Book Cover
Android 5 Programming by Example
$ 35.99
$ 7.20
Android 6 Essentials Book Cover
Android 6 Essentials
$ 23.99
$ 16.80
Programming Kotlin Book Cover
Programming Kotlin
$ 35.99
$ 25.20
Raspberry Pi Sensors Book Cover
Raspberry Pi Sensors
$ 23.99
$ 16.80
IoT: Building Arduino-Based Projects Book Cover
IoT: Building Arduino-Based Projects
$ 63.99
$ 44.80