android-sdk-docs/sdk-reference
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <meta name="Description" content="For the purposes of licensing, the content of this web site is divided into two categories: The documentation content on this site is made available to you as part of the Android Open Source Project . This documentation, including any code shown in it…"> <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" /> <title>Content License | Android Developers</title> <!-- STYLESHEETS --> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto+Condensed"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> <link href="./assets/css/default.css?v=7" rel="stylesheet" type="text/css"> <!-- JAVASCRIPT --> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="./assets/js/android_3p-bundle.js" type="text/javascript"></script> <script type="text/javascript"> var toRoot = "./"; var metaTags = []; var devsite = false; </script> <script src="./assets/js/docs.js?v=6" type="text/javascript"></script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-5831155-1', 'android.com'); ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); ga('send', 'pageview'); ga('universal.send', 'pageview'); // Send page view for new tracker. </script> </head> <body class="gc-documentation " itemscope itemtype="http://schema.org/Article"> <a name="top"></a> <!-- dialog to prompt lang pref change when loaded from hardcoded URL <div id="langMessage" style="display:none"> <div> <div class="lang en"> <p>You requested a page in English, would you like to proceed with this language setting?</p> </div> <div class="lang es"> <p>You requested a page in Spanish (Español), would you like to proceed with this language setting?</p> </div> <div class="lang ja"> <p>You requested a page in Japanese (日本語), would you like to proceed with this language setting?</p> </div> <div class="lang ko"> <p>You requested a page in Korean (한국어), would you like to proceed with this language setting?</p> </div> <div class="lang ru"> <p>You requested a page in Russian (Русский), would you like to proceed with this language setting?</p> </div> <div class="lang zh-cn"> <p>You requested a page in Simplified Chinese (简体中文), would you like to proceed with this language setting?</p> </div> <div class="lang zh-tw"> <p>You requested a page in Traditional Chinese (繁體中文), would you like to proceed with this language setting?</p> </div> <a href="#" class="button yes" onclick="return false;"> <span class="lang en">Yes</span> <span class="lang es">Sí</span> <span class="lang ja">Yes</span> <span class="lang ko">Yes</span> <span class="lang ru">Yes</span> <span class="lang zh-cn">是的</span> <span class="lang zh-tw">没有</span> </a> <a href="#" class="button" onclick="$('#langMessage').hide();return false;"> <span class="lang en">No</span> <span class="lang es">No</span> <span class="lang ja">No</span> <span class="lang ko">No</span> <span class="lang ru">No</span> <span class="lang zh-cn">没有</span> <span class="lang zh-tw">没有</span> </a> </div> </div> --> <!-- Header --> <div id="header-wrapper"> <div class="dac-header" id="header"> <div class="dac-header-inner"> <a class="dac-nav-toggle" data-dac-toggle-nav href="javascript:;" title="Open navigation"> <span class="dac-nav-hamburger"> <span class="dac-nav-hamburger-top"></span> <span class="dac-nav-hamburger-mid"></span> <span class="dac-nav-hamburger-bot"></span> </span> </a> <a class="dac-header-logo" href="./index.html"> <img class="dac-header-logo-image" src="./assets/images/android_logo.png" srcset="./assets/images/android_logo@2x.png 2x" width="32" height="36" alt="Android" /> Developers </a> <ul class="dac-header-crumbs"> <li class="dac-header-crumbs-item"><span class="dac-header-crumbs-link current ">Content License</a></li> </ul> <div class="dac-header-search" id="search-container"> <div class="dac-header-search-inner"> <div class="dac-sprite dac-search dac-header-search-btn" id="search-btn"></div> <form class="dac-header-search-form" onsubmit="return submit_search()"> <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" onkeydown="return search_changed(event, true, './')" onkeyup="return search_changed(event, false, './')" class="dac-header-search-input" placeholder="Search" /> <a class="dac-header-search-close hide" id="search-close">close</a> </form> </div><!-- end dac-header-search-inner --> </div><!-- end dac-header-search --> <div class="search_filtered_wrapper"> <div class="suggest-card reference no-display"> <ul class="search_filtered"> </ul> </div> <div class="suggest-card develop no-display"> <ul class="search_filtered"> </ul> <div class="child-card guides no-display"> </div> <div class="child-card training no-display"> </div> <div class="child-card samples no-display"> </div> </div> <div class="suggest-card design no-display"> <ul class="search_filtered"> </ul> </div> <div class="suggest-card distribute no-display"> <ul class="search_filtered"> </ul> </div> </div> <a class="dac-header-console-btn" href="https://play.google.com/apps/publish/"> <span class="dac-sprite dac-google-play"></span> <span class="dac-visible-desktop-inline">Developer</span> Console </a> </div><!-- end header-wrap.wrap --> </div><!-- end header --> <div id="searchResults" class="wrap" style="display:none;"> <h2 id="searchTitle">Results</h2> <div id="leftSearchControl" class="search-control">Loading...</div> </div> </div> <!--end header-wrapper --> <!-- Navigation--> <nav class="dac-nav"> <div class="dac-nav-dimmer" data-dac-toggle-nav></div> <ul class="dac-nav-list" data-dac-nav> <li class="dac-nav-item dac-nav-head"> <a class="dac-nav-link dac-nav-logo" data-dac-toggle-nav href="javascript:;" title="Close navigation"> <img class="dac-logo-image" src="./assets/images/android_logo.png" srcset="./assets/images/android_logo@2x.png 2x" width="32" height="36" alt="Android" /> Developers </a> </li> <li class="dac-nav-item home"> <a class="dac-nav-link dac-visible-mobile-block" href="./index.html">Home</a> <ul class="dac-nav-secondary about"> <li class="dac-nav-item about"> <a class="dac-nav-link" href="./about/index.html">Android</a> </li> <li class="dac-nav-item wear"> <a class="dac-nav-link" href="./wear/index.html">Wear</a> </li> <li class="dac-nav-item tv"> <a class="dac-nav-link" href="./tv/index.html">TV</a> </li> <li class="dac-nav-item auto"> <a class="dac-nav-link" href="./auto/index.html">Auto</a> </li> </ul> </li> <li class="dac-nav-item design"> <a class="dac-nav-link" href="./design/index.html" zh-tw-lang="設計" zh-cn-lang="设计" ru-lang="Проектирование" ko-lang="디자인" ja-lang="設計" es-lang="Diseñar">Design</a> </li> <li class="dac-nav-item develop"> <a class="dac-nav-link" href="./develop/index.html" zh-tw-lang="開發" zh-cn-lang="开发" ru-lang="Разработка" ko-lang="개발" ja-lang="開発" es-lang="Desarrollar">Develop</a> <ul class="dac-nav-secondary develop"> <li class="dac-nav-item training"> <a class="dac-nav-link" href="./training/index.html" zh-tw-lang="訓練課程" zh-cn-lang="培训" ru-lang="Курсы" ko-lang="교육" ja-lang="トレーニング" es-lang="Capacitación">Training</a> </li> <li class="dac-nav-item guide"> <a class="dac-nav-link" href="./guide/index.html" zh-tw-lang="API 指南" zh-cn-lang="API 指南" ru-lang="Руководства по API" ko-lang="API 가이드" ja-lang="API ガイド" es-lang="Guías de la API">API Guides</a> </li> <li class="dac-nav-item reference"> <a class="dac-nav-link" href="./reference/packages.html" zh-tw-lang="參考資源" zh-cn-lang="参考" ru-lang="Справочник" ko-lang="참조문서" ja-lang="リファレンス" es-lang="Referencia">Reference</a> </li> <li class="dac-nav-item tools"> <a class="dac-nav-link" href="./sdk/index.html" zh-tw-lang="相關工具" zh-cn-lang="工具" ru-lang="Инструменты" ko-lang="도구" ja-lang="ツール" es-lang="Herramientas">Tools</a></li> <li class="dac-nav-item google"> <a class="dac-nav-link" href="./google/index.html">Google Services</a> </li> <li class="dac-nav-item preview"> <a class="dac-nav-link" href="./preview/index.html">Preview</a> </li> </ul> </li> <li class="dac-nav-item distribute"> <a class="dac-nav-link" href="./distribute/googleplay/index.html" zh-tw-lang="發佈" zh-cn-lang="分发" ru-lang="Распространение" ko-lang="배포" ja-lang="配布" es-lang="Distribuir">Distribute</a> <ul class="dac-nav-secondary distribute"> <li class="dac-nav-item googleplay"> <a class="dac-nav-link" href="./distribute/googleplay/index.html">Google Play</a></li> <li class="dac-nav-item essentials"> <a class="dac-nav-link" href="./distribute/essentials/index.html">Essentials</a></li> <li class="dac-nav-item users"> <a class="dac-nav-link" href="./distribute/users/index.html">Get Users</a></li> <li class="dac-nav-item engage"> <a class="dac-nav-link" href="./distribute/engage/index.html">Engage & Retain</a></li> <li class="dac-nav-item monetize"> <a class="dac-nav-link" href="./distribute/monetize/index.html">Earn</a> </li> <li class="dac-nav-item analyze"> <a class="dac-nav-link" href="./distribute/analyze/index.html">Analyze</a> </li> <li class="dac-nav-item stories"> <a class="dac-nav-link" href="./distribute/stories/index.html">Stories</a> </li> </ul> </li> </ul> </nav> <!-- end navigation--> <div id="body-content"> <div> <div class="fullpage" > <div id="jd-content"> <div class="jd-descr" itemprop="articleBody"> <div class="wrap" style="width:940px;"> <h1>Content License</h1> <p>For the purposes of licensing, the content of this web site is divided into two categories:</p> <ul> <li>Documentation content, including both static documentation and content extracted from source code modules, as well as sample code, and </li> <li>All other site content</li> </ul> <p>The documentation content on this site is made available to you as part of the <a href="http://source.android.com">Android Open Source Project</a>. This documentation, including any code shown in it, is licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>, the preferred license for all parts of the of the Android Open Source Project.</p> <p>Apache 2.0 is a commercial and open-source-friendly software license. The majority of the Android platform and documentation is licensed under the Apache 2.0 license. While the project strives to adhere to the preferred license, there may be exceptions, such as for documentation (code comments) extracted from a source code module that is licensed under GPLv2 or other license. In those cases, the license covering the source code module will apply to the documentation extracted from it. </p> <p>Third-party components of this site such as JavaScript libraries are included in the Android Open Source Project under the licenses specified by their authors. For information about these licenses, refer to the source files in the Android Open Source Project.</p> <p>All other content on this site, except the license documents themselves and as otherwise noted, is licensed under the <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5</a> license. </p> <p>You may use the content of this site in any way that is consistent with the specific license that applies to the content, as described above. For content licensed under Creative Commons Attribution 2.5, we ask that you give proper <a href="#attribution">attribution</a>. </p> <h2 id="terms">Terms of Use</h2> <p>We are pleased to license the Android documentation and sample code under terms that encourage you to take, modify, reuse, re-purpose, and remix the content as you see fit. Except as noted in the <a href="#restrictions">Restrictions</a> section below, you are free to use the documentation content in your own creations. For example, you could quote the text in a book, cut-and-paste sections to your blog, record it as an audiobook for the visually impaired, or even translate it. </p> <h2 id="restrictions">Restrictions</h2> <ul> <li>While the documentation itself is available to you under the Apache 2.0 license, note that proprietary trademarks and brand features are not included in that license.</li> <li>Google's trademarks and other brand features (including the <img src="images/android-logo.png" alt="Android" style="margin:0;padding:0 2px;vertical-align:baseline" /> stylized typeface logo) are not included in the license. Please see <a href="./distribute/tools/promote/brand.html">Brand Guidelines</a> for information about this usage. </li> <li>In some cases, a page may include content, such as an image, that is not covered by the license. In that case, we will label the content that is not licensed. </li> <li>In addition, content linked from a page on this site is not covered by the license unless specifically noted. For example, pages may link to videos or slide decks that are not covered.</li> <li>The use of sample source code provided in the SDK or shown in this documentation is subject to the conditions detailed in the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>.</li> </ul> <h2 id="attribution">Attribution</h2> <p> Proper attribution is required when you reuse or create modified versions of content that appears on a page made available under the terms of the Creative Commons Attribution license. On this site, the requirement for attribution applies only to the non-documentation content, as described earlier in this document. The complete requirements for attribution can be found in section 4b of the <a href="http://creativecommons.org/licenses/by/2.5/legalcode"> Creative Commons legal code</a>. </p> <p> In practice we ask that you provide attribution to the Android Open Source project to the best of the ability of the medium in which you are producing the work. There are several typical ways in which this might apply: </p> <h3>Exact Reproductions</h3> <p> If your online work <em>exactly reproduces</em> text or images from this site, in whole or in part, please include a paragraph at the bottom of your page that reads: </p> <p style="margin-left:20px;font-style:italic"> Portions of this page are reproduced from work created and <a href="http://code.google.com/policies.html">shared by the Android Open Source Project</a> and used according to terms described in the <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons 2.5 Attribution License</a>. </p> <p> Also, please link back to the original source page so that readers can refer there for more information. </p> <h3>Modified Versions</h3> <p> If your online work shows <em>modified</em> text or images based on the content from this site, please include a paragraph at the bottom of your page that reads: </p> <p style="margin-left:20px;font-style:italic"> Portions of this page are modifications based on work created and <a href="http://code.google.com/policies.html">shared by the Android Open Source Project</a> and used according to terms described in the <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons 2.5 Attribution License</a>. </p> <p> Again, please link back to the original source page so that readers can refer there for more information. This is even more important when the content has been modified. </p> <h3>Other Media</h3> <p> If you produce non-hypertext works, such as books, audio, or video, we ask that you make a best effort to include a spoken or written attribution in the spirit of the messages above. </p> </div> </div> </div> <!-- end jd-content --> <div class="wrap"> <div class="dac-footer dac-landing"> <div class="cols dac-footer-main"> <div class="col-1of2"> <a class="dac-footer-getnews" data-modal-toggle="newsletter" href="javascript:;">Get news & tips <span class="dac-fab dac-primary"><i class="dac-sprite dac-mail"></i></span></a> </div> <div class="col-1of2 dac-footer-reachout"> <div class="dac-footer-contact"> <a class="dac-footer-contact-link" href="http://android-developers.blogspot.com/">Blog</a> <a class="dac-footer-contact-link" href="/support.html">Support</a> </div> <div class="dac-footer-social"> <a class="dac-fab dac-footer-social-link" href="https://www.youtube.com/user/androiddevelopers"><i class="dac-sprite dac-youtube"></i></a> <a class="dac-fab dac-footer-social-link" href="https://plus.google.com/+AndroidDevelopers"><i class="dac-sprite dac-gplus"></i></a> <a class="dac-fab dac-footer-social-link" href="https://twitter.com/AndroidDev"><i class="dac-sprite dac-twitter"></i></a> </div> </div> </div> <hr class="dac-footer-separator"/> <p class="dac-footer-copyright"> Except as noted, this content is licensed under <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>. For details and restrictions, see the <a href="./license.html">Content License</a>. </p> <p class="dac-footer-links"> <a href="/about/index.html">About Android</a> <a href="/auto/index.html">Auto</a> <a href="/tv/index.html">TV</a> <a href="/wear/index.html">Wear</a> <a href="/legal.html">Legal</a> <span id="language" class="locales"> <select name="language" onchange="changeLangPref(this.value, true)"> <option value="en" selected="selected">English</option> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> </select> </span> </p> </div> </div> <!-- end footer --> <div data-modal="newsletter" data-newsletter data-swap class="dac-modal newsletter"> <div class="dac-modal-container"> <div class="dac-modal-window"> <header class="dac-modal-header"> <button class="dac-modal-header-close" data-modal-toggle><i class="dac-sprite dac-close"></i></button> <div class="dac-swap" data-swap-container> <section class="dac-swap-section dac-active dac-down"> <h2 class="norule dac-modal-header-title">Get the latest Android developer news and tips that will help you find success on Google Play.</h2> <p class="dac-modal-header-subtitle">* Required Fields</p> </section> <section class="dac-swap-section dac-up"> <h2 class="norule dac-modal-header-title">Hooray!</h2> </section> </div> </header> <div class="dac-swap" data-swap-container> <section class="dac-swap-section dac-active dac-left"> <form action="https://docs.google.com/forms/d/1QgnkzbEJIDu9lMEea0mxqWrXUJu0oBCLD7ar23V0Yys/formResponse" class="dac-form" method="post" target="dac-newsletter-iframe"> <section class="dac-modal-content"> <fieldset class="dac-form-fieldset"> <div class="cols"> <div class="col-1of2 newsletter-leftCol"> <div class="dac-form-input-group"> <label for="newsletter-full-name" class="dac-form-floatlabel">Full name</label> <input type="text" class="dac-form-input" name="entry.1357890476" id="newsletter-full-name" required> <span class="dac-form-required">*</span> </div> <div class="dac-form-input-group"> <label for="newsletter-email" class="dac-form-floatlabel">Email address</label> <input type="email" class="dac-form-input" name="entry.472100832" id="newsletter-email" required> <span class="dac-form-required">*</span> </div> </div> <div class="col-1of2 newsletter-rightCol"> <div class="dac-form-input-group"> <label for="newsletter-company" class="dac-form-floatlabel">Company / developer name</label> <input type="text" class="dac-form-input" name="entry.1664780309" id="newsletter-company"> </div> <div class="dac-form-input-group"> <label for="newsletter-play-store" class="dac-form-floatlabel">One of your Play Store app URLs</label> <input type="url" class="dac-form-input" name="entry.47013838" id="newsletter-play-store" required> <span class="dac-form-required">*</span> </div> </div> </div> </fieldset> <fieldset class="dac-form-fieldset"> <div class="cols"> <div class="col-1of2 newsletter-leftCol"> <legend class="dac-form-legend">Which best describes your business:<span class="dac-form-required">*</span> </legend> <div class="dac-form-radio-group"> <input type="radio" value="Apps" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-app" required> <label for="newsletter-business-type-app" class="dac-form-radio-button"></label> <label for="newsletter-business-type-app" class="dac-form-label">Apps</label> </div> <div class="dac-form-radio-group"> <input type="radio" value="Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-games" required> <label for="newsletter-business-type-games" class="dac-form-radio-button"></label> <label for="newsletter-business-type-games" class="dac-form-label">Games</label> </div> <div class="dac-form-radio-group"> <input type="radio" value="Apps and Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-appsgames" required> <label for="newsletter-business-type-appsgames" class="dac-form-radio-button"></label> <label for="newsletter-business-type-appsgames" class="dac-form-label">Apps & Games</label> </div> </div> <div class="col-1of2 newsletter-rightCol newsletter-checkboxes"> <div class="dac-form-radio-group"> <div class="dac-media"> <div class="dac-media-figure"> <input type="checkbox" class="dac-form-checkbox" name="entry.732309842" id="newsletter-add" required value="Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities."> <label for="newsletter-add" class="dac-form-checkbox-button"></label> </div> <div class="dac-media-body"> <label for="newsletter-add" class="dac-form-label dac-form-aside">Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.<span class="dac-form-required">*</span></label> </div> </div> </div> <div class="dac-form-radio-group"> <div class="dac-media"> <div class="dac-media-figure"> <input type="checkbox" class="dac-form-checkbox" name="entry.2045036090" id="newsletter-terms" required value="I acknowledge that the information provided in this form will be subject to Google's privacy policy (https://www.google.com/policies/privacy/)."> <label for="newsletter-terms" class="dac-form-checkbox-button"></label> </div> <div class="dac-media-body"> <label for="newsletter-terms" class="dac-form-label dac-form-aside">I acknowledge that the information provided in this form will be subject to <a href="https://www.google.com/policies/privacy/">Google's privacy policy</a>.<span class="dac-form-required">*</span></label> </div> </div> </div> </div> </div> </fieldset> </section> <footer class="dac-modal-footer"> <div class="cols"> <div class="col-2of5"> </div> </div> <button type="submit" value="Submit" class="dac-fab dac-primary dac-large dac-modal-action"><i class="dac-sprite dac-arrow-right"></i></button> </footer> </form> </section> <section class="dac-swap-section dac-right"> <div class="dac-modal-content"> <p class="newsletter-success-message"> You have successfully signed up for the latest Android developer news and tips. </p> </div> </section> </div> </div> </div> </div> <!-- end footer --> </div><!-- end doc-content --> </div> <!-- end .cols --> </div> <!-- end body-content --> <script src="https://developer.android.com/ytblogger_lists_unified.js" type="text/javascript"></script> <script src="./jd_lists_unified.js?v=15" type="text/javascript"></script> <script src="./jd_extras.js?v=15" type="text/javascript"></script> <script src="./jd_collections.js?v=15" type="text/javascript"></script> <script src="./jd_tag_helpers.js?v=15" type="text/javascript"></script> </body> </html>