• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
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<html>
79<head>
80
81
82<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
83<meta name="viewport" content="width=device-width" />
84
85<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
86<title>com.google.android.gms.ads.identifier | Android Developers</title>
87
88<!-- STYLESHEETS -->
89<link rel="stylesheet"
90href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
91<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
92
93
94
95<!-- JAVASCRIPT -->
96<script src="//www.google.com/jsapi" type="text/javascript"></script>
97<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
98<script type="text/javascript">
99  var toRoot = "/";
100  var devsite = false;
101</script>
102<script src="/assets/js/docs.js" type="text/javascript"></script>
103
104<script type="text/javascript">
105  var _gaq = _gaq || [];
106  _gaq.push(['_setAccount', 'UA-5831155-1']);
107  _gaq.push(['_trackPageview']);
108
109  (function() {
110    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
111    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
112    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
113  })();
114</script>
115</head>
116
117<body class="gc-documentation google
118  develop">
119  <div id="doc-api-level" class="" style="display:none"></div>
120  <a name="top"></a>
121
122<a name="top"></a>
123
124    <!-- Header -->
125    <div id="header">
126        <div class="wrap" id="header-wrap">
127          <div class="col-3 logo">
128          <a href="/index.html">
129            <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
130          </a>
131          <div class="btn-quicknav" id="btn-quicknav">
132          	<a href="#" class="arrow-inactive">Quicknav</a>
133			      <a href="#" class="arrow-active">Quicknav</a>
134          </div>
135          </div>
136            <ul class="nav-x col-9">
137                <li class="design">
138                  <a href="/design/index.html"
139                  zh-tw-lang="設計"
140                  zh-cn-lang="设计"
141                  ru-lang="Проектирование"
142                  ko-lang="디자인"
143                  ja-lang="設計"
144                  es-lang="Diseñar"
145                  >Design</a></li>
146                <li class="develop"><a href="/develop/index.html"
147                  zh-tw-lang="開發"
148                  zh-cn-lang="开发"
149                  ru-lang="Разработка"
150                  ko-lang="개발"
151                  ja-lang="開発"
152                  es-lang="Desarrollar"
153                  >Develop</a></li>
154                <li class="distribute last"><a href="/distribute/index.html"
155                  zh-tw-lang="發佈"
156                  zh-cn-lang="分发"
157                  ru-lang="Распространение"
158                  ko-lang="배포"
159                  ja-lang="配布"
160                  es-lang="Distribuir"
161                  >Distribute</a></li>
162            </ul>
163
164            <!-- New Search -->
165            <div class="menu-container">
166            <div class="moremenu">
167    <div id="more-btn"></div>
168  </div>
169  <div class="morehover" id="moremenu">
170    <div class="top"></div>
171    <div class="mid">
172      <div class="header">Links</div>
173      <ul>
174        <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
175        <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
176        <li><a href="/about/index.html">About Android</a></li>
177      </ul>
178      <div class="header">Android Sites</div>
179      <ul>
180        <li><a href="http://www.android.com">Android.com</a></li>
181        <li class="active"><a>Android Developers</a></li>
182        <li><a href="http://source.android.com">Android Open Source Project</a></li>
183      </ul>
184
185
186
187        <div class="header">Language</div>
188          <div id="language" class="locales">
189            <select name="language" onChange="changeLangPref(this.value, true)">
190                <option value="en">English</option>
191                <option value="es">Español</option>
192                <option value="ja">日本語</option>
193                <option value="ko">한국어</option>
194                <option value="ru">Русский</option>
195                <option value="zh-cn">中文 (中国)</option>
196                <option value="zh-tw">中文 (台灣)</option>
197            </select>
198          </div>
199        <script type="text/javascript">
200          <!--
201          loadLangPref();
202            //-->
203        </script>
204
205
206
207
208      <br class="clearfix" />
209    </div>
210    <div class="bottom"></div>
211  </div>
212  <div class="search" id="search-container">
213    <div class="search-inner">
214      <div id="search-btn"></div>
215      <div class="left"></div>
216      <form onsubmit="return submit_search()">
217        <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
218onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
219onkeydown="return search_changed(event, true, '/')"
220onkeyup="return search_changed(event, false, '/')" />
221      </form>
222      <div class="right"></div>
223        <a class="close hide">close</a>
224        <div class="left"></div>
225        <div class="right"></div>
226    </div>
227  </div>
228
229  <div class="search_filtered_wrapper reference">
230    <div class="suggest-card reference no-display">
231      <ul class="search_filtered">
232      </ul>
233    </div>
234  </div>
235
236  <div class="search_filtered_wrapper docs">
237    <div class="suggest-card dummy no-display">&nbsp;</div>
238    <div class="suggest-card develop no-display">
239      <ul class="search_filtered">
240      </ul>
241      <div class="child-card guides no-display">
242      </div>
243      <div class="child-card training no-display">
244      </div>
245    </div>
246    <div class="suggest-card design no-display">
247      <ul class="search_filtered">
248      </ul>
249    </div>
250    <div class="suggest-card distribute no-display">
251      <ul class="search_filtered">
252      </ul>
253    </div>
254  </div>
255
256  </div>
257  <!-- /New Search>
258
259
260          <!-- Expanded quicknav -->
261           <div id="quicknav" class="col-9">
262                <ul>
263                    <li class="design">
264                      <ul>
265                        <li><a href="/design/index.html">Get Started</a></li>
266                        <li><a href="/design/style/index.html">Style</a></li>
267                        <li><a href="/design/patterns/index.html">Patterns</a></li>
268                        <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
269                        <li><a href="/design/downloads/index.html">Downloads</a></li>
270                        <li><a href="/design/videos/index.html">Videos</a></li>
271                      </ul>
272                    </li>
273                    <li class="develop">
274                      <ul>
275                        <li><a href="/training/index.html"
276                          zh-tw-lang="訓練課程"
277                          zh-cn-lang="培训"
278                          ru-lang="Курсы"
279                          ko-lang="교육"
280                          ja-lang="トレーニング"
281                          es-lang="Capacitación"
282                          >Training</a></li>
283                        <li><a href="/guide/components/index.html"
284                          zh-tw-lang="API 指南"
285                          zh-cn-lang="API 指南"
286                          ru-lang="Руководства по API"
287                          ko-lang="API 가이드"
288                          ja-lang="API ガイド"
289                          es-lang="Guías de la API"
290                          >API Guides</a></li>
291                        <li><a href="/reference/packages.html"
292                          zh-tw-lang="參考資源"
293                          zh-cn-lang="参考"
294                          ru-lang="Справочник"
295                          ko-lang="참조문서"
296                          ja-lang="リファレンス"
297                          es-lang="Referencia"
298                          >Reference</a></li>
299                        <li><a href="/tools/index.html"
300                          zh-tw-lang="相關工具"
301                          zh-cn-lang="工具"
302                          ru-lang="Инструменты"
303                          ko-lang="도구"
304                          ja-lang="ツール"
305                          es-lang="Herramientas"
306                          >Tools</a>
307                          <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
308                        </li>
309                        <li><a href="/google/index.html">Google Services</a>
310                        </li>
311
312                      </ul>
313                    </li>
314                    <li class="distribute last">
315                      <ul>
316                        <li><a href="/distribute/index.html">Google Play</a></li>
317                        <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
318                        <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
319                        <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
320                        <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
321                        <li><a href="/distribute/open.html">Open Distribution</a></li>
322                      </ul>
323                    </li>
324                </ul>
325          </div>
326          <!-- /Expanded quicknav -->
327        </div>
328    </div>
329    <!-- /Header -->
330
331
332  <div id="searchResults" class="wrap" style="display:none;">
333          <h2 id="searchTitle">Results</h2>
334          <div id="leftSearchControl" class="search-control">Loading...</div>
335  </div>
336
337
338
339    <!-- Secondary x-nav -->
340    <div id="nav-x">
341        <div class="wrap">
342            <ul class="nav-x col-9 develop" style="width:100%">
343                <li class="training"><a href="/training/index.html"
344                  zh-tw-lang="訓練課程"
345                  zh-cn-lang="培训"
346                  ru-lang="Курсы"
347                  ko-lang="교육"
348                  ja-lang="トレーニング"
349                  es-lang="Capacitación"
350                  >Training</a></li>
351                <li class="guide"><a href="/guide/components/index.html"
352                  zh-tw-lang="API 指南"
353                  zh-cn-lang="API 指南"
354                  ru-lang="Руководства по API"
355                  ko-lang="API 가이드"
356                  ja-lang="API ガイド"
357                  es-lang="Guías de la API"
358                  >API Guides</a></li>
359                <li class="reference"><a href="/reference/packages.html"
360                  zh-tw-lang="參考資源"
361                  zh-cn-lang="参考"
362                  ru-lang="Справочник"
363                  ko-lang="참조문서"
364                  ja-lang="リファレンス"
365                  es-lang="Referencia"
366                  >Reference</a></li>
367                <li class="tools"><a href="/tools/index.html"
368                  zh-tw-lang="相關工具"
369                  zh-cn-lang="工具"
370                  ru-lang="Инструменты"
371                  ko-lang="도구"
372                  ja-lang="ツール"
373                  es-lang="Herramientas"
374                  >Tools</a></li>
375                <li class="google"><a href="/google/index.html"
376                  >Google Services</a>
377                </li>
378
379            </ul>
380        </div>
381
382    </div>
383    <!-- /Sendondary x-nav -->
384
385
386
387
388
389
390
391
392
393  <div class="wrap clearfix" id="body-content">
394    <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
395      <div id="devdoc-nav" class="scroll-pane">
396<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
397
398
399
400<ul id="nav">
401
402  <li class="nav-section">
403    <div class="nav-section-header empty"><a href="/google/index.html">
404          <span class="en">Overview</span>
405      </a></div>
406  </li>
407
408  <li class="nav-section">
409    <div class="nav-section-header empty"><a href="/google/play-services/games.html">
410          <span class="en">Games</span>
411      </a></div>
412  </li>
413  <li class="nav-section">
414    <div class="nav-section-header empty"><a href="/google/play-services/location.html">
415          <span class="en">Location</span>
416      </a></div>
417  </li>
418  <li class="nav-section">
419    <div class="nav-section-header empty"><a href="/google/play-services/plus.html">
420          <span class="en">Google+</span>
421                </a></div>
422  </li>
423  <li class="nav-section">
424    <div class="nav-section-header empty"><a href="/google/play-services/maps.html">
425          <span class="en">Maps</span>
426      </a></div>
427  </li>
428  <li class="nav-section">
429    <div class="nav-section-header"><a href="/google/play-services/ads.html">
430      <span class="en">Ads</span></a>
431    </div>
432    <ul>
433      <li><a href="/google/play-services/id.html">
434          <span class="en">Advertising ID</span></a>
435      </li>
436    </ul>
437  </li>
438  <li class="nav-section">
439    <div class="nav-section-header empty"><a href="/google/play-services/wallet.html">
440          <span class="en">Wallet</span>
441      </a></div>
442  </li>
443  <li class="nav-section">
444    <div class="nav-section-header empty"><a href="/google/play-services/auth.html">
445          <span class="en">Authorization</span>
446      </a></div>
447  </li>
448
449
450
451  <li class="nav-section">
452    <div class="nav-section-header"><a href="/google/play-services/index.html">
453      <span class="en">Google Play Services</span></a>
454    </div>
455    <ul>
456      <li><a href="/google/play-services/setup.html">
457          <span class="en">Setup</span></a>
458      </li>
459      <li id="gms-tree-list" class="nav-section">
460        <div class="nav-section-header">
461          <a href="/reference/gms-packages.html">
462            <span class="en">Reference</span>
463          </a>
464        <div>
465      </li>
466    </ul>
467  </li>
468
469
470  <li class="nav-section">
471    <div class="nav-section-header"><a href="/google/play/billing/index.html">
472      <span class="en">Google Play In-app Billing</span></a>
473    </div>
474    <ul>
475      <li><a href="/google/play/billing/billing_overview.html">
476              <span class="en">Overview</span></a>
477      </li>
478      <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
479              <span class="en">Version 3 API</span></a></div>
480              <ul>
481              <li><a href="/google/play/billing/billing_integrate.html">
482              <span class="en">Implementing the API</span></a></li>
483              <li><a href="/google/play/billing/billing_reference.html">
484              <span class="en">Reference</span></a></li>
485              </ul>
486      </li>
487      <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
488              <span class="en">Version 2 API</span></a></div>
489              <ul>
490              <li><a href="/google/play/billing/v2/billing_integrate.html">
491              <span class="en">Implementing the API</span></a></li>
492              <li><a href="/google/play/billing/v2/billing_subscriptions.html">
493              <span class="en">Subscriptions</span></a></li>
494              <li><a href="/google/play/billing/v2/billing_reference.html">
495              <span class="en">Reference</span></a></li>
496              </ul>
497      </li>
498      <li><a href="/google/play/billing/billing_subscriptions.html">
499              <span class="en">Subscriptions</span></a>
500      </li>
501      <li><a href="/google/play/billing/billing_best_practices.html">
502              <span class="en">Security and Design</span></a>
503      </li>
504      <li><a href="/google/play/billing/billing_testing.html">
505              <span class="en">Testing In-app Billing</span></a>
506      </li>
507      <li><a href="/google/play/billing/billing_admin.html">
508              <span class="en">Administering In-app Billing</span></a>
509      </li>
510      <li><a href="/google/play/billing/gp-purchase-status-api.html">
511              <span class="en">Purchase Status API</span></a>
512      </li>
513      <li><a href="/google/play/billing/versions.html">
514              <span class="en">Version Notes</span></a>
515      </li>
516    </ul>
517  </li>
518
519
520
521  <li class="nav-section">
522      <div class="nav-section-header"><a href="/google/gcm/index.html">
523        <span class="en">Google Cloud Messaging</span></a>
524      </div>
525      <ul>
526        <li><a href="/google/gcm/gs.html">
527            <span class="en">Getting Started</span></a>
528        </li>
529        <li><a href="/google/gcm/gcm.html">
530            <span class="en">Architectural Overview</span></a>
531        </li>
532         <li><a href="/google/gcm/ccs.html">
533              <span class="en">Cloud Connection Server</span></a>
534        </li>
535        <li><a href="/google/gcm/notifications.html">
536              <span class="en">User Notifications</span></a>
537        </li>
538        <li><a href="/google/gcm/client.html">
539            <span class="en">GCM Client</span></a>
540        </li>
541        <li><a href="/google/gcm/server.html">
542            <span class="en">GCM Server</span></a>
543        </li>
544        <li><a href="/google/gcm/adv.html">
545            <span class="en">Advanced Topics</span></a>
546        </li>
547        <li><a href="/google/gcm/c2dm.html">
548            <span class="en">Migration</span></a>
549        </li>
550        <li id="gcm-tree-list" class="nav-section">
551          <div class="nav-section-header">
552            <a href="/reference/gcm-packages.html">
553              <span class="en">Reference</span>
554            </a>
555          <div>
556        </li>
557      </ul>
558  </li>
559
560  <li class="nav-section">
561    <div class="nav-section-header"><a href="/google/play/dist.html">
562      <span class="en">Google Play Distribution</span></a>
563    </div>
564    <ul>
565      <li><a href="/google/play/filters.html">
566          <span class="en">Filters on Google Play</span></a>
567      </li>
568
569      <li><a href="/google/play/publishing/multiple-apks.html">
570          <span class="en">Multiple APK Support</span></a>
571      </li>
572      <li><a href="/google/play/expansion-files.html">
573          <span class="en">APK Expansion Files</span></a>
574      </li>
575      <li class="nav-section">
576        <div class="nav-section-header"><a href="/google/play/licensing/index.html">
577          <span class="en">Application Licensing</span></a>
578        </div>
579        <ul>
580          <li><a href="/google/play/licensing/overview.html">
581              <span class="en">Licensing Overview</span></a>
582          </li>
583          <li><a href="/google/play/licensing/setting-up.html">
584              <span class="en">Setting Up for Licensing</span></a>
585          </li>
586          <li><a href="/google/play/licensing/adding-licensing.html">
587              <span class="en">Adding Licensing to Your App</span></a>
588          </li>
589          <li><a href="/google/play/licensing/licensing-reference.html">
590              <span class="en">Licensing Reference</span></a>
591          </li>
592        </ul>
593      </li>
594
595  <li class="nav-section">
596    <div class="nav-section-header"><a href="/google/backup/index.html">
597      Android Backup Service</a>
598    </div>
599    <ul>
600      <li><a href="/google/backup/signup.html">
601          Register</a>
602      </li>
603    </ul>
604  </li>
605
606  </ul>
607
608</li>
609
610
611
612</ul>
613
614<script type="text/javascript">
615<!--
616    buildToggleLists();
617    changeNavLang(getLangPref());
618//-->
619</script>
620
621
622
623
624      </div>
625      <script type="text/javascript">
626       showGoogleRefTree();
627
628      </script>
629    </div> <!-- end side-nav -->
630    <script>
631      $(document).ready(function() {
632        scrollIntoView("devdoc-nav");
633        });
634    </script>
635
636
637
638
639
640
641<div class="col-12" id="doc-col">
642
643<div id="api-info-block">
644<div class="api-level">
645
646
647
648
649</div>
650</div>
651
652<div id="jd-header">
653  package
654  <h1>com.google.android.gms.ads.identifier</h1>
655</div><!-- end header -->
656
657<div id="naMessage"></div>
658
659<div id="jd-content" class="api apilevel-">
660
661
662
663
664
665
666
667
668
669
670    <h2>Classes</h2>
671    <div class="jd-sumtable">
672
673  <table class="jd-sumtable-expando">
674        <tr class="alt-color api apilevel-" >
675              <td class="jd-linkcol"><a href="/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.html">AdvertisingIdClient</a></td>
676              <td class="jd-descrcol" width="100%">Helper library for retrieval of advertising ID and related information such as the
677 limit ad tracking setting.&nbsp;</td>
678          </tr>
679        <tr class=" api apilevel-" >
680              <td class="jd-linkcol"><a href="/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info.html">AdvertisingIdClient.Info</a></td>
681              <td class="jd-descrcol" width="100%">Includes both the advertising ID as well as the limit ad tracking setting.&nbsp;</td>
682          </tr>
683  </table>
684    </div>
685
686
687
688
689
690
691
692
693
694
695
696
697<div id="footer" class="wrap" >
698
699
700  <div id="copyright">
701
702  Except as noted, this content is licensed under <a
703  href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
704  For details and restrictions, see the <a href="/license.html">
705  Content License</a>.
706  </div>
707  <div id="build_info">
708
709<script src="/timestamp.js" type="text/javascript"></script>
710<script>document.write(BUILD_TIMESTAMP)</script>
711
712  </div>
713
714
715  <div id="footerlinks">
716
717  <p>
718    <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
719    <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
720    <a href="/support.html">Support</a>
721  </p>
722  </div>
723
724</div> <!-- end footer -->
725</div><!-- end jd-content -->
726</div><!-- doc-content -->
727
728</div> <!-- end body-content -->
729
730
731
732
733
734
735</body>
736</html>
737