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.
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:
Open Eclipse and create a new Android application project named
NfcBookCh4WebLink
and a package namednfcbook.ch4weblink
.Make sure the
AndroidManifest.xml
file is configured correctly —refer to the Requesting NFC permissions recipe in Chapter 1, Getting Started with NFC.Add the following lines of code inside...