Inviting a friend to play a game – Part 1
Most of us have certainly played games that involve challenging someone to beat your record or inviting your friend to play against you. These invites are normally made using Facebook, or on e-mail, or even by SMS. In this recipe, we will create a simple application and implement an NFC-invite system that can be used together with the traditional invite methods.
How to do it…
In this application, we will create a simple method to share the player's information through an external-typed NDEF message. This information will be used later to allow Bluetooth pairing. This can be done by performing the following steps:
Open Eclipse and create a new Android application project named
NfcBookCh7Example4
and a package namednfcbook.ch7.example4
.Make sure the
AndroidManifest.xml
file is configured correctly —refer to the Requesting NFC permissions recipe in Chapter 1, Getting Started with NFC.Set the minimum SDK version to
16
with the following code:<uses-sdk...