Home | History | Annotate | Download | only in gms
      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 | Android Developers</title>
     87 
     88 <!-- STYLESHEETS -->
     89 <link rel="stylesheet"
     90 href="//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="Disear"               
    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">Espaol</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"
    218 onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
    219 onkeydown="return search_changed(event, true, '/')" 
    220 onkeyup="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="Capacitacin"               
    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="Guas 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="Capacitacin"               
    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="Guas 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">Google Maps</span>
    426       </a></div>
    427   </li>
    428   <li class="nav-section">
    429     <div class="nav-section-header empty"><a href="/google/play-services/auth.html">
    430           <span class="en">Authorization</span>
    431       </a></div>
    432   </li>
    433 
    434 
    435 
    436   <li class="nav-section">
    437     <div class="nav-section-header"><a href="/google/play-services/index.html">
    438       <span class="en">Google Play Services</span></a>
    439     </div>
    440     <ul>
    441       <li><a href="/google/play-services/setup.html">
    442           <span class="en">Setup</span></a>
    443       </li>
    444       <li id="gms-tree-list" class="nav-section">
    445         <div class="nav-section-header">
    446           <a href="/reference/gms-packages.html">
    447             <span class="en">Reference</span>
    448           </a>
    449         <div>
    450       </li>
    451     </ul>
    452   </li>
    453 
    454 
    455   <li class="nav-section">
    456     <div class="nav-section-header"><a href="/google/play/billing/index.html">
    457       <span class="en">Google Play In-app Billing</span></a>
    458     </div>
    459     <ul>
    460       <li><a href="/google/play/billing/billing_overview.html">
    461               <span class="en">Overview</span></a>
    462       </li>
    463       <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
    464               <span class="en">Version 3 API</span></a></div>
    465               <ul>
    466               <li><a href="/google/play/billing/billing_integrate.html">
    467               <span class="en">Implementing the API</span></a></li>
    468               <li><a href="/google/play/billing/billing_reference.html">
    469               <span class="en">Reference</span></a></li>
    470               </ul>
    471       </li>
    472       <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
    473               <span class="en">Version 2 API</span></a></div>
    474               <ul>
    475               <li><a href="/google/play/billing/v2/billing_integrate.html">
    476               <span class="en">Implementing the API</span></a></li>
    477               <li><a href="/google/play/billing/v2/billing_subscriptions.html">
    478               <span class="en">Subscriptions</span></a></li>
    479               <li><a href="/google/play/billing/v2/billing_reference.html">
    480               <span class="en">Reference</span></a></li>
    481               </ul>
    482       </li>
    483       <li><a href="/google/play/billing/billing_subscriptions.html">
    484               <span class="en">Subscriptions</span></a>
    485       </li>
    486       <li><a href="/google/play/billing/billing_best_practices.html">
    487               <span class="en">Security and Design</span></a>
    488       </li>
    489       <li><a href="/google/play/billing/billing_testing.html">
    490               <span class="en">Testing In-app Billing</span></a>
    491       </li>
    492       <li><a href="/google/play/billing/billing_admin.html">
    493               <span class="en">Administering In-app Billing</span></a>
    494       </li>
    495       <li><a href="/google/play/billing/gp-purchase-status-api.html">
    496               <span class="en">Purchase Status API</span></a>
    497       </li>
    498       <li><a href="/google/play/billing/versions.html">
    499               <span class="en">Version Notes</span></a>
    500       </li>
    501     </ul>
    502   </li>
    503 
    504 
    505 
    506   <li class="nav-section">
    507       <div class="nav-section-header"><a href="/google/gcm/index.html">
    508         <span class="en">Google Cloud Messaging</span></a>
    509       </div>
    510       <ul>
    511         <li><a href="/google/gcm/gcm.html">
    512             <span class="en">Overview</span></a>
    513         </li>
    514         <li><a href="/google/gcm/gs.html">
    515             <span class="en">Getting Started</span></a>
    516         </li>
    517         <li><a href="/google/gcm/client.html">
    518             <span class="en">Implementing GCM Client</span></a>
    519         </li>
    520         <li class="nav-section"><div class="nav-section-header"><a href="/google/gcm/server.html">
    521               <span class="en">Implementing GCM Server</span></a></div>
    522               <ul>
    523               <li><a href="/google/gcm/ccs.html">
    524               <span class="en">CCS (XMPP)</span></a></li>
    525               <li><a href="/google/gcm/http.html">
    526               <span class="en">HTTP</span></a></li>
    527               </ul>
    528         </li>
    529         <li><a href="/google/gcm/notifications.html">
    530               <span class="en">User Notifications</span></a>
    531         </li>
    532         <li><a href="/google/gcm/adv.html">
    533             <span class="en">Advanced Topics</span></a>
    534         </li>
    535         <li><a href="/google/gcm/c2dm.html">
    536             <span class="en">Migration</span></a>
    537         </li>
    538         <li id="gcm-tree-list" class="nav-section">
    539           <div class="nav-section-header">
    540             <a href="/reference/gcm-packages.html">
    541               <span class="en">Reference</span>
    542             </a>
    543           <div>
    544         </li>
    545       </ul>
    546   </li>
    547 
    548   <li class="nav-section">
    549     <div class="nav-section-header"><a href="/google/play/dist.html">
    550       <span class="en">Google Play Distribution</span></a>
    551     </div>
    552     <ul>
    553       <li><a href="/google/play/filters.html">
    554           <span class="en">Filters on Google Play</span></a>
    555       </li>
    556 
    557       <li><a href="/google/play/publishing/multiple-apks.html">
    558           <span class="en">Multiple APK Support</span></a>
    559       </li>
    560       <li><a href="/google/play/expansion-files.html">
    561           <span class="en">APK Expansion Files</span></a>
    562       </li>
    563       <li class="nav-section">
    564         <div class="nav-section-header"><a href="/google/play/licensing/index.html">
    565           <span class="en">Application Licensing</span></a>
    566         </div>
    567         <ul>
    568           <li><a href="/google/play/licensing/overview.html">
    569               <span class="en">Licensing Overview</span></a>
    570           </li>
    571           <li><a href="/google/play/licensing/setting-up.html">
    572               <span class="en">Setting Up for Licensing</span></a>
    573           </li>
    574           <li><a href="/google/play/licensing/adding-licensing.html">
    575               <span class="en">Adding Licensing to Your App</span></a>
    576           </li>
    577           <li><a href="/google/play/licensing/licensing-reference.html">
    578               <span class="en">Licensing Reference</span></a>
    579           </li>
    580         </ul>
    581       </li>
    582 
    583   <li class="nav-section">
    584     <div class="nav-section-header"><a href="/google/backup/index.html">
    585       Android Backup Service</a>
    586     </div>
    587     <ul>
    588       <li><a href="/google/backup/signup.html">
    589           Register</a>
    590       </li>
    591     </ul>
    592   </li>
    593 
    594   </ul>
    595 
    596 </li>
    597 
    598 
    599 
    600 </ul>
    601 
    602 <script type="text/javascript">
    603 <!--
    604     buildToggleLists();
    605     changeNavLang(getLangPref());
    606 //-->
    607 </script>
    608 
    609 
    610         
    611 
    612       </div>
    613       <script type="text/javascript">
    614        showGoogleRefTree();
    615     
    616       </script>
    617     </div> <!-- end side-nav -->
    618     <script>
    619       $(document).ready(function() {
    620         scrollIntoView("devdoc-nav");
    621         });
    622     </script>
    623 
    624 
    625      
    626 
    627 
    628 
    629 <div class="col-12" id="doc-col">
    630 
    631 <div id="api-info-block">
    632 <div class="api-level">
    633   
    634   
    635   
    636 
    637 </div>
    638 </div>
    639 
    640 <div id="jd-header">
    641   package
    642   <h1>com.google.android.gms</h1>
    643 </div><!-- end header -->
    644 
    645 <div id="naMessage"></div>
    646 
    647 <div id="jd-content" class="api apilevel-">
    648 
    649 
    650 
    651 
    652 
    653 
    654   
    655 
    656 
    657   
    658     <h2>Classes</h2>
    659     <div class="jd-sumtable">
    660     
    661   <table class="jd-sumtable-expando">
    662         <tr class="alt-color api apilevel-" >
    663               <td class="jd-linkcol"><a href="/reference/com/google/android/gms/R.html">R</a></td>
    664               <td class="jd-descrcol" width="100%">&nbsp;</td>
    665           </tr>
    666         <tr class=" api apilevel-" >
    667               <td class="jd-linkcol"><a href="/reference/com/google/android/gms/R.attr.html">R.attr</a></td>
    668               <td class="jd-descrcol" width="100%">&nbsp;</td>
    669           </tr>
    670         <tr class="alt-color api apilevel-" >
    671               <td class="jd-linkcol"><a href="/reference/com/google/android/gms/R.color.html">R.color</a></td>
    672               <td class="jd-descrcol" width="100%">&nbsp;</td>
    673           </tr>
    674         <tr class=" api apilevel-" >
    675               <td class="jd-linkcol"><a href="/reference/com/google/android/gms/R.drawable.html">R.drawable</a></td>
    676               <td class="jd-descrcol" width="100%">&nbsp;</td>
    677           </tr>
    678         <tr class="alt-color api apilevel-" >
    679               <td class="jd-linkcol"><a href="/reference/com/google/android/gms/R.id.html">R.id</a></td>
    680               <td class="jd-descrcol" width="100%">&nbsp;</td>
    681           </tr>
    682         <tr class=" api apilevel-" >
    683               <td class="jd-linkcol"><a href="/reference/com/google/android/gms/R.string.html">R.string</a></td>
    684               <td class="jd-descrcol" width="100%">&nbsp;</td>
    685           </tr>
    686         <tr class="alt-color api apilevel-" >
    687               <td class="jd-linkcol"><a href="/reference/com/google/android/gms/R.styleable.html">R.styleable</a></td>
    688               <td class="jd-descrcol" width="100%">&nbsp;</td>
    689           </tr>
    690   </table>
    691     </div>
    692   
    693 
    694 
    695   
    696 
    697 
    698   
    699 
    700 
    701   
    702 
    703 
    704 <div id="footer" class="wrap" >
    705         
    706 
    707   <div id="copyright">
    708     
    709   Except as noted, this content is licensed under <a
    710   href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 
    711   For details and restrictions, see the <a href="/license.html">
    712   Content License</a>.
    713   </div>
    714   <div id="build_info">
    715     
    716 <script src="/timestamp.js" type="text/javascript"></script>
    717 <script>document.write(BUILD_TIMESTAMP)</script>
    718 
    719   </div>
    720 
    721 
    722   <div id="footerlinks">
    723     
    724   <p>
    725     <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
    726     <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
    727     <a href="/support.html">Support</a>
    728   </p>
    729   </div>
    730 
    731 </div> <!-- end footer -->
    732 </div><!-- end jd-content -->
    733 </div><!-- doc-content -->
    734 
    735 </div> <!-- end body-content --> 
    736 
    737 
    738 
    739 
    740 
    741 
    742 </body>
    743 </html>
    744