• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Google Play Services
2header.hide=1
3
4@jd:body
5
6<div class="landing-banner">
7
8<div class="col-6">
9  <img src="/images/google/gps.png" alt="">
10</div>
11<div class="col-6">
12
13  <h1 itemprop="name" style="margin-bottom:0;">Google Play Services</h1>
14  <p itemprop="description">Give your apps more features to attract users
15  on a wider range of devices.
16  With Google Play services, your app can take advantage
17  of the latest, Google-powered features such as Maps, Google+, and more,
18  with automatic platform updates distributed as an APK through
19  the Google Play store. This makes it faster for your users to receive updates
20  and easier for you to integrate the newest that Google has to offer.
21  </p>
22
23</div>
24</div>
25
26  <div class="layout-content-row">
27  <div class="layout-content-col span-4">
28
29<h4>Google Technology</h4>
30<p>Google Play services provides you with easy access to Google services and is
31tightly integrated with the Android OS. Easy-to-use client libraries are
32provided for each service that let you implement the functionality you want
33easier and faster.</p>
34
35  </div>
36  <div class="layout-content-col span-4">
37
38<h4>Standard Authorization</h4>
39<p>All products in Google Play services share a common authorization API
40  that leverages the existing Google accounts on the device. You and your
41  users have a consistent and safe way to grant and receive OAuth2 access tokens
42  to Google services.</p>
43
44  </div>
45  <div class="layout-content-col span-4">
46
47<h4>Automatic Updates</h4>
48<p>Devices running Android 2.3 or higher that have the Google Play Store
49app will automatically receive updates to Google Play services. Enhance
50your app with the most recent version of Google Play services without worrying
51about your users' Android version.</p>
52
53  </div>
54
55
56   <p>To start integrating Google Play services into your app,
57   follow the <a href="/google/play-services/setup.html">Setup</a> guide.</p>
58
59</div>
60
61<h2 style="margin-top:0" id="newfeatures">New Features</h2>
62
63
64<div class="toggle-content opened">
65  <p><a href="#" onclick="return toggleContent(this)">
66    <img src="{@docRoot}assets/images/triangle-opened.png"
67    class="toggle-content-img"
68      alt=""/>Google Play services, Version 6.1</a> <em>(October 2014)</em>
69  </p>
70
71  <div class="toggle-content-toggleme">
72<dl>
73<dt>Highlights in Version 6.1</dt>
74
75<dd>
76<p>For a summary of the feature highlights in Google Play services 6.1, see the
77announcement
78<a href="http://android-developers.blogspot.com/2014/09/google-play-services-61.html"
79class="external-link">blog post</a>.</p>
80<ul>
81  <li><strong>Drive</strong> - This release adds the
82    <a href="{@docRoot}reference/com/google/android/gms/drive/events/CompletionEvent.html">
83      <code>CompletionEvent</code></a> class to notify you when actions are
84      committed to the server and respond to conflicts. Recent and starred views
85      are now available in the file picker user interface provided by
86    <a href="{@docRoot}reference/com/google/android/gms/drive/OpenFileActivityBuilder.html">
87    <code>OpenFileActivityBuilder</code><a/>, and the user interface has been
88    updated to use
89      <a href="{@docRoot}preview/material/index.html">material design</a>. A new
90    <a href="{@docRoot}reference/com/google/android/gms/drive/DriveResource.html#setParents(com.google.android.gms.common.api.GoogleApiClient, java.util.Set<com.google.android.gms.drive.DriveId>)">
91      DriveResource.setParents()</a> method makes it possible to organize files
92    and folders. In addition, the
93    <a href="{@docRoot}reference/com/google/android/gms/drive/Contents.html">
94      <code>Contents</code></a>
95    class has been replaced with a
96    <a href="{@docRoot}reference/com/google/android/gms/drive/DriveContents.html">
97      <code>DriveContents</code></a> class that simplifies working with file
98      contents.
99  <ul>
100    <li><a href="https://developers.google.com/drive/release-notes"
101      class="external-link">Drive SDK release notes</a></li>
102    <li><a href="https://developers.google.com/drive/android/completion"
103      class="external-link">Completion events developer guide and Google
104      Developers video</a></li>
105    <li><a href="https://developers.google.com/drive/android/intro?hl=pt-PT#activity_builders"
106      class="external-link">Using the OpenFileActivity Builder</a></li>
107  </ul>
108  </li>
109
110  <li><strong>Tag Manager</strong> - Google Tag Manager now supports
111    <a href="https://developers.google.com/analytics/devguides/collection/android/v4/enhanced-ecommerce"
112    class="external-link">Enhanced Ecommerce</a> through the
113    <a href="https://support.google.com/tagmanager/answer/3281379"
114    class="external-link">Universal Analytics tag</a>.
115    <ul>
116      <li><a href="https://developers.google.com/analytics/devguides/collection/upgrade/"
117        class="external-link">Universal Analytics Upgrade Center</a></li>
118      <li><a href="https://developers.google.com/tag-manager/android/v4/"
119        class="external-link">Enhanced Ecommerce developer guide</a></li>
120    </ul>
121  </li>
122
123  <li><strong>Fit</strong> - The Google Fit developer preview, initially
124  <a href="http://googledevelopers.blogspot.com/2014/08/google-fit-preview-sdk-now-available.html"
125  class=""external-link>announced</a> in August, has been
126  refreshed to enable you to test your new fitness apps on any Android device.
127    <ul>
128      <li><a href="https://developers.google.com/fit/preview"
129        class="external-link">Google Fit developer guide</a></li>
130      <li><a href="{@docRoot}reference/com/google/android/gms/fitness/package-summary.html">
131        Fit API reference</a></li>
132    </ul>
133  </li>
134
135</ul>
136</dd>
137</dl>
138
139  </div>
140</div>
141
142<div class="toggle-content closed">
143  <p><a href="#" onclick="return toggleContent(this)">
144    <img src="{@docRoot}assets/images/triangle-closed.png"
145    class="toggle-content-img"
146      alt=""/>Google Play services, Version 5.0</a> <em>(July 2014)</em>
147  </p>
148
149  <div class="toggle-content-toggleme">
150<dl>
151<dt>Highlights in Version 5.0</dt>
152
153<dd>
154<p>For a summary of the feature highlights in Google Play services 5.0, see the
155announcement
156<a href="http://android-developers.blogspot.com/2014/07/google-play-services-5.html"
157class="external-link">blog post</a>.</p>
158<ul>
159  <li><strong>Analytics</strong> - The Enhanced Ecommerce API allows your app
160to send product related information and actions to Google Analytics. Use this
161API to measure impressions of products seen by users, checkout steps, and
162products purchased. This information can be analyzed for the effectiveness of
163marketing and merchandising efforts, including the impact of internal
164promotions, coupons, and affiliate marketing programs.
165  <ul>
166    <li><a href="https://developers.google.com/analytics/devguides/collection/android/v4/enhanced-ecommerce.html" class="external-link">Enhanced Ecommerce developer guide</a></li>
167    <li><a href="{@docRoot}reference/com/google/android/gms/analytics/ecommerce/package-summary.html">Enhanced Ecommerce API reference</a></li>
168  </ul>
169  </li>
170
171  <li><strong>App Indexing</strong> - The App Indexing API provides a way
172for developers to notify Google about deep links in their native apps and
173allows the Google Search App, version 3.6 and above, to drive re-engagement
174through Google Search
175<a href="https://support.google.com/websearch/answer/106230"
176class="external-link">query autocompletions</a>, providing fast and easy access to
177inner pages in apps.
178  <ul>
179    <li><a href="https://developers.google.com/app-indexing/webmasters/appindexingapi.html"
180class="external-link">App Indexing developer guide</a></li>
181    <li><a href="{@docRoot}reference/com/google/android/gms/appindexing/package-summary.html">App
182Indexing API reference</a></li>
183  </ul>
184  </li>
185
186  <li><strong>Drive</strong> - The Query APIs now allow your app to retrieve
187Drive files by sorted order, according to a developer-specified sorting criteria.
188    <ul>
189      <li><a href="https://developers.google.com/drive/android/queries.html"
190class="external-link">Queries developer guide</a></li>
191      <li><a href="{@docRoot}reference/com/google/android/gms/drive/query/package-summary.html">Sortable
192queries API reference</a></li>
193    </ul>
194  </li>
195
196  <li><strong>Play Games</strong> - This release introduces the Quests and
197Saved Games services. The Quests service gives you the ability to issue
198time-bound in-game challenges based on Events data sent from your game, without
199republishing your game (for example:  Your game sends an event each time a
200“gem” is found by a player, and you create a quest to “Find 20 gems”). Players
201can complete a quest to earn rewards. Saved Games offers improved functionality
202for saving game state information and visually displaying player game progression.
203    <ul>
204    <li><a href="https://developers.google.com/games/services/android/quests.html"
205class="external-link">Events and Quests developer guide</a></li>
206    <li><a href="{@docRoot}reference/com/google/android/gms/games/event/package-summary.html">Events
207API reference</a></a></li>
208    <li><a href="{@docRoot}reference/com/google/android/gms/games/quest/package-summary.html">Quests
209API reference</a></a></li>
210    <li><a href="https://developers.google.com/games/services/android/savedgames.html"
211class="external-link">Saved Games developer guide</a></li>
212    <li><a href="{@docRoot}reference/com/google/android/gms/games/snapshot/package-summary.html">Saved
213Games API reference</a></a></li>
214  </ul>
215  </li>
216
217  <li><strong>Security</strong> - The Security API allows you to easily
218install a dynamic security provider. New versions of Google Play Services will
219keep the security provider up-to-date with the latest security fixes as those
220become available.
221    <ul>
222      <li><a href="{@docRoot}reference/com/google/android/gms/security/package-summary.html">Security
223API reference</a></li>
224    </ul>
225  </li>
226
227    <li><strong>Wallet</strong> - The Save to Google API for Android lets users
228save Wallet Objects to their Google Wallet with the click of a button displayed
229in your Android app.
230    <ul>
231      <li><a href="https://developers.google.com/wallet/objects/savetowalletnative.html"
232class="external-link">Save to Google API for Android tutorial</a></li>
233    </ul>
234  </li>
235
236
237    <li><strong>Wearables</strong> - The Wearable Data Layer API provides a
238    communication channel between your handheld and wearable apps. The API
239    consists of a set of data objects that the system can send and synchronize
240    and listeners that notify your apps of important events from the other
241    device.
242    <ul>
243      <li><a href="{@docRoot}training/wearables/apps/index.html">Building
244Wearable Apps training class</a></li>
245      <li><a href="{@docRoot}reference/com/google/android/gms/wearable/package-summary.html">Wearables
246API reference</a></li>
247    </ul>
248  </li>
249
250</ul>
251</dd>
252</dl>
253
254  </div>
255</div>
256
257<div class="toggle-content closed">
258  <p><a href="#" onclick="return toggleContent(this)">
259    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
260      alt=""/>Google Play services, Version 4.4</a> <em>(May 2014)</em>
261  </p>
262
263  <div class="toggle-content-toggleme">
264<dl>
265<dt>Highlights in Version 4.4</dt>
266
267<dd>
268<p>For a summary of the feature highlights in Google Play services 4.4, see the
269announcement <a href="http://android-developers.blogspot.com/2014/05/google-play-services-44.html" class="external-link">blog post</a>.</p>
270<ul>
271  <li><strong>Maps</strong> - New features for Street View and enhanced control of
272  Indoor Maps.
273  <ul>
274    <li><a href="http://developers.google.com/maps/documentation/android/streetview.html" class="external-link">Street View developer guide</a> - Add Street View to your app and programmatically control
275      the user’s experience.
276    <li><a href="http://developers.google.com/maps/documentation/android/map.html#indoor_maps" class="external-link">Indoor Maps developer guide</a> - Customize the level picker
277      and specify the active level of a building.</a>
278  </ul>
279  </li>
280
281  <li><strong>Activity recognition</strong> - The Location API has been updated with new activity detectors for running and walking.
282    <ul>
283      <li><a href="{@docRoot}reference/com/google/android/gms/location/DetectedActivity.html"><code>DetectedActivity</code> class reference</a>
284    </ul>
285  </li>
286
287  <li><strong>Mobile Ads</strong> - The new in-app purchase APIs allow
288    publishers to display in-app purchase ads, which enables users to purchase
289    advertised items directly.
290    <ul>
291      <li><a href="https://developers.google.com/mobile-ads-sdk/docs/admob/advanced#play-inapppurchaselistener" class="external-link">In-app purchase APIs developer guide</a> -
292        Enable in-app purchases via ads by using the in-app purchase APIs.
293      <li><a href="{@docRoot}reference/com/google/android/gms/ads/purchase/package-summary.html">In-app purchase API reference</a>
294    </ul>
295  </li>
296
297  <li><strong>Wallet Fragment</strong> - The new Wallet Fragment API allows you
298    to easily integrate Google Wallet Instant Buy with an existing app.
299    <ul>
300    <li><a href="http://developers.google.com/wallet/instant-buy/android/tutorial.html#about_walletfragment" class="external-link">About Wallet Fragment</a> - Tutorial showing how to
301      use wallet fragment to handle user events and to automate key parts of the purchase lifecycle.
302    <li><a href="http://developers.google.com/wallet/instant-buy/diagrams.html#detailed_api_process_flow" class="external-link">Detailed API process flow</a></a>
303  </ul>
304  </li>
305</ul>
306</dd>
307</dl>
308
309  </div>
310</div>
311
312<div class="toggle-content closed">
313  <p><a href="#" onclick="return toggleContent(this)">
314    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
315      alt=""/>Google Play services, Version 4.3</a> <em>(March 2014)</em>
316  </p>
317
318  <div class="toggle-content-toggleme">
319<dl>
320<dt>Highlights in Version 4.3</dt>
321<dd>
322<p>For a summary of the feature highlights in Google Play services 4.3, see the
323announcement <a href="http://android-developers.blogspot.com/2014/03/google-play-services-43.html" class="external-link">blog post</a>.</p>
324<ul>
325<li><strong>Play Games</strong> - The new Game Gifts API enables games to send virtual in-game requests to anyone in a player’s circles or through player search.
326   <ul>
327      <li><a href="http://developers.google.com/games/services/android/giftRequests.html" class="external-link">Developing Game Gifts in Android</a></li>
328      <li><a href="{@docRoot}reference/com/google/android/gms/games/request/package-summary.html">Game Gifts API reference</a></li>
329   </ul>
330</li>
331<li><strong>Analytics</strong> - Google Analytics and Tag Manager are now part of Google Play services.
332   <ul>
333      <li><a href="http://developers.google.com/analytics/devguides/collection/android/v4/" class="external-link">Getting Started with the Analytics API in Android</a></li>
334      <li><a href="/reference/com/google/android/gms/analytics/package-summary.html">Analytics API reference</a></li>
335      <li><a href="http://developers.google.com/tag-manager/android/" class="external-link">Getting Started with the Tag Manager API in Android</a></li>
336      <li><a href="{@docRoot}reference/com/google/android/gms/tagmanager/package-summary.html">Tag Manager API reference</a></li>
337   </ul>
338</li>
339<li><strong>Drive</strong> - Change notifications, offline content, and more.
340   <ul>
341      <li><a href="http://developers.google.com/drive/android/pinning.html" class="external-link">Pinning Files</a> - Make files available offline.</li>
342      <li><a href="http://developers.google.com/drive/android/events.html" class="external-link">Listening for Change Events</a> - Receive notifications for change events asynchronously.</li>
343      <li><a href="http://developers.google.com/drive/android/appfolder.html" class="external-link">Storing Application Data</a> - Store application data in a special hidden folder.</li>
344   </ul>
345</li>
346<li><strong>Address</strong> - Let your users provide complete addresses in a single click.
347   <ul>
348      <li><a href="{@docRoot}reference/com/google/android/gms/identity/intents/package-summary.html">Address API reference</a> </li>
349   </ul>
350</li>
351</ul>
352</dd>
353</dl>
354  </div>
355</div>
356
357<h2>How It Works</h2>
358
359<h4 id="client-lib">The Google Play services client library</h4>
360<p>
361    The client library contains the interfaces to the individual Google
362    services and allows you to obtain authorization from users to gain access
363    to these services with their credentials. It also contains APIs that allow
364    you to resolve any issues at  runtime, such as a missing, disabled, or out-of-date
365    Google Play services APK. The client library has a light footprint if you use
366    <a href="/tools/help/proguard.html">ProGuard</a> as part of your build process, so it won't have
367    an adverse impact on your app's file size.
368</p>
369<p>
370    If you want to access added features or products, you can upgrade to a new version of the
371    client library as they are released. However, upgrading is not
372    necessary if you don't care about new features or bug fixes.
373    We anticipate more Google services to be continuously added, so be on the lookout for
374    these updates.
375</p>
376
377<div class="vspace size-2">&nbsp;</div>
378
379<div class="layout-content-row">
380  <div class="layout-content-col span-6">
381    <h4 id="apk">The Google Play services APK</h4>
382    <p>
383        The Google Play services APK contains the individual Google services and runs
384        as a background service in the Android OS. You interact with the background service
385        through the client library and the service carries out the actions on your behalf.
386        An easy-to-use authorization flow is also
387        provided to gain access to the each Google service, which provides consistency for both
388        you and your users.
389    </p>
390    <p>
391      The Google Play services APK is delivered through the Google Play Store, so
392      updates to the services are not dependent on carrier or OEM system image updates. In general, devices
393      running Android 2.3 (Gingerbread) or later and have the Google Play Store app installed receive updates within a
394      few days. This allows you to use the newest APIs in Google Play services and reach most of the
395      devices in the Android ecosystem (devices older than Android 2.3 or devices without the Google
396      Play Store app are not supported).
397    </p>
398  </div>
399
400  <div class="layout-content-col span-6">
401    <img src="/images/play-services-diagram.png" />
402    <p class="img-caption"><em>The Google Play services APK on user devices receives regular updates
403    for new APIs, features, and bug fixes.</em></p>
404  </div>
405</div>
406
407<h4 id="benefits">The benefits for your app</h4>
408
409<p>Google Play services gives you the freedom to use the newest APIs for popular
410Google services without worrying about device support. Updates to Google Play
411services are distributed automatically by the Google Play Store and new versions
412of the client library are delivered through the Android SDK Manager. This makes it
413easy for you to focus on what's important: your users' experience.</p>
414
415<p>To get started, <a href="{@docRoot}google/play-services/setup.html">set up</a> the SDK and check out
416the various products in the Google Play services platform now!</p>
417