diff options
| author | 2014-06-25 22:55:07 +0000 | |
|---|---|---|
| committer | 2014-06-25 22:55:07 +0000 | |
| commit | 72e186283fdef7f6ac56409bf52a5748f6a4749c (patch) | |
| tree | 315270cab34b196e52e87b72238f000b05d62e50 | |
| parent | 017ec80fa1ca1212f9c98dcdbb07d1f0bab938d5 (diff) | |
| parent | 8f414479f91f73c3b8432ca93991ba643b9c846f (diff) | |
Merge branch 'klp-modular-dev' of https://googleplex-android.googlesource.com/_direct/platform/frameworks/base into klp-modular-dev
| -rw-r--r-- | docs/html/preview/google-play-services-wear.html | 18 | ||||
| -rw-r--r-- | docs/html/preview/preview_toc.cs | 6 | ||||
| -rw-r--r-- | docs/html/preview/setup-sdk.jd | 246 | ||||
| -rw-r--r-- | docs/html/preview/tv/games/index.jd | 188 |
4 files changed, 389 insertions, 69 deletions
diff --git a/docs/html/preview/google-play-services-wear.html b/docs/html/preview/google-play-services-wear.html index 31ae25b2b226..3070dbcbc942 100644 --- a/docs/html/preview/google-play-services-wear.html +++ b/docs/html/preview/google-play-services-wear.html @@ -73,6 +73,24 @@ preferably from your mobile browser:</p> <img style="margin-top:40px" src="/preview/images/opt-in.png"></li> </ol> <h2 style="margin-bottom: 0px;">3. Start Building</h2><hr> + +<p>The Google Play services SDK is required if you want to sync and send data between wearable +and handheld devices. To get the new SDK that is compatible with the Google Play services +APK that you just installed, follow these steps: </p> + +<p class="note"><b>Note:</b> We highly recommend you use Android Studio for Wear development.</p> +<ol> + <li>Start AVD Manager.</li> + <li>Update the Android SDK Tools and Platform-tools to versions 23 and 20 respectively.</li> + <li>Click <b>Tools > Manage Add-on Sites > User Defined Sites</b>.</li> + <li>Click <b>New</b>, enter + <code>https://dl-ssl.google.com/android/repository/addon-play-services-5.xml</code> into the + text field, and click <b>OK</b>.</li> + <li>Click Close. You should now see new emulator images that support this preview + release of Google Play services and the Google Play services client libraries you need to + start developing.</li> +</ol> + <p>Check out the <a href="/training/building-wearables">Building Apps for Wearables</a> training classes for information on how to build for Wear.</p> </div> diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs index a29214619fee..41d918cd0bc0 100644 --- a/docs/html/preview/preview_toc.cs +++ b/docs/html/preview/preview_toc.cs @@ -93,9 +93,9 @@ <a href="<?cs var:toroot ?>preview/license.html">License Agreement</a> </div> </li> - <li class="nav-section" style="margin: 20px 0 0 3px;"> - <div class="nav-section-header paging-links empty"> - <a href="<?cs var:toroot ?>index.html" class="prev-page-link">Developer Home</a> + <li class="nav-section" style="margin: 20px 0 0 -10px;"> + <div class="nav-section-header empty"> + <a href="<?cs var:toroot ?>index.html" class="back-link">Developer Home</a> </div> </li> </ul> diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd index 876b3481d48d..af466ab643e2 100644 --- a/docs/html/preview/setup-sdk.jd +++ b/docs/html/preview/setup-sdk.jd @@ -1,6 +1,174 @@ page.title=Setting Up the Preview SDK @jd:body + + + + + + +<div style="position:relative; min-height:600px"> + + <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;"> + + <p class="sdk-terms-intro">Before installing the Android SDK, you must agree to the following terms and conditions.</p> + + <h2 class="norule">Terms and Conditions</h2> + <div class="sdk-terms" onfocus="this.blur()" style="width:678px"> +This is the Android SDK Preview License Agreement (the “License Agreement”). + +1. Introduction + +1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview. + +1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time. + +1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. + +2. Accepting the License Agreement + +2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement. + +2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement. + +2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview. + +2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity. + +3. Preview License from Google + +3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform. + +3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. + +3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview. + +3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview. + +3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights. + +3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you. + +3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. + +3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview. + +4. Use of the Preview by You + +4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications. + +4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). + +4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so. + +4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party. + +4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. + +4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach. + +4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released. + +5. Your Developer Credentials + +5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials. + +6. Privacy and Information + +6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected. + +6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/. + +7. Third Party Applications + +7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources. + +7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners. + +7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. + +8. Using Google APIs + +8.1 Google APIs + +8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service. + +8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. + +9. Terminating the License Agreement + +9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below. + +9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials. + +9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you. + +9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of: +(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and +(B) Google issues a final release version of the Android SDK. + +9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely. + +10. DISCLAIMERS + +10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. + +10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE. + +10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + +11. LIMITATION OF LIABILITY + +11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. + +12. Indemnification + +12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement. + +13. Changes to the License Agreement + +13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available. + +14. General Legal Terms + +14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview. + +14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google. + +14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable. + +14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement. + +14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. + +14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google. + +14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. + </div><!-- sdk terms --> + + + + <div id="sdk-terms-form"> + <p> + <input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" /> + <label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label> + </p> + <p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p> + </div> + + + </div><!-- end TOS --> + + + + + + + + + + <div id="landing"> + <p>The Preview SDK is available from the Android SDK Manager. <!-- Not yet! --> This document assumes that you are familiar with Android app development, such as using the Android SDK Manager and creating projects. If you're new to @@ -52,26 +220,25 @@ can cause your phone and installed services and applications to stop working. <ol> <li>Download and uncompress the Android Developer Preview package. - <p class="table-caption" id="table1"> - <strong>Table 1.</strong> L Developer Preview system images.</p> - <table> + <table style="width:860px"> <tr> <th scope="col">Device</th> <th scope="col">Download</th> - <th scope="col">MD5 Checksum</th> - <th scope="col">SHA-1 Checksum</th> + <th scope="col">Checksum</th> </tr> <tr id="hammerhead"> - <td>Nexus 5 (GSM/LTE) "hammerhead"</td> - <td><!-- TODO --></td> - <td><code>5a6ae77217978cb7b958a240c2e80b57</code></td> - <td><code>ac1d8a8e4f4a1dca5864dc733caa940bffc28616</code></td> + <td>Nexus 5 (GSM/LTE) <br>"hammerhead"</td> + <td><a href="#top" onclick="onDownload(this)" + >hammerhead-lpv79-preview-ac1d8a8e.tgz</a></td> + <td>MD5: <code>5a6ae77217978cb7b958a240c2e80b57</code> + <br>SHA-1: <code>ac1d8a8e4f4a1dca5864dc733caa940bffc28616</code></td> </tr> <tr id="razor"> - <td>Nexus 7 (Wifi) "razor"</td> - <td><!-- TODO --></td> - <td><code>b293a5d3a4e07beabebcc0be85ad68a2</code></td> - <td><code>d0ddf8ce733ba2a34279cdff8827fd604762c2342d</code></td> + <td>Nexus 7 (Wifi) <br>"razor"</td> + <td><a href="#top" onclick="onDownload(this)" + >razor-lpv79-preview-d0ddf8ce.tgz</a></td> + <td>MD5: <code>b293a5d3a4e07beabebcc0be85ad68a2</code> + <br><nobr>SHA-1: <code>d0ddf8ce733ba2a34279cdff8827fd604762c2342d</nobr></td> </tr> </table> </li> @@ -142,3 +309,56 @@ sure that you theme extends the material theme:</p> </style> </resources> </pre> + + </div><!-- landing --> + +</div><!-- relative wrapper --> + + + +<script> + var urlRoot = "http://storage.googleapis.com/androiddevelopers/preview/"; + function onDownload(link) { + + $("#downloadForRealz").html("Download " + $(link).text()); + $("#downloadForRealz").attr('href', urlRoot + $(link).text()); + + $("#tos").fadeIn('fast'); + $("#landing").fadeOut('fast'); + + return true; + } + + + function onAgreeChecked() { + /* verify that the TOS is agreed */ + if ($("input#agree").is(":checked")) { + /* reveal the download button */ + $("a#downloadForRealz").removeClass('disabled'); + } else { + $("a#downloadForRealz").addClass('disabled'); + } + } + + function onDownloadForRealz(link) { + if ($("input#agree").is(':checked')) { + $("#tos").fadeOut('fast'); + $("#landing").fadeIn('fast'); + _gaq.push(['_trackEvent', 'L Preview', 'System Image', $("#downloadForRealz").html()]); + location.hash = ""; + return true; + } else { + $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200, + function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)} + ); + return false; + } + } + + $(window).hashchange( function(){ + if (location.hash == "") { + location.reload(); + } + }); + +</script>
\ No newline at end of file diff --git a/docs/html/preview/tv/games/index.jd b/docs/html/preview/tv/games/index.jd index b9de3a4bf051..763eada3e98b 100644 --- a/docs/html/preview/tv/games/index.jd +++ b/docs/html/preview/tv/games/index.jd @@ -1,70 +1,152 @@ -page.title=Games on TV +ikpage.title=Games on TV page.tags="controller" @jd:body -<p>This section complements the [larger best-practices guidance for designing for Android TV](TODO, use formal name of referenced doc, and add link). It assumes that you have read that guidance, and seeks to minimize repetition.</p> +<div id="qv-wrapper"> +<div id="qv"> + <h2>In this document</h2> + <ol> + <li><a href="#display">Display</li></a></li> + <li><a href="#control">Input Devices</li></a></li> + <li><a href="#manifest">Manifest</li></a></li> + <li><a href="#gpgs">Google Play Game Services</li></a></li> + <li><a href="#web">Web</a></li> + </ol> +</div> +</div> -<h2>Overview</h2> -<p>Because of factors including its large size, its control scheme, and its nature as a shared display, the television screen presents a number of considerations that may be new to mobile developers. This document breaks these considerations down into five sections:</p> -<ul> -<li>Display</li> -<li>Control</li> -<li>Manifest</li> -<li>Google Play Game Services</li> -<li>Web</li> -</ul> -<h2>Display</h2> -<p>Large and centrally situated, the television screen imposes limitations, but also opens up new opportunities for immersive gameplay.</p> -<h3>A shared display</h3> -<p>A living-room TV poses design challenges for multiplayer games, in that all players can see everything. This issue is especially germane to games (such as card games or strategy games) that rely on each player’s possession of hidden information.</p> -<p>Some mechanisms you can implement to address the problem of one player’s “eavesdropping” on another’s information are:</p> +<p>The television screen presents a number of considerations that may be new to mobile-game +developers. These areas include its large size, its control scheme, and the fact that all +players are viewing it simultaneously.</p> + + +<h2 id=display>Display</h2> +<p>The two main things to keep in mind when developing games for the TV screen are its nature as a +shared display and the need to design your game for a landscape orientation.</p> +<h3>Shared display</h3> +<p>A living-room TV poses design challenges for multiplayer games, in that all players can see +everything. This issue is especially relevant to games (such as card games or strategy games) that +rely on each player’s possession of hidden information.</p> +<p>Some mechanisms you can implement to address the problem of one player’s eavesdropping +on another’s information are:</p> <ul> -<li>A player might place a "blinder" on the screen to help conceal information. For example, in a turn-based game like a word or card game, one player at a time might view the display. When the player finishes a move, the game allows him or her to cover the screen with a “blinder” that blocks anyone from viewing secret information. When the next player begins a turn, the blinder opens to reveal his or her own information.</li> -<li>A second screen, such as a handset or larger device, can enable a player to conceal information. For information on implementing second-screen support, see <a href="http://developer.android.com/reference/android/app/Presentation.html">Presentation</a> on the Android developer site.</li> +<li>A blinder on the screen to help conceal information. For example, in a +turn-based game like a word or card game, one player at a time might view the display. When the +player finishes a move, the game allows him or her to cover the screen with a blinder that +blocks anyone from viewing secret information. When the next player begins a turn, the blinder +opens to reveal his or her own information.</li> +<li>A companion app, running on a phone or tablet, can enable a player to conceal +information.</li> </ul> -<h3>No touch interface</h3> -<p>A television does not have a touch interface. Your game design, therefore, need not take into account the possibility that a player’s controlling fingers might block the on-screen action. You can assume constant visibility of the entire viewing area.</p> -<p>See the <a href=#control>Control</a> section in this document and in [Design for TV](TODO, use formal name of referenced doc, and add link) for more implications of the lack of touch interface.</p> <h3>Landscape display</h3> -<p>In mobile-device terms, a TV is always “sideways.” You can’t turn it, and there is no portrait orientation. You should always be designing your TV games to be displayed in landscape mode.</p> -<a id=control><h2>Control</h2> -<p>Without a touch interface, it's even more important than usual to get your controls right, so that players find them intuitive and fun to use. The separation of controller from device also introduces some other issues to pay attention to, like keeping track of multiple players' controllers, and handling disconnects gracefully.</p> +<p>A TV is always sideways: You can’t turn it, and there is no +portrait orientation. Always design your TV games to be displayed in landscape +mode.</p> + +<h2 id="control">Input Devices</h2> +<p>TVs don't have touch interfaces, so it's even more important to get your controls right and make + sure that players find them intuitive and fun to use. The separation of controller from device also +introduces some other issues to pay attention to, like keeping track of multiple players' +controllers, and handling disconnects gracefully.</p> <h3>D-pad</h3> -<p>Because of the lack of touch interface, you should be planning your control scheme based on a D-pad. Some key points to keep in mind include:</p> -<p>The player needs to use the gamepad in all aspects of the game–not just controlling core gameplay, but also navigating menus and ads. For this reason, you should also ensure that your Android TV game does not refer to a touch interface: for example, an Android TV game cannot tell a player to "Tap to skip".</p> -<p>You can avoid unhappy surprises (and resulting low ratings) by using your Play Store description to communicate to the player any expectations about controllers. If a game is better suited to a gamepad with a joystick than one with only a D-pad, you should make this clear. A player who uses an ill-suited controller for a game is likely to have a subpar experience–and penalize your game in the ratings.</p> -<p>You can also help ensure a good player experience by ensuring that button mapping is intuitive and flexible. For example, you can adhere to accepted custom by using the A button to <code>Accept</code>, and the B button to <code>Cancel</code>. You can also offer flexibility in the form of remappability. For more information on button mapping, see <a href="http://developer.android.com/training/game-controllers/controller-input.html">Handling Controller Actions</a>.</p> -<p>Your game can also contribute to a good match between controller and game by querying the controller about its capabilities. For example, you may intend for a player to steer an object by waving the controller in the air. If a player's controller lacks accelerometer and gyroscope hardware, however, waving will not work. But when your game queries the controller and discovers that motion detection is not supported, it can switch over to an alternative, available control scheme.</p> -<p>For more information on querying controller capabilities, see <a href="http://developer.android.com/training/game-controllers/compatibility.html">Supporting Controllers Across Android Versions</a>.</p> +<p>Plan your control scheme around a directional pad (D-pad) control, since this control set is the +default for Android TV devices. The player needs to be able to use a D-Pad in all aspects of the +game–not just controlling core +gameplay, but also navigating menus and ads. For this reason, you should also ensure that your +Android TV game does not refer to a touch interface: for example, an Android TV game cannot tell a +player to <strong>Tap to skip</strong>.</p> +<p>How you shape the player's interaction with the controller can be key to achieving a great user +experience: + <ul> + <p><li><strong>Communicate Controller Requirements up Front</strong> - Use your Play Store description to communicate to the player any expectations about +controllers. If a game is better suited to a gamepad with a joystick than one with only a D-pad, +make this fact clear. A player who uses an ill-suited controller for a game is likely to have a +subpar experience–and penalize your game in the ratings.</p> + <p><li><strong>Use Consistent Button Mapping</strong> - Intuitive and flexible button mapping is key to a good user experience. For example, +you can adhere to accepted custom by using the A button to <code>Accept</code>, and the B button to +<code>Cancel</code>. You can also offer flexibility in the form of remappability. For more +information on button mapping, see <a +href="http://developer.android.com/training/game-controllers/controller-input.html">Handling +Controller Actions</a>.</p> + <p><li><strong>Detect Controller Capabilities and Adjust Accordingly</strong> - Query the controller about its capabilities in order to optimize the match between +controller and game. For example, you may intend for a player to steer an object by waving the +controller in the air. If a player's controller lacks accelerometer and gyroscope hardware, however, +waving will not work. When, however, your game queries the controller and discovers that motion detection +is not supported, it can switch over to an alternative, available control scheme. +For more information on querying controller capabilities, see <a +href="http://developer.android.com/training/game-controllers/compatibility.html">Supporting +Controllers Across Android Versions</a>.</p> + </ul> <h3>Back-button behavior</h3> -<p>The Back button should never act as a toggle. For example, do not use it to both open and close a menu. Its behavior should only be linear. For example: Game play > Game pause screen > Game main screen > Android home screen.</p> -<p>With this principle of "linear navigation" in mind, you <b>may</b> use the back button to leave an in-game menu (opened by a different button) and return to gameplay.</p> +<p>The Back button should never act as a toggle. For example, do not use it to both open and close +a menu. It should only navigate backward, breadcrumb-style, through the previous screens the player has +been on. For example: Game play > Game pause screen > Game +main screen > Android home screen.</p> +<p>Since the Back button should only perform linear (backward) navigation, you may use the +back button to leave an in-game menu (opened by a different button) and return to gameplay. For +more information about design for navigation, see <a +href="http://developer.android.com/design/patterns/navigation.html">Navigation with Back and +Up</a>. To learn about implementation, refer to <a +href="http://developer.android.com/training/implementing-navigation/temporal.html">Providing Proper +Back Navigation</a>. </p> <h3>Handling multiple controllers</h3> -<p>When multiple players are playing a game, each with his or her own controller, it is important to map each player-controller pair. For information on how to implement controller-number identification, see <a href="http://developer.android.com/reference/android/view/InputDevice.html#getControllerNumber(">Input Devices</a>) on the Android developer site.</p> +<p>When multiple players are playing a game, each with his or her own controller, it is important +to map each player-controller pair. For information on how to implement controller-number +identification, see <a href="http://developer.android.com/reference/android/view/InputDevice.html +#getControllerNumber(">Input Devices</a>) on the Android developer site.</p> <h3>Handling disconnects</h3> -<p>When a controller is disconnected in the middle of gameplay, the game should pause, and a dialog should appear prompting the disconnected player to reconnect his or her controller.</p> -<p>The dialog should also offer troubleshooting tips (e.g., "Check your Bluetooth connection").</p> -<h2>Manifest</h2> -<p>Games are displayed in a separate row from regular apps in the launcher. Android TV uses the <code>android:isGame</code> flag to differentiate games from non-game apps. You can assign it a value of either <code>true</code> or <code>false</code>. For example:</p> +<p>When a controller is disconnected in the middle of gameplay, the game should pause, and a dialog +should appear prompting the disconnected player to reconnect his or her controller.</p> +<p>The dialog should also offer troubleshooting tips (for example, a pop-up dialog telling the player to +"Check your Bluetooth connection"). For more information on implementing input-device support, see <a +href="http://developer.android.com/training/game-controllers/controller-input.html">Supporting Game +Controllers"</a>. Specific information about Bluetooth connections is at <a +href="http://developer.android.com/guide/topics/connectivity/bluetooth.html">Bluetooth</a>.</p> + +<h2 id="manifest">Manifest</h2> +<p>Games are displayed in a separate row from regular apps in the launcher. Android TV uses the +<code>android:isGame</code> flag to differentiate games from non-game apps. You can assign it a +value of either <code>true</code> or <code>false</code>. For example:</p> <pre class="fragment"><application> - . . . - <meta-data android:name="isGame" android:value=["true" | "false"]/> -android:isGame=["true" | "false"] > - . . . -</application> -</pre><h2>Google Play Game Services</h2> -<p>If your game integrates Google Play Game Services, you should keep in mind a number of considerations pertaining to achievements, sign-on, saving games, and multiplayer play.</p> + ... +< android:isGame=["true" | "false"] > + ... +</application></pre> + +<h2 id="gpgs">Google Play Game Services</h2> +<p>If your game integrates Google Play Game Services, you should keep in mind a number of +considerations pertaining to achievements, sign-on, saving games, and multiplayer play.</p> <h3>Achievements</h3> -<p>Your game should include at least five (earnable) achievements. Only a user controlling gameplay from a supported input device should be able to earn achievements.</p> -<h3>Sign-on</h3> -<p>Your game should attempt to sign the user in on launch. If the player declines sign-in several times in a row, your game should stop asking.</p> +<p>Your game should include at least five (earnable) achievements. Only a user controlling gameplay +from a supported input device should be able to earn achievements. For more information on +Achievements and how to implement them, see <a +href="https://developers.google.com/games/services/android/achievements">Achievements in +Android</a>.</p> +<h3>Sign-in</h3> +<p>Your game should attempt to sign the user in on launch. If the player declines sign-in several +times in a row, your game should stop asking. Learn more about sign-in at <a +href="https://developers.google.com/games/services/training/signin">Implementing Sign-in on +Android</a>.</p> <h3>Saving</h3> -<p>We highly recommend using Play Services cloud save to store your game save. Your game should bind game saves to a specific Google account, so as to be uniquely identifiable even across devices: Whether the player is using a handset or a TV, the game should be able to pull the same game-save information from his or her account.</p> -<p>You should also provide an option in your game's UI to prompt the player to destroy save data. You might put the option in the game's <code>Settings</code> screen.</p> +<p>We highly recommend using Play Services <a +href="https://developers.google.com/games/services/common/concepts/cloudsave">Cloud Save</a> to +store your game save. Your game should bind game saves to a specific Google account, so as to be +uniquely identifiable even across devices: Whether the player is using a handset or a TV, the game +should be able to pull the same game-save information from his or her account.</p> +<p>You should also provide an option in your game's UI to allow the player to delete locally and +cloud-stored data. You might put the option in the game's <code>Settings</code> screen. For +specifics on implementing Cloud Save, see <a +href="https://developers.google.com/games/services/android/cloudsave">Cloud Save in Android</a>.</p> <h3>Multiplayer experience</h3> -<p>A game offering a multiplayer experience must allow at least two players to enter a room.</p> -<h2>Web</h2> -<p>Android TV games do not support a full web browser. You should therefore avoid using generic URLs in your game.</p> -<p>Webviews will work for logins to services like Google+ and Facebook. </p> +<p>A game offering a multiplayer experience must allow at least two players to enter a room. For +further information on multiplayer games in Android, see the <a +href="https://developers.google.com/games/services/android/realtimeMultiplayer">Real-time +Multiplayer</a> and <a href="">Turn-based Multiplayer</a> documentation on the Android developer +site.</p> + +<h2 id="web">Web</h2> +<p>We discourage including web browsing in games for Android TV. The television set is not well-suited for browsing,, either in terms of display or control scheme.</p> +<p class="note"><strong>Note:</strong> You can use the {@link android.webkit.WebView} class for logins to services like Google+ and +Facebook. </p> |