Google Play services get substantial API update today

New features will work for Android 2.2 and up.

One of the first things announced today during the Google I/O conference's keynote was a bump to Google Play Services, the SDK that lets developers take advantage of Google services in their apps.

The service gained a number of updated and new APIs. First up is version 2 of the Google Maps Android, which lets developers build Google Maps functionality directly into apps.

Next are three location-related APIs: Fused Location Provider, Geofencing, and Activity Recognition. Fused Location Provider takes advantage of an Android device's extra sensors to quickly figure out the phone's location. According to Google, it's faster to acquire location, it's more accurate, and it uses less power than previous location services (Google says the new mode uses less than 1 percent of battery per hour). Geofencing gives app developers a standardized method to define up to 100 "fences" around areas and trigger actions when the device enters or leaves the area. Finally, Activity Recognition uses the device's accelerometer data and a number of machine-learning classifiers to let developers understand whether a user is walking, driving, or cycling with the Android device. It does not use GPS.

Another previously announced API receiving updates is the Google Plus single sign-in functionality, which lets people use Google account credentials to sign into apps. The update here introduces cross-platform single-sign. This lets a user sign on to an app or web site on one device (like a desktop computer) and automatically be logged on when he uses that app or web site on his other Android devices, or vice-versa.

Last year, Google brought to market its Google Cloud Messaging API, used for app and service messaging. GCM is now being incorporated into Google Play Services, with three new features. It now supports persistent connections between servers and Google for sending large numbers of messages to many clients simultaneously. Next, upstream messaging, which lets app developers use GCM to send data from app back to server (previously, GCM was downstream-only.) Thirdly, notifications can be synced between devices, so when a user dismisses a notification on one device, it's dismissed on all of his other Android devices.

The final thing being added to Google Play Services is a set of gaming APIs. The first of these is Cloud Save, which lets users save game data like level progression and game state across devices. Next are APIs for Achievements (cheevos!) and Leaderboards. Leaderboards can be global or can be used among specific circles in Google Plus (like if you just want to rank yourself against friends). Lastly, a Multiplayer API aims to take the heavy lifting of network play out of developers' hands and put it on Google's shoulders; the API provides matchmaking, latency management, and other backend functions to game devs.

The new Google Play Services will be available today with an updated version of the SDK. The update will work on any Android device running Android 2.2 ("Froyo") or better, and the new features are self-contained—in other words, they're not tied to new Android versions. This is good news, since it means that developers can use the SDK without having to worry about whether or not their users' phones support the new features.

Promoted Comments

I'm really pleased to see Google releasing several of these APIs on iOS as well. It'll be interesting to see if a cross-platform set of game services will overtake the Apple-only Game Center stuff, given that iOS seems to be thriving more when it comes to games.

15 Reader Comments

I'm really pleased to see Google releasing several of these APIs on iOS as well. It'll be interesting to see if a cross-platform set of game services will overtake the Apple-only Game Center stuff, given that iOS seems to be thriving more when it comes to games.

What Android needs now is to consume less power when gaming. My Atrix tegra 2 phone used up to 10% every 30 minutes when playing a very specific game available on two platforms where as my iPhone 4s used no more than 2%. The Atrix had a bigger battery.

I'm not sure this is a widespread issue or if it is specific to Android, but iOS seems more optimized for gaming, because the same thing happened to my old Acer Iconia A500 vs an iPad 2 or 3 for that matter.

I know that Radio, CPUs, GPUs and Displays are the main battery consumers, but I doubt that Apple has a significant technical advantage on either front when discussing power consumption, so I believe that software is more likely the culprit when huge discrepancies like these occur.

I suppose it's a response to Android fragmentation, but from a developer's point of view, it's interesting to see Google making major API announcements with so much backward compatibility.

Google Play has always been supported from Android 2.2 and up. It's the third party devs that are dropping pre-4.0 Android devices due to Android 4.0's SDK containing new tools to help making apps (such as Holo or the easy to use Settings fragment which I like that is not included in the compatibility package).

2% every 30 minutes on an iPhone? So 25 hours of continuous game playing on a full charge?

Maybe I exaggerated a little, but not by much. Currently my iPhone 5 lasts about 29-30 hours on a single charge with around 9-10 hours of usage. Of course, I use it only with Edge and WiFi. We don't have LTE here in my country yet and 3G is at best erratic and extremely limited (no more than 200 megs on a month until the connection is throttled to 64k which is in the ballpark of Edge anyway). I'd say that I can get at least 15 hours of play (The game in question is SuperBitDash) thanks to those extra 20h or so that would've been spent on idle. So yeah, maybe not 2%, but usually around 3% and never more than 5%. Still much less then the ~10% I got with my Atrix (which has a bigger battery at around ~1900mAh vs ~1500mAh).

Obviously this isn't more than anecdotal evidence on a very specific test (3D games more likely than not consume much more battery, but I'm making the comparison using the same game on two different phones) that may not be representative and maybe things changed dramatically with the move to ICS or JB, but I haven't noticed that on benchmarks as of late. And I'm definitely not lying:

There really should be an option for users to use location services from someone other than Google.

Similarly, the user really should be able to use any cloud storage service they like to so app backups, data syncs etc, without being forced to give data to Google.

Issues like this highlight perfectly how Android is not as "open" as some of the Google fanboys like to makle out.

I agree. Sure, we can use our own stuff (or some other service hosted on Amazon's servers for example) for file syncing and app backups. But with new things like notification sync, location services (which uses WiFi hotspots as navigational beacons from what I gather), we should be able to use our own equipment, or equipment of our choosing. For example, the WiGLE Wifi Hotspot database for WiFi location services, instead of having to "check in" to Google. There is no app that can do this, from what I gather. Only apps which can add to WiGLE's database. I would be very glad to be corrected on that statement.

edit: WiGLE offers chunks of its database (MapPacks) for download on its website for registered users. They are only available for counties of US states and D.C., unfortunately nothing for foreigners yet. Most of them can fit on a phone very easily. /edit

As a non-American, I am weary of using an American company's services. America has unstable data rights laws. And I'm afraid that with all these 'cloud' things hanging about, we're losing sight about what it means to own data.

Another thing that concerns me may be the possibility that Google could use these "Google Play Services" APIs to insidiously lock apps down so they will only run on Google-approved versions of Android with Gapps installed.

Lee Hutchinson / Lee is the Senior Reviews Editor at Ars and is responsible for the product news and reviews section. He also knows stuff about enterprise storage, security, and manned space flight. Lee is based in Houston, TX.