After giving us a taste of various updates coming to the Android ecosystem at the I/O Developer Conference, Google is today introducing a new Awareness API to enable developers to intelligently react to user-data. This gives them the freedom to access data on how users use their Android devices on the daily.

The Awareness API introduces seven different contextually-aware data points that the developers now have access to in a single API. These include location, weather, user activity, and nearby beacons to name a few. Developer can thus use this currently available data to provide more optimized and customized experiences to each user. And this also doesn’t add any overhead to the battery consumption or memory consumption of the user’s device.

Dual Advantage

The Awareness API offers developers with two ways to take advantage of the contextually aware signals within the application:

  • Snapshot API : This lets you instantly get access to user’s current location and environment data, by accessing seven signals from the single API cluster. This might apply to situations like getting the user’s current location or weather conditions, to know whether he/she is walking or running, or whether the headphone jack is plugged in or not.
  • Fence API : This API comes into use once you have gathered the user data using the aforementioned API. Once it matches a certain set of conditions set by the developer, then the app can react to the changes induced. It will let developers send callbacks(or notifications) based on the awareness fence created by them. For example, if you’re going for a morning run and have the headphones plugged-in, then an app like SuperPlayer Music will prompt you with tailored playlists to help you enjoy your run.

google-awareness-api-android

As a single, simplified surface, the Awareness APIs combine optimally processed context signals in new ways that were not previously possible, providing more accurate and insightful context cues, while also managing system resources to save battery and minimize bandwidth.

adds Bhavik Singh in the official blogpost.

This API will definitely provide developers with another realm of control and access to user-data and help them better deliver their services to the users. And to do this, Google is working closely with some of its partners, including Trulia, an online residential real-estate website and SuperPlayer Music.

Trulia is using the weather and user’s location data to know when they’re walking around a house they might be interested in. It then sends a notification reminding them to stop by and check the house out.

All developers now have access to Google’s Awareness API via the Google Play services. You can also watch this introductory video to get a look at how these API’s work.

If you’re interested in making your apps contextually-aware, then check-out the API documentation right here.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.