Google is giving Android developers the tools to create apps that know what's happening around people and respond to their current environment and activities.
Those tools come in the form of Google's new Android Awareness API, which it announced on Thursday at I/O. The API is designed to make apps more contextually-aware and enable them to react to users' current situation, such as whether they're jogging, or in a coffee shop.
The Awareness API can obtain these insights by squeezing out precise details about a user's context from the smartphone's sensors.
Awareness builds a picture based on seven factors, including local time, location, the type of place, activity, nearby beacons, whether headphones are plugged in, and current weather conditions.
By piecing together data about these context signals, apps will be able to make a judgement about what the user is doing and then respond, for example, by suggesting a playlist when the user plugs in headphones and starts jogging.
It could also be used to adjust a smartphone's alarm automatically, based on when the user went to sleep and whether a meeting is scheduled in the calendar.
Google envisages it connecting with other devices too, such as Google's Home device, combining weather or traffic data from apps for Home to suggest a time to leave the house so as not to miss a meeting.
Though Awareness is billed as a single API, it actually consists of two APIs that tell where users are, what they're doing, what's around them, and when to take an action.
The Snapshot API gives a picture of the user's environment based on the seven signals, while the Fence API, lets developers set conditions that need to be met to trigger an action and can do so even when an app is not running.
So, in future, users won't need to remember to launch their fitness tracker before going for a run, or combining activity with geofencing. An app can automatically remind the user to take an action if the user drives near a particular business.
The Snapshot API has been designed to minimize impact on the battery and memory so that apps using these background processes don't overburden the user's phone.
Given the level of detail apps will be getting about users with Awareness, Google has enabled end-user permissions for each of the data types it will share with developers.
Location, place, beacon and weather fit within Android's Access Fine Location permission. Activity also requires permission, while knowing whether users have headphones plugged in does not.
Awareness is available today in preview as a Google Play Services API.
Read more about Android
- Inside Android Wear 2.0: Big update with standalone apps, tiny keyboard, new UI
- Google stokes up Firebase to create unified platform for app developers
- Google to introduce family sharing for apps
- Google I/O: The new features in Google's latest OS, Android N
- Google I/O: Instant Apps meld mobile web, Android app experiences
- Google I/O: Android Studio 2.2 goes preview