Book Image

Near Field Communication with Android Cookbook

By : Subtil
Book Image

Near Field Communication with Android Cookbook

By: Subtil

Overview of this book

An easy-to-follow guide, full of hands-on examples of and real-world applications. Each recipe is explained and placed in context. If you want to learn how to create NFC-enabled Android applications, this is the book for you. Perhaps you already know a bit about Android application developments but have never used NFC, or perhaps you know a little about NFC android development but want some more advanced features and examples. In either case, this book will get you up and running quickly. You are expected to have Android programming knowledge.
Table of Contents (12 chapters)
11
Index

Sending a friend invite on Facebook


Social networks allow us to interact with our friends and the world as they are getting increasingly globalized. NFC can also play its part in social networking by facilitating and improving the user's experience. In this recipe, we will see how the NFC technology can bring people closer by simplifying the process of initiating friend requests on Facebook.

Getting ready

We need the following settings for this recipe:

  • We will need two active Facebook accounts. One account should be a part of the developer program.

  • The Facebook application needs to be installed on the emulators (you can learn how to do this by navigating to https://developers.facebook.com/docs/android/getting-started/#install) or on the smartphones, and each one should be signed in with a different account.

How to do it…

In this application, we will send a Facebook friend request with an NDEF message by performing the following steps:

  1. Download the Facebook SDK for Android from https://developers...