Get Started

This document explains how to start developing with the Awareness API on
Android. The Awareness API is part of Google Play services.

To use the Awareness API, you need a Google Account.
If you already have an account, then you're all set. You may also want a
separate Google Account for testing purposes.

Set up Google Play services

To access the Awareness API, your app's development project must include Google
Play services. Download and install the Google Play services component via the
SDK Manager and
add the library to your project. For details, see the Android guide to
setting up Google Play services.

Add your API key

If you haven't already enabled the Awareness API and obtained a Google API key,
follow the steps in Signup and API keys
to do so.

Add your API key to your app manifest as shown in the following code sample,
replacing YOUR_API_KEY with your own API key:

Connect to the Awareness API

To connect to the Awareness API, you must create an instance of the Google Play
Services API client. In your fragment's or activity's onCreate()
method, create an instance of the Google API Client using GoogleApiClient.Builder.
Use the builder to add the Awareness API, as shown in the following code sample: