O'Reilly logo

Near Field Communication with Android Cookbook by Vitor Subtil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. Open Eclipse and create a new Android application project named NfcBookCh7Example4 and a package ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required