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

Visiting our website

NFC tags come in a variety of sizes and formats. One of these formats is the business card. Imagine how cool it would be for people to open your company website with just a tap! Besides having a very unique business card, you will get people directed to the website very quickly. Through this application, we will be able to store a website's URL in a tag easily.

How to do it…

In this first part of the development of this application, we will allow the user to write a URL in the application and save it in a tag. User can also go to the web browser and share a link to the application, avoiding the need to write it themselves. This can be done with the following steps:

  1. Open Eclipse and create a new Android application project named NfcBookCh4WebLink and a package named nfcbook.ch4weblink.

  2. Make sure the AndroidManifest.xml file is configured correctly —refer to the Requesting NFC permissions recipe in Chapter 1, Getting Started with NFC.

  3. Add the following lines of code inside...