When we develop an app to write and read NFC tags, we most probably want this to happen when the user taps on a tag on their phone, and our app starts automatically even if it isn't running in the foreground. The Android system provides us with a pretty simple solution for this—AAR.
Open Eclipse and create a new Android application project named
NfcBookCh3Example4with the package name
Make sure the
AndroidManifest.xmlfile is configured correctly (refer to the Requesting NFC permissions recipe of Chapter 1, Getting Started with NFC).
Set the minimum SDK version to 14:
<uses-sdk android:minSdkVersion="14" />
Make sure the foreground dispatch system is enabled (refer to the Understanding the foreground dispatch system recipe in Chapter 2, Detecting a Tag).