Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (35 loc) · 1.9 KB

File metadata and controls

51 lines (35 loc) · 1.9 KB

Awareness API sample (Snapshot API)

Demonstrates use of the Awareness APIs to intelligently react to the current situation of the user.

Introduction

The Awareness API exposes five different context types, which include user activity, and nearby beacons. These types enable your app to refine the user experience in new ways that were not possible before. Your app can combine these context signals to make inferences about the current situation of the user, and use this information to provide customized experiences, such as a playlist suggestion when the user plugs in their headphones and starts to jog.

This sample demonstrates the Snapshot API to get information about the current environment of the user.

Developers can find more about this API and other Awareness APIs in our Getting Started page.

Users can request the current environment by pressing the "Request Snapshot" button.

IMPORTANT NOTE: The Awareness APIs (both Snapshot and Fend) require an API key in your manifest. Check this link for more information.

Prerequisites

  • Android API Level >v26
  • Google (Support) Repository

Getting Started

This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.

Support

If you've found an error in this sample, please file an issue: https://github.com/android/location-samples/issues

Patches are encouraged, and may be submitted according to the instructions in CONTRIBUTING.md.