Create Intelligent, Context-Aware Apps with the Google Awareness APIs | Android Developers Blog
Using 7 different types of context—including location, weather, user activity, and nearby beacons—your app can better understand your users’ current situations, and use this information to provide optimized and customized experiences.
The Awareness API offers two ways to take advantage of context signals within your app:
The Snapshot API lets your app easily request information about the user's current context. For example, "give me the user's current location and the current weather conditions".
The Fence API lets your app react to changes in user’s context - and when it matches a certain set of conditions. For example, "tell me whenever the user is walking and their headphones are plugged in". Similar to the Geofencing API, once an awareness fence is registered, it can send callbacks to your app even when it's not running.
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.