The rollout for Google Play services v8.1 is complete and now it's time to open the floodgates for developers to begin working with some of the changes. When new versions come out, it's fairly common for Google to hold back a few extra details to be announced after the rollout has completed. This time around, there are improvements for the Maps API, Nearby API, and App Invites. The previously announced Play Games Play Stats API has been added, and Google has advice on properly handling Android 6.0 permissions. There are also a couple of minor breaking changes that have to be dealt with too.

Magnus Hyttsten has done another video with a quick description of the changes; but if you're not up for his sugar-induced, high-energy style, I've summarized the key points below.

  • The new Play Games Player Stats API is out, so developers can begin collecting more valuable information and build in more intelligent interactions with players based on the ways they use games.
  • App Invites have expanded email customization – It's now possible to set a custom image and specific text for the action button.
  • The Maps API has been updated to support its own variant of Ambient Mode on phones and tablets. Developers can now have maps rendered in a darker, low-color version for nighttime or low-light use.
  • The Nearby API now produces a callback that will alert an app if a publish or subscribe activity expires, or if Nearby is disabled. This will remove the need to manually track timeouts.
  • If apps are going to target 6.0 or above, some adjustments should be made to ensure any necessary permissions have already been granted by users before making calls into Play Services APIs. The permissions will be requested automatically, but it's better for the user experience when an app explains the need for a permission and handles situations where users have already disabled a permission. Details can be found in a post about Play Services 8.1 and Android 6.0.
  • There are breaking changes in the GoogleApiClient, PendingResult, and OptionalPendingResult classes. They've been turned from interfaces into abstract classes. If an app directly implemented these interfaces, they should now extend them instead.

To get set up with the latest version of the Google Play services SDK, open the SDK Manager and begin updating. As always, documentation is available on the Google Developers portal along with sample code and more.

Source: Android Developers Blog