1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
|
page.title=Google Play Services
header.hide=1
page.metaDescription=With Google Play services, your app can take advantage of the latest Google-powered features such as Maps, Analytics, and more: platform updates are distributed automatically as an APK through the Google Play Store.
@jd:body
<div class="landing-banner">
<div class="col-6">
<img src="/images/google/gps.png" alt="">
</div>
<div class="col-6">
<h1 itemprop="name" style="margin-bottom:0;">Google Play Services</h1>
<p itemprop="description">Give your apps more features to attract users
on a wider range of devices.
With Google Play services, your app can take advantage
of the latest, Google-powered features such as Maps, Google+, and more,
with automatic platform updates distributed as an APK through
the Google Play store. This makes it faster for your users to receive updates
and easier for you to integrate the newest that Google has to offer.
</p>
</div>
</div>
<div class="layout-content-row">
<div class="layout-content-col span-4">
<h4>Google Technology</h4>
<p>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.</p>
</div>
<div class="layout-content-col span-4">
<h4>Standard Authorization</h4>
<p>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.</p>
</div>
<div class="layout-content-col span-4">
<h4>Automatic Updates</h4>
<p>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.</p>
</div>
<p>To start integrating Google Play services into your app,
follow the <a href="/google/play-services/setup.html">Setup</a> guide.</p>
</div>
<h2 style="margin-top:0" id="newfeatures">New Features</h2>
<div class="toggle-content opened">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-opened.png"
class="toggle-content-img"
alt=""/>Google Play services, Version 7.3</a> <em>(April 2015)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<dt>Highlights in Version 7.3</dt>
<dd>
<p>For a summary of the feature highlights in Google Play services 7.3, see the
announcement
<a href="http://android-developers.blogspot.com/2015/04/theres-lot-to-explore-with-google-play.html"
class="external-link">blog post</a>.</p>
<ul>
<li>
<strong>Wear</strong> - 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 <a href="{@docRoot}reference/com/google/android/gms/wearable/CapabilityApi.html">
{@code CapabilityApi}</a> class. The new
<a href="{@docRoot}reference/com/google/android/gms/wearable/ChannelApi.html">{@code ChannelApi}</a>
class 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.
<ul>
<li><a href="{@docRoot}training/wearables/data-layer/messages.html">
Sending and Receiving Messages</a></li>
</ul>
</li>
<li>
<strong>Fit</strong> - This release provides a new
<a href="{@docRoot}reference/com/google/android/gms/fitness/HistoryApi.html#readDailyTotal(com.google.android.gms.common.api.GoogleApiClient,%20com.google.android.gms.fitness.data.DataType)">
{@code HistoryApi.readDailyTotal()}</a> 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.
<ul>
<li><a href="https://developers.google.com/fit/android/history#read_daily_total_data"
class="external-link">Read daily total API developer guide</a></li>
<li><a href="https://developers.google.com/fit/android/data-types#data_types_for_instantaneous_readings"
class="external-link">Nutrition data type developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/fitness/data/Field.html">
Nutrition data types API reference</a></li>
<li><a href="https://developers.google.com/fit/android/releases#april_2015"
class="external-link">Release notes</a></li>
</ul>
</li>
<li>
<strong>Location</strong> - This release adds a maximum wait time for location updates. By
calling the new
<a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setMaxWaitTime(long)">
{@code setMaxWaitTime()}</a> method and passing in a value at least double the value requested with
the
<a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">
{@code setInterval()}</a> 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
<a href="{@docRoot}reference/com/google/android/gms/location/LocationCallback.html">
{@code LocationCallback}</a> class to be notified when the device location has changed or can no
longer be determined.
</li>
<li>
<strong>Places</strong> - This release adds a
<a href="{@docRoot}reference/com/google/android/gms/location/places/PlaceBuffer.html#getAttributions()">
{@code PlaceBuffer.getAttributions()}</a> method for displaying third-party attributions.</a>
<ul>
<li><a href="https://developers.google.com/places/android/attributions"
class="external-link">Displaying attributions developer guide</a></li>
<li><a href="https://developers.google.com/places/android/releases">Release notes</a></li>
</ul>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png"
class="toggle-content-img"
alt=""/>Google Play services, Version 7.0</a> <em>(March 2015)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<dt>Highlights in Version 7.0</dt>
<dd>
<p>For a summary of the feature highlights in Google Play services 7.0, see the
announcement
<a href="http://android-developers.blogspot.com/2015/03/google-play-services-70-places-everyone.html"
class="external-link">blog post</a>.</p>
<ul>
<li><strong>Places</strong> - 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.
<ul>
<li><a href="https://developers.google.com/places/documentation/android/"
class="external-link">Places API developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/location/places/package-summary.html">
Places API reference</a></li>
</ul>
</li>
<li><strong>Location settings</strong> - While the
<a href="{@docRoot}reference/com/google/android/gms/location/FusedLocationProviderApi.html">
{@code FusedLocationProviderApi}</a>
combines 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
<a href="{@docRoot}reference/com/google/android/gms/location/SettingsApi.html">
{@code SettingsApi}</a>
class, you can bring up a Location Settings dialog which displays a one-touch control for users
to change their settings without leaving your app.
</li>
<li><strong>Fit</strong> - 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.
<ul>
<li><a href="https://developers.google.com/fit/android/get-started.html#step_5_connect_to_the_fitness_service"
class="external-link">Fit API developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/fitness/package-summary.html">
Fit API reference</a></li>
</ul>
</li>
<li><strong>Google Mobile Ads</strong> - This release introduces the
<a href="{@docRoot}reference/com/google/android/gms/ads/doubleclick/PublisherAdRequest.Builder.html#addCustomTargeting(java.lang.String,%20java.lang.String)">
{@code addCustomTargeting()}</a>
and <a href="{@docRoot}reference/com/google/android/gms/ads/doubleclick/PublisherAdRequest.Builder.html#addCategoryExclusion(java.lang.String)">
{@code addCategoryExclusion()}</a>
methods to the <a href="{@docRoot}reference/com/google/android/gms/ads/doubleclick/PublisherAdRequest.Builder.html">
{@code PublisherAdRequest.Builder} </a>
class, enabling DoubleClick for Publishers (DFP) developers to
<a href="https://support.google.com/dfp_sb/answer/112648" class="external-link">target custom
criteria</a>
and <a href="https://support.google.com/dfp_premium/answer/2627086" class="external-link">use
ad exclusions to block ads</a>.
<ul>
<li><a href="https://developers.google.com/mobile-ads-sdk/docs/dfp/android/banner"
class="external-link">DFP targeting developer guide</a></li>
</ul>
</li>
<li><strong>Play Game services</strong> - 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.
<ul>
<li><a href="https://developers.google.com/games/services/android/nearby.html"
class="external-link">Nearby Connections developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/nearby/connection/package-summary.html">
Nearby Connection API reference</a></li>
</ul>
</li>
<li><strong>Google API client</strong> - This release introduces the
<a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.Builder.html#requestServerAuthCode(java.lang.String,%20com.google.android.gms.common.api.GoogleApiClient.ServerAuthCodeCallbacks)">{@code GoogleApiClient.Builder.requestServerAuthCode()}</a> 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.
<ul>
<li><a href="https://developers.google.com/identity/sign-in/android/sign-in.html#enable_server-side_api_access_for_your_app"
class="external-link">Server-side API access developer guide</a></li>
</ul>
</li>
<li>
<strong>Drive</strong> - This release adds
<a href="{@docRoot}reference/com/google/android/gms/drive/DriveResource.html#trash(com.google.android.gms.common.api.GoogleApiClient))">
{@code trash()}</a> and
<a href="{@docRoot}reference/com/google/android/gms/drive/DriveResource.html#untrash(com.google.android.gms.common.api.GoogleApiClient)">
{@code untrash()}</a> methods to the
<a href="{@docRoot}reference/com/google/android/gms/drive/DriveResource.html">
{@code DriveResource}</a>
class. 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
<a href="{@docRoot}reference/com/google/android/gms/drive/Metadata.html#isExplicitlyTrashed()">
{@code isExplicitlyTrashed()}</a> method indicates whether a resource was trashed directly,
or as the result of a trashed parent.
<ul>
<li><a href="https://developers.google.com/drive/android/trash.html"
class="external-link">Trashing and untrashing developer guide</a></li>
</ul>
</li>
<li><strong>SafetyNet API</strong> - 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.
<ul>
<li><a href="{@docRoot}reference/com/google/android/gms/safetynet/package-summary.html">
SafetyNet API reference</a></li>
<li><a href="{@docRoot}google/play/safetynet/index.html">
SafetyNet developer guide</a></li>
</ul>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
alt=""/>Google Play services, Version 6.5</a> <em>(December 2014)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<dt>Highlights in Version 6.5</dt>
<dd>
<p>For a summary of the feature highlights in Google Play services 6.5, see the
announcement
<a href="http://android-developers.blogspot.com/2014/11/google-play-services-65.html"
class="external-link">blog post</a>.</p>
<ul>
<li><strong>Maps</strong> - The new <em>lite mode</em> 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
<a href="https://www.google.com/maps" class="external-link">Google Maps</a> and
get directions and turn by turn navigation to the selected marker. The
{@code getMap()} method in
<a href="{@docRoot}reference/com/google/android/gms/maps/MapView.html">{@code MapView}</a>
and
<a href="{@docRoot}reference/com/google/android/gms/maps/MapFragment.html">{@code MapFragment}</a>
is now deprecated in favor of the new {@code getMapAsync()} method. Similarly,
the new {@code getStreetViewPanoramaAsync()} method in
<a href="{@docRoot}reference/com/google/android/gms/maps/StreetViewPanoramaView.html">{@code StreetViewPanoramaView}</a> and
<a href="{@docRoot}reference/com/google/android/gms/maps/StreetViewPanoramaFragment.html">{@code StreetViewPanoramaFragment}</a>
enables you to get a ready-to-use Street View panorama.
<ul>
<li><a href="https://developers.google.com/maps/documentation/android/lite.html"
class="external-link">Lite mode maps developer guide</a></li>
<li><a href="https://developers.google.com/maps/documentation/android/interactivity.html#toolbar"
class="external-link">Map toolbar developer guide</a></li>
</ul>
</li>
<li><strong>Drive</strong> - 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).
<ul>
<li><a href="{@docRoot}reference/com/google/android/gms/drive/metadata/CustomPropertyKey.html">{@code CustomPropertyKey} API reference</a></li>
<li><a href="https://developers.google.com/drive/android/create-file.html"
class="external-link">Creating empty files developer guide</a></li>
</ul>
</li>
<li><strong>Fit</strong> - The Fit API now supports activity segments
(<a href="{@docRoot}reference/com/google/android/gms/fitness/data/DataType.html#TYPE_ACTIVITY_SEGMENT">{@code DataType.TYPE_ACTIVITY_SEGMENT}</a>), which
enable you to represent pauses within a workout session and to annotate time
intervals inside a session with different fitness activities.
</li>
<li><strong>Wallet</strong> - You can now enable donations from your Android
app in the same way you enable purchases. To do so, create a
<a href="{@docRoot}reference/com/google/android/gms/wallet/fragment/WalletFragment.html">{@code WalletFragment}</a> and specify the
<a href="{@docRoot}reference/com/google/android/gms/wallet/fragment/WalletFragmentMode.html#BUY_BUTTON">{@code BUY_BUTTON}</a>
mode, then set the button text to
<a href="{@docRoot}reference/com/google/android/gms/wallet/fragment/BuyButtonText.html#DONATE_WITH_GOOGLE">{@code DONATE_WITH_GOOGLE}</a>.
<p class="note"><strong>Note:</strong> Use of the <em>Donate with Google</em>
button is limited to 501(c)(3) organizations. For more information, see the
<a href="https://support.google.com/wallet/business/answer/75724?hl=en&rd=1" class="external-link">Content policies</a>.</p>
<ul>
<li><a href="https://developers.google.com/wallet/instant-buy/android/tutorial.html" class="external-link">Setting button text developer guide</a></li>
</ul>
</li>
<li><strong>Granular dependency management</strong> - If the number of
references in your app exceeds the
<a href="{@docRoot}tools/building/multidex.html">65K method reference limit</a>,
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
<a href="{@docRoot}google/play-services/setup.html">Setting Up Google Play Services</a>.
</li>
<li><strong>Deprecated clients</strong> - The {@code ActivityRecognitionClient},
{@code LocationClient}, and {@code PlusClient} classes 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
<a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html">{@code GoogleApiClient}</a>. For more information about using <a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html">{@code GoogleApiClient}</a>, see <a href="{@docRoot}google/auth/api-client.html">Accessing Google APIs</a>.
<p>Use these APIs instead of the deprecated APIs:</p>
<ul>
<li>If you were previously using {@code ActivityRecognitionClient}, call
<a href="{@docRoot}reference/com/google/android/gms/location/ActivityRecognition.html">{@code ActivityRecognition}</a> instead.</li>
<li>If you were previously using {@code LocationClient}, call the APIs in the
<a href="{@docRoot}reference/com/google/android/gms/location/package-summary.html">{@code com.google.android.gms.location} package</a> instead.</li>
<li>If you were previously using {@code PlusClient}, call the APIs in the
<a href="{@docRoot}reference/com/google/android/gms/plus/package-summary.html">{@code com.google.android.gms.plus} package</a> instead.</li>
</ul>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png"
class="toggle-content-img"
alt=""/>Google Play services, Version 6.1</a> <em>(October 2014)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<dt>Highlights in Version 6.1</dt>
<dd>
<p>For a summary of the feature highlights in Google Play services 6.1, see the
announcement
<a href="http://android-developers.blogspot.com/2014/09/google-play-services-61.html"
class="external-link">blog post</a>.</p>
<ul>
<li><strong>Drive</strong> - This release adds the
<a href="{@docRoot}reference/com/google/android/gms/drive/events/CompletionEvent.html">
<code>CompletionEvent</code></a> class 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
<a href="{@docRoot}reference/com/google/android/gms/drive/OpenFileActivityBuilder.html">
<code>OpenFileActivityBuilder</code><a/>, and the user interface has been
updated to use
<a href="http://www.google.com/design/spec/material-design/introduction.html"
class="external-link">material design</a>. A new
<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>)">
DriveResource.setParents()</a> method makes it possible to organize files
and folders. In addition, the
<a href="{@docRoot}reference/com/google/android/gms/drive/Contents.html">
<code>Contents</code></a>
class has been replaced with a
<a href="{@docRoot}reference/com/google/android/gms/drive/DriveContents.html">
<code>DriveContents</code></a> class that simplifies working with file
contents.
<ul>
<li><a href="https://developers.google.com/drive/release-notes"
class="external-link">Drive SDK release notes</a></li>
<li><a href="https://developers.google.com/drive/android/completion"
class="external-link">Completion events developer guide and Google
Developers video</a></li>
<li><a href="https://developers.google.com/drive/android/intro?hl=pt-PT#activity_builders"
class="external-link">Using the OpenFileActivity Builder</a></li>
</ul>
</li>
<li><strong>Tag Manager</strong> - Google Tag Manager now supports
<a href="https://developers.google.com/analytics/devguides/collection/android/v4/enhanced-ecommerce"
class="external-link">Enhanced Ecommerce</a> through the
<a href="https://support.google.com/tagmanager/answer/3281379"
class="external-link">Universal Analytics tag</a>.
<ul>
<li><a href="https://developers.google.com/analytics/devguides/collection/upgrade/"
class="external-link">Universal Analytics Upgrade Center</a></li>
<li><a href="https://developers.google.com/tag-manager/android/v4/"
class="external-link">Enhanced Ecommerce developer guide</a></li>
</ul>
</li>
<li><strong>Fit</strong> - The Google Fit developer preview, initially
<a href="http://googledevelopers.blogspot.com/2014/08/google-fit-preview-sdk-now-available.html"
class=""external-link>announced</a> in August, has been
refreshed to enable you to test your new fitness apps on any Android device.
<ul>
<li><a href="https://developers.google.com/fit/preview"
class="external-link">Google Fit developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/fitness/package-summary.html">
Fit API reference</a></li>
</ul>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png"
class="toggle-content-img"
alt=""/>Google Play services, Version 5.0</a> <em>(July 2014)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<dt>Highlights in Version 5.0</dt>
<dd>
<p>For a summary of the feature highlights in Google Play services 5.0, see the
announcement
<a href="http://android-developers.blogspot.com/2014/07/google-play-services-5.html"
class="external-link">blog post</a>.</p>
<ul>
<li><strong>Analytics</strong> - 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.
<ul>
<li><a href="https://developers.google.com/analytics/devguides/collection/android/v4/enhanced-ecommerce.html" class="external-link">Enhanced Ecommerce developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/analytics/ecommerce/package-summary.html">Enhanced Ecommerce API reference</a></li>
</ul>
</li>
<li><strong>App Indexing</strong> - 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
<a href="https://support.google.com/websearch/answer/106230"
class="external-link">query autocompletions</a>, providing fast and easy access to
inner pages in apps.
<ul>
<li><a href="https://developers.google.com/app-indexing/webmasters/appindexingapi.html"
class="external-link">App Indexing developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/appindexing/package-summary.html">App
Indexing API reference</a></li>
</ul>
</li>
<li><strong>Drive</strong> - The Query APIs now allow your app to retrieve
Drive files by sorted order, according to a developer-specified sorting criteria.
<ul>
<li><a href="https://developers.google.com/drive/android/queries.html"
class="external-link">Queries developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/drive/query/package-summary.html">Sortable
queries API reference</a></li>
</ul>
</li>
<li><strong>Play Games</strong> - 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.
<ul>
<li><a href="https://developers.google.com/games/services/android/quests.html"
class="external-link">Events and Quests developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/games/event/package-summary.html">Events
API reference</a></a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/games/quest/package-summary.html">Quests
API reference</a></a></li>
<li><a href="https://developers.google.com/games/services/android/savedgames.html"
class="external-link">Saved Games developer guide</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/games/snapshot/package-summary.html">Saved
Games API reference</a></a></li>
</ul>
</li>
<li><strong>Security</strong> - 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.
<ul>
<li><a href="{@docRoot}reference/com/google/android/gms/security/package-summary.html">Security
API reference</a></li>
</ul>
</li>
<li><strong>Wallet</strong> - 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.
<ul>
<li><a href="https://developers.google.com/wallet/objects/savetowalletnative.html"
class="external-link">Save to Google API for Android tutorial</a></li>
</ul>
</li>
<li><strong>Wearables</strong> - 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.
<ul>
<li><a href="{@docRoot}training/wearables/apps/index.html">Building
Wearable Apps training class</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/wearable/package-summary.html">Wearables
API reference</a></li>
</ul>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
alt=""/>Google Play services, Version 4.4</a> <em>(May 2014)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<dt>Highlights in Version 4.4</dt>
<dd>
<p>For a summary of the feature highlights in Google Play services 4.4, see the
announcement <a href="http://android-developers.blogspot.com/2014/05/google-play-services-44.html" class="external-link">blog post</a>.</p>
<ul>
<li><strong>Maps</strong> - New features for Street View and enhanced control of
Indoor Maps.
<ul>
<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
the user’s experience.
<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
and specify the active level of a building.</a>
</ul>
</li>
<li><strong>Activity recognition</strong> - The Location API has been updated with new activity detectors for running and walking.
<ul>
<li><a href="{@docRoot}reference/com/google/android/gms/location/DetectedActivity.html"><code>DetectedActivity</code> class reference</a>
</ul>
</li>
<li><strong>Mobile Ads</strong> - The new in-app purchase APIs allow
publishers to display in-app purchase ads, which enables users to purchase
advertised items directly.
<ul>
<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> -
Enable in-app purchases via ads by using the in-app purchase APIs.
<li><a href="{@docRoot}reference/com/google/android/gms/ads/purchase/package-summary.html">In-app purchase API reference</a>
</ul>
</li>
<li><strong>Wallet Fragment</strong> - The new Wallet Fragment API allows you
to easily integrate Google Wallet Instant Buy with an existing app.
<ul>
<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
use wallet fragment to handle user events and to automate key parts of the purchase lifecycle.
<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>
</ul>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
alt=""/>Google Play services, Version 4.3</a> <em>(March 2014)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<dt>Highlights in Version 4.3</dt>
<dd>
<p>For a summary of the feature highlights in Google Play services 4.3, see the
announcement <a href="http://android-developers.blogspot.com/2014/03/google-play-services-43.html" class="external-link">blog post</a>.</p>
<ul>
<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.
<ul>
<li><a href="http://developers.google.com/games/services/android/giftRequests.html" class="external-link">Developing Game Gifts in Android</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/games/request/package-summary.html">Game Gifts API reference</a></li>
</ul>
</li>
<li><strong>Analytics</strong> - Google Analytics and Tag Manager are now part of Google Play services.
<ul>
<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>
<li><a href="{@docRoot}reference/com/google/android/gms/analytics/package-summary.html">Analytics API reference</a></li>
<li><a href="http://developers.google.com/tag-manager/android/" class="external-link">Getting Started with the Tag Manager API in Android</a></li>
<li><a href="{@docRoot}reference/com/google/android/gms/tagmanager/package-summary.html">Tag Manager API reference</a></li>
</ul>
</li>
<li><strong>Drive</strong> - Change notifications, offline content, and more.
<ul>
<li><a href="http://developers.google.com/drive/android/pinning.html" class="external-link">Pinning Files</a> - Make files available offline.</li>
<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>
<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>
</ul>
</li>
<li><strong>Address</strong> - Let your users provide complete addresses in a single click.
<ul>
<li><a href="{@docRoot}reference/com/google/android/gms/identity/intents/package-summary.html">Address API reference</a> </li>
</ul>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<h2>How It Works</h2>
<h4 id="client-lib">The Google Play services client library</h4>
<p>
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
<a href="/tools/help/proguard.html">ProGuard</a> as part of your build process, so it won't have
an adverse impact on your app's file size.
</p>
<p>
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.
</p>
<div class="vspace size-2"> </div>
<div class="layout-content-row">
<div class="layout-content-col span-6">
<h4 id="apk">The Google Play services APK</h4>
<p>
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.
</p>
<p>
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).
</p>
</div>
<div class="layout-content-col span-6">
<img src="/images/play-services-diagram.png" />
<p class="img-caption"><em>The Google Play services APK on user devices receives regular updates
for new APIs, features, and bug fixes.</em></p>
</div>
</div>
<h4 id="benefits">The benefits for your app</h4>
<p>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.</p>
<p>To get started, <a href="{@docRoot}google/play-services/setup.html">set up</a> the SDK and check out
the various products in the Google Play services platform now!</p>
|