Google Play services provides you with easy access to Google services and is tightly integrated with the Android OS. Easy-to-use client libraries are provided for each service that let you implement the functionality you want easier and faster.
All products in Google Play services share a common authorization API that leverages the existing Google accounts on the device. You and your users have a consistent and safe way to grant and receive OAuth2 access tokens to Google services.
Devices running Android 2.3 or higher that have the Google Play Store app will automatically receive updates to Google Play services. Enhance your app with the most recent version of Google Play services without worrying about your users' Android version.
To start integrating Google Play services into your app, follow the Setup guide.
Google Play services, Version 7.3 (April 2015)
- Highlights in Version 7.3
For a summary of the feature highlights in Google Play services 7.3, see the announcement blog post.
Wear - This release provides you with the ability
to advertise and discover the capabilities of devices that are connected in a Wear network, through
CapabilityApiclass. The new
ChannelApiclass lets you send and receive data bi-directionally from your wearable app on a device to another wearable node. Use the Channel API to send large files for offline access or to stream real-time binary data.
Fit - This release provides a new
HistoryApi.readDailyTotal()method for you to get aggregated daily data for a given data type. This release also introduces data types for recording granular nutrition information including protein, fat, cholesterol, and more.
Location - This release adds a maximum wait time for location updates. By
calling the new
setMaxWaitTime()method and passing in a value at least double the value requested with the
setInterval()method, the system can batch location updates together, reducing battery usage and, on some devices, improving location accuracy. In addition, you can use the new
LocationCallbackclass to be notified when the device location has changed or can no longer be determined.
Places - This release adds a
PlaceBuffer.getAttributions()method for displaying third-party attributions.
- Wear - This release provides you with the ability to advertise and discover the capabilities of devices that are connected in a Wear network, through the new
Google Play services, Version 7.0 (March 2015)
- Highlights in Version 7.0
For a summary of the feature highlights in Google Play services 7.0, see the announcement blog post.
- Places - Using the Google Places API for Android, you can build location-aware apps that respond contextually to the local businesses and other places near the device. Use the built-in place picker UI widget and API methods to find the device’s current place, autocomplete users’ queries, and more.
- Location settings - While the
FusedLocationProviderApicombines multiple sensors to give you the optimal location, the accuracy of the location your app receives still depends greatly on the settings enabled on the device (GPS, wifi, airplane mode, and others). Using the new
SettingsApiclass, you can bring up a Location Settings dialog which displays a one-touch control for users to change their settings without leaving your app.
- Fit - The Google Fit API is now more efficient with modular calls to specific functionality within the API. You can now also access distance and granular sleep data.
- Google Mobile Ads - This release introduces the
addCategoryExclusion()methods to the
PublisherAdRequest.Builderclass, enabling DoubleClick for Publishers (DFP) developers to target custom criteria and use ad exclusions to block ads.
- Play Game services - The Nearby Connections API allows users to connect to each other and exchange messages over a local network. This API supports local multiplayer and second screen gaming.
- Google API client - This release introduces the
GoogleApiClient.Builder.requestServerAuthCode()method. This API makes it significantly easier to enable servers to be able to make Google API calls on behalf of users. This method reduces the lines of boilerplate code that you previously had to implement.
Drive - This release adds
untrash()methods to the
DriveResourceclass. These methods enable you to move user-visible files and folders to the trash or restore them from the trash. Trashing a folder recursively trashes its children. The
isExplicitlyTrashed()method indicates whether a resource was trashed directly, or as the result of a trashed parent.
- SafetyNet API - The API lets you check if your app is running on a device that matches a device model that has passed Android compatibility testing. The API evaluates both software and hardware characteristics of a device to determine whether it matches a known-good configuration that has been previously determined to be compatible. You can use the SafetyNet API in conjunction with other tools to determine whether the device appears capable of handling specific features in your app.
Google Play services, Version 6.5 (December 2014)
- Highlights in Version 6.5
For a summary of the feature highlights in Google Play services 6.5, see the announcement blog post.
- Maps - The new lite mode lets your app display a
bitmap image of a map, while still being able to control markers and shapes
client-side. This is particularly useful when you're showing a number of small
maps. You can enable or disable a new map toolbar that lets users open
Google Maps and
get directions and turn by turn navigation to the selected marker. The
MapFragmentis now deprecated in favor of the new
getMapAsync()method. Similarly, the new
StreetViewPanoramaFragmentenables you to get a ready-to-use Street View panorama.
- Drive - This release introduces support for inserting or updating custom properties. You can now create empty files (for example, a user preference file that is empty until the user defines some application property).
- Fit - The Fit API now supports activity segments
DataType.TYPE_ACTIVITY_SEGMENT), which enable you to represent pauses within a workout session and to annotate time intervals inside a session with different fitness activities.
- Wallet - You can now enable donations from your Android
app in the same way you enable purchases. To do so, create a
WalletFragmentand specify the
BUY_BUTTONmode, then set the button text to
Note: Use of the Donate with Google button is limited to 501(c)(3) organizations. For more information, see the Content policies.
- Granular dependency management - If the number of references in your app exceeds the 65K method reference limit, your app may fail to compile. To avoid this problem, you can include just the specific Google Play services APIs your app uses, instead of all of them, when compiling your app. For more details, see the Android Studio setup instructions in Setting Up Google Play Services.
- Deprecated clients - The
PlusClientclasses are deprecated. If you used those APIs in your app and want to call Google Play services 6.5 or higher APIs, you must switch to the new programming model that utilizes
GoogleApiClient. For more information about using
GoogleApiClient, see Accessing Google APIs.
Use these APIs instead of the deprecated APIs:
- If you were previously using
- If you were previously using
LocationClient, call the APIs in the
- If you were previously using
PlusClient, call the APIs in the
- If you were previously using
- Maps - The new lite mode lets your app display a bitmap image of a map, while still being able to control markers and shapes client-side. This is particularly useful when you're showing a number of small maps. You can enable or disable a new map toolbar that lets users open Google Maps and get directions and turn by turn navigation to the selected marker. The
Google Play services, Version 6.1 (October 2014)
- Highlights in Version 6.1
For a summary of the feature highlights in Google Play services 6.1, see the announcement blog post.
- Drive - This release adds the
CompletionEventclass to notify you when actions are committed to the server and respond to conflicts. Recent and starred views are now available in the file picker user interface provided by
OpenFileActivityBuilder, and the user interface has been updated to use material design. A new DriveResource.setParents() method makes it possible to organize files and folders. In addition, the
Contentsclass has been replaced with a
DriveContentsclass that simplifies working with file contents.
- Tag Manager - Google Tag Manager now supports Enhanced Ecommerce through the Universal Analytics tag.
- Fit - The Google Fit developer preview, initially announced in August, has been refreshed to enable you to test your new fitness apps on any Android device.
- Drive - This release adds the
Google Play services, Version 5.0 (July 2014)
- Highlights in Version 5.0
For a summary of the feature highlights in Google Play services 5.0, see the announcement blog post.
- Analytics - The Enhanced Ecommerce API allows your app to send product related information and actions to Google Analytics. Use this API to measure impressions of products seen by users, checkout steps, and products purchased. This information can be analyzed for the effectiveness of marketing and merchandising efforts, including the impact of internal promotions, coupons, and affiliate marketing programs.
- App Indexing - The App Indexing API provides a way for developers to notify Google about deep links in their native apps and allows the Google Search App, version 3.6 and above, to drive re-engagement through Google Search query autocompletions, providing fast and easy access to inner pages in apps.
- Drive - The Query APIs now allow your app to retrieve Drive files by sorted order, according to a developer-specified sorting criteria.
- Play Games - This release introduces the Quests and Saved Games services. The Quests service gives you the ability to issue time-bound in-game challenges based on Events data sent from your game, without republishing your game (for example: Your game sends an event each time a “gem” is found by a player, and you create a quest to “Find 20 gems”). Players can complete a quest to earn rewards. Saved Games offers improved functionality for saving game state information and visually displaying player game progression.
- Security - The Security API allows you to easily install a dynamic security provider. New versions of Google Play Services will keep the security provider up-to-date with the latest security fixes as those become available.
- Wallet - The Save to Google API for Android lets users save Wallet Objects to their Google Wallet with the click of a button displayed in your Android app.
- Wearables - The Wearable Data Layer API provides a communication channel between your handheld and wearable apps. The API consists of a set of data objects that the system can send and synchronize and listeners that notify your apps of important events from the other device.
Google Play services, Version 4.4 (May 2014)
- Highlights in Version 4.4
For a summary of the feature highlights in Google Play services 4.4, see the announcement blog post.
- Maps - New features for Street View and enhanced control of Indoor Maps.
- Activity recognition - The Location API has been updated with new activity detectors for running and walking.
- Mobile Ads - The new in-app purchase APIs allow publishers to display in-app purchase ads, which enables users to purchase advertised items directly.
- Wallet Fragment - The new Wallet Fragment API allows you to easily integrate Google Wallet Instant Buy with an existing app.
Google Play services, Version 4.3 (March 2014)
- Highlights in Version 4.3
For a summary of the feature highlights in Google Play services 4.3, see the announcement blog post.
- Play Games - The new Game Gifts API enables games to send virtual in-game requests to anyone in a player’s circles or through player search.
- Analytics - Google Analytics and Tag Manager are now part of Google Play services.
- Drive - Change notifications, offline content, and more.
- Address - Let your users provide complete addresses in a single click.
How It Works
The Google Play services client library
The client library contains the interfaces to the individual Google services and allows you to obtain authorization from users to gain access to these services with their credentials. It also contains APIs that allow you to resolve any issues at runtime, such as a missing, disabled, or out-of-date Google Play services APK. The client library has a light footprint if you use ProGuard as part of your build process, so it won't have an adverse impact on your app's file size.
If you want to access added features or products, you can upgrade to a new version of the client library as they are released. However, upgrading is not necessary if you don't care about new features or bug fixes. We anticipate more Google services to be continuously added, so be on the lookout for these updates.
The Google Play services APK
The Google Play services APK contains the individual Google services and runs as a background service in the Android OS. You interact with the background service through the client library and the service carries out the actions on your behalf. An easy-to-use authorization flow is also provided to gain access to the each Google service, which provides consistency for both you and your users.
The Google Play services APK is delivered through the Google Play Store, so updates to the services are not dependent on carrier or OEM system image updates. In general, devices running Android 2.3 (Gingerbread) or later and have the Google Play Store app installed receive updates within a few days. This allows you to use the newest APIs in Google Play services and reach most of the devices in the Android ecosystem (devices older than Android 2.3 or devices without the Google Play Store app are not supported).
The benefits for your app
Google Play services gives you the freedom to use the newest APIs for popular Google services without worrying about device support. Updates to Google Play services are distributed automatically by the Google Play Store and new versions of the client library are delivered through the Android SDK Manager. This makes it easy for you to focus on what's important: your users' experience.
To get started, set up the SDK and check out the various products in the Google Play services platform now!