diff options
Diffstat (limited to 'docs/html/wear')
81 files changed, 6498 insertions, 0 deletions
diff --git a/docs/html/wear/css/wear.css b/docs/html/wear/css/wear.css new file mode 100644 index 0000000..9d9d7a7 --- /dev/null +++ b/docs/html/wear/css/wear.css @@ -0,0 +1,442 @@ +/** + * UTILITIES + */ + +.border-box { + box-sizing: border-box; +} + +.vertical-center-outer { + display: table; + height: 100%; + width: 100%; +} + +.vertical-center-inner { + display: table-cell; + vertical-align: middle; +} + +/** + * TYPE STYLES + */ + +.wear-h1 { + font-weight: 300; + font-size: 60px; + line-height: 78px; + text-align: center; + letter-spacing: -1px; +} + +.wear-pre-h1 { + font-weight: 400; + font-size: 28px; + color: #93B73F; + line-height: 36px; + text-align: center; + letter-spacing: -1px; + text-transform: uppercase; + +} + +.wear-h1.hero { + text-align: left; +} + +.wear-h2 { + font-weight: 300; + font-size: 42px; + line-height: 64px; + text-align: center; +} + + +.wear-subhead { + color: #999999; + font-size: 20px; + line-height: 28px; + text-align: center; +} +.wear-subhead.hero { + text-align: left; + color: white; +} + +.wear-hero-description { + text-align: left; + margin: 1em 0; +} + +.wear-hero-description p { + font-weight: 300; + margin: 0; + font-size: 18px; + line-height: 24px; +} + +.wear-body .wear-small { + font-size: 14px; + line-height: 19px; +} + +.wear-body.wear-align-center { + text-align: center; +} + +.wear-align-left { + text-align: left; +} + +/** + * LAYOUT + */ + +.wear-body-content { + height: 100%; +} + +.wear-section { + padding: 80px 10px 80px; + width: 100%; + margin-left: -10px; + text-rendering: optimizeLegibility; +} + +#extending-android-to-wearables { + padding-top: 30px; +} + +.wear-short-section { + padding: 40px 10px 28px; +} + +.wear-gray-background { + background-color: #e9e9e9; +} + +.wear-white-background { + background-color: white; +} + +.wear-red-background { + color: white; + background-color: hsl(8, 70%, 54%); +} + +.wear-subhead-red { + color: hsl(8, 71%, 84%); + text-align: left; +} + +.wear-subhead-red p { + margin-top: 20px; +} + +.wear-hero-container { + height: 800px; + height: 100vh; +} + +.wear-hero { + height: 100%; + height: calc(100% - 72px); + min-height: 504px; + margin-top: -4px; + padding-top: 0; + padding-bottom: 0; + background-image: url(/wear/images/hero.jpg); + background-size: cover; + background-position: right center; + color: white; + position: relative; + overflow: hidden; +} + +.wear-hero-scrim { + background: black; + opacity: .2; + position: absolute; + width: 100%; + height: 100%; + margin-left: -10px; +} + +.wear-hero-wrap { + margin: 0 auto; + width: 940px; + clear: both; + height: 100%; + position: relative; +} + +.wear-section-header { + margin-bottom: 40px; +} + +.wear-hero-wrap .wear-section-header { + margin-bottom: 16px; +} + +.wear-body { + font-size: 18px; + line-height: 24px; +} + +.wear-button { + display: inline-block; + padding: 16px 32px; + font-size: 18px; + font-weight: 500; + line-height: 24px; + cursor: pointer; + color: white; + -webkit-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; + -webkit-transition: .2s background-color ease-in-out; + -moz-transition: .2s background-color ease-in-out; + -o-transition: .2s background-color ease-in-out; + transition: .2s background-color ease-in-out; +} + +.wear-primary { + background-color: hsl(8, 70%, 54%); /* #dc4b35 */ + color: #f8f8f8; +} + +.wear-button.wear-primary:hover { + background-color: hsl(8, 70%, 44%); /* #bf3722 */ +} + +.wear-button.wear-primary:active { + background-color: hsl(8, 70%, 36%); /* # */ +} + +.wear-button.wear-secondary { + background-color: hsl(8, 70%, 44%); +} + +.wear-button.wear-secondary:hover { + background-color: hsl(8, 70%, 36%); +} + +.wear-button.wear-secondary:active { + background-color: hsl(8, 70%, 30%); +} + +a.wear-button, +a.wear-button:hover, +a.wear-button:visited { + color: white !important; +} + +.wear-video-link { + display: inline-block; + padding: 16px 32px 16px 82px; + font-size: 18px; + font-weight: 400; + line-height: 24px; + cursor: pointer; + color: hsla(0, 0%, 100%, .8); + -webkit-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; + -webkit-transition: .2s color ease-in-out; + -moz-transition: .2s color ease-in-out; + -o-transition: .2s color ease-in-out; + transition: .2s color ease-in-out; +} + +.wear-video-link:before { + height: 64px; + width: 64px; + display: inline-block; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAFuklEQVR42u2dXWgcVRSAV9LWtBBTTZVWUhNqEQtq1QeroDRKFRFsROqTYPuo+JCiIoJKFC0USqlUfCiowRcfrBgVUUElefAPkW5T8aeaGn9aRbFsjP0x2cx8PuRMvFxmdjeb2Z17Z8+B85DsZPbO+eaec3/OPSkABdXsVI2gABSAqgJQAKoKQAGoKgAFoKoAFICqAlAAqgpAAai6DqDRAiwDeoFtwB7gPaAInABKwKToCWAMeB/YDdwJrAWWNLh9+QMAXABsBQ4A3wFTwAxQBmaBAAhjNJDPy3L938BXwAvArUCHAkh+kCXAVcA+YBw4bRg7MngtkgTlDPA98CywHmhTAP8/xCbgVeAvMZZpwDQllN7xB/AysKGlAQAXAvuBkzW85UVgCBgENlfQQbmuWAXELPAnsAvoaikAQBtwh/j3coLhS2LIfqCzzu/plL8fkvvFgZiR4L2lHrfkHQBgpQTFUwmGnwC212v0KjC2y/3jQPwDPA+05xYAcBHwubx1YZzhC02QBBBRbxgBzssdAOBy4JgRZE0ZTPuNr7FHDCbEhqNAd24AAN0yUbID7QSwsZChABut3hANXY8Bq70HIMb/Ocb4w81+66v0hmGrN0QQ1ngLQJYRvpWHMWWo4KDIaMnuCcVKgdlZAGL8t2J8vpPGrwChDLyWBMFlAA8D0z4ZvwKEs8D93gCQEc9Jy/jFgkdizaRDGUSs8wXAu1bQLQE9ngHosWbPAXDQeQAypT9rBd3+gociyxi2K9riLABZUj5iuZ6RgsciM2OzFxw2A7JrAO6VwGtKTwpG+Anoy9AVmb3gDHCPcwCAFcChRox6jPu9CazMeFQUAKNRL3AJwE2yopjq228BQPZ/d2bcCyaBTa4BeNGa8Q6naIA4GQWubiKEYWvBbp8zAGQt5VfL/fQ3GEAkTzXDLVkjokA2k5a7AuA2GaLNj/tTfvhq0pQgbcwLQtlQusYVALtlzSR191MjADNI9zbJDZWBR10BMGr5/4GMADQ0SAMDlht62xUAxy0AmzMEEMnhtIO0ZF2YAH5wITd0hQw/5wE04M1bjDyXZpC2hqMlYGnWAHqBf40APOEYgChI35VSWyasWfGqrAH0WVkOIw4CSC1IG2tDoSy7XJE1gPs8ArDoIG0BmJGk30wBDHgGYFFBOgbAtqwB7GxxAHerC8rOBU0Dt2gQzjYIb8gawDor+6HVhqFdrkzEwhabiAVOTMSkUb+06FLEUVfWgj5q0cW4g64AeNo66ZLlcnTDNmesBN4y8KArAG6QU42ttCEzBVzpCoAO4EfLDeV5SzIEvgHaXdqUP2BlQud1Ux55zj2uZUX02cPRnKalRLmu17qYmPWF5YbymJgVAh8Ay5wCII3ZEZOYm6fURGT2u9X43Mnk3CDHybmfmRVYXExPv9nKEcpLejqSC3SjdY2TBzTesHqB7wc0onTEV2KucxLApXKkJy9HlAI5anuJFwCkYQ/EuCJfD+mdBnYkXOssgHY53un7MdVZ4CVgqVcADAhjMafkfTioHc14P04yvvMApIEXy5F/+7S8y6UKolPyR4BVVf7Wi2IdawwIPhTrmAW+rmZ8bwBIQ7vloXwoVzNWS6UUrwAYy9YfOlqwKZDkgneA5Qu4l3cly84F9sqGhislywLmaozuYoGFXr0DII1ukxP1hxJ6QzR7HqLxRfumZaRzXZ3f4XXZyi7gCeB3kqsnzs+kSb9s5XHgMeD8RTxDLgq3rmeuYuFvNYCoR8wqujNi+L3UWBcu9wAMt3QZ8LiMlk5RuU50teq6kcEDgTolveIRYHUQBOek1O5cFu/ukLz7/ZJgNSm+OirebWpgaPS7slxfAr4EngGuX8jopqUBxGzyrAVuB54EXgc+lV4yLhO8cfn5E+ZqUD8kBu9sQvv0Hzj4rmoEBaAAVBWAAlBVAApAVQEoAFUFoABUFYACUFUACkC1CfofXVRJocowZVYAAAAASUVORK5CYII=); + background-size: contain; + position: absolute; + content: ""; + opacity: .7; + margin-top: -19px; + margin-left: -64px; + -webkit-transition: .2s opacity ease-in-out; + -moz-transition: .2s opacity ease-in-out; + -o-transition: .2s opacity ease-in-out; + transition: .2s opacity ease-in-out; +} + +.wear-video-link:hover { + color: hsla(0, 0%, 100%, 1); +} + +.wear-video-link:hover:before { + opacity: 1; +} + +.wear-social-image { + float: left; + margin-right: 14px; + height: 64px; + width: 64px; +} + +.wear-social-copy { + padding-left: 78px; +} + +.wear-scroll-down-affordance { + position: absolute; + bottom: 0; + width: 100%; + text-align: center; + z-index: 10; +} + +.wear-down-arrow { + padding: 24px; + display: inline-block; + opacity: .5; + -webkit-transition: .2s opacity ease-in-out; + -moz-transition: .2s opacity ease-in-out; + -o-transition: .2s opacity ease-in-out; + transition: .2s opacity ease-in-out; + + -webkit-animation-name: pulse-opacity; + -webkit-animation-duration: 4s; +} + +.wear-down-arrow:hover { + opacity: 1; +} + +.wear-down-arrow img { + height: 28px; + width: 28px; + margin: 0 auto; + display: block; +} + +.wear-divider { + display: inline-block; + height: 2px; + background-color: white; + position: relative; + margin: 10px 0; +} + +/* 3 CLOLUMN LAYOUT */ + +.wear-breakout { + margin-top: 40px; + margin-bottom: 40px; +} + +.wear-breakout img { + margin-bottom: 20px; +} + +.wear-partners img { + margin-bottom: 20px; +} + +.wear-breakout p { + padding: 0 23px; +} + +.wear-inset-video-container { + position: relative; +} + +.wear-inset-video-container img.gif { + max-width: 222px; + position: absolute; + top: 40px; + left: 40px; +} + +img.wear-bezel-only { + height:302px; + width:302px; +} + +.wear-breakout.wear-partners img { + margin-bottom: 20px; +} + +.col-3-wide { + display: inline; + float: left; + margin-left: 10px; + margin-right: 10px; +} + +.col-3-wide { + width: 302px; +} + +/** + * ANIMATION + */ + +@-webkit-keyframes pulse-opacity { + 0% { + opacity: .5; + } + 20% { + opacity: .5; + } + 40% { + opacity: 1; + } + 60% { + opacity: .5; + } + 80% { + opacity: 1; + } + 100% { + opacity: .5; + } +} + + + +/** + * VIDEO + */ + +#video-container { + display:none; + position:fixed; + top:0; + left:-10px; + width:102%; + height:100%; + background-color:rgba(0,0,0,0.7); + z-index:99; +} + +#video-frame { + width:940px; + height:526.4px; + margin:80px auto 0; + display:none; +} + +.video-close { +cursor: pointer; +position: relative; +left: 940px; +top: 0; +pointer-events: all; +} + +#icon-video-close { +background-image: url("../images/close.png"); +background-position: 0 0; +height: 48px; +width: 48px; +display:block; +}
\ No newline at end of file diff --git a/docs/html/wear/design/index.html b/docs/html/wear/design/index.html new file mode 100644 index 0000000..4bbbf29 --- /dev/null +++ b/docs/html/wear/design/index.html @@ -0,0 +1,602 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Design Principles of Android Wear | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Design Principles of Android Wear</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <style> +h3 { + padding:30px 0 10px; +} +</style> +<p> +Android Wear devices provide just the right information at just the right time, allowing you to be connected to the virtual world and present in the real world.</p> + +<img src="/wear/images/05_images.png" height="200" width="169" style="float:right;clear:right;margin:0 0 60px 60px" /> + +<p>Here you’ll find some guidelines for designing great user experiences on the Android Wear platform. Designing for Android Wear is substantially different than designing for phones or tablets, so we’ll start by describing how your content can work in tandem with the overall Android Wear vision.</p> + + +<img src="/wear/images/02_notifications.png" height="200" width="169" style="float:right;clear:right;margin:0 0 20px 60px" /> + + + +<p>Android Wear experiences are:</p> + +<ul> + <li><strong>Contextually aware and smart.</strong> These devices bring a new level of awareness to computing. Rather than requiring attention and input from users, Android Wear devices are aware of their situation and state, and helpfully display the right information at the right time. <em>Timely, relevant, specific</em>.</li> + + <li><strong>Glanceable.</strong> Wearable devices are used all throughout the day, even when they sit in our peripheral vision. Effective apps provide the maximum payload of information with a minimum of fuss, optimized to provide tiny snippets of relevant information throughout the day. <em>Short, sharp, immediate.</em></li> + + <li><strong>Zero/low interaction.</strong> Staying true to the strengths afforded by a smaller form factor, Android Wear focuses on simple interactions, only requiring input by the user when absolutely necessary. Most inputs are based around touch swipes or voice, and inputs requiring fine-grained motor skills are avoided. <em>Gestural, simple, fast.</em></li> + + <li><strong>Helpful.</strong> Android Wear is like a great personal assistant: it knows you and your preferences, it only interrupts you when absolutely necessary, and it’s always on hand to provide a ready answer. <em>Efficient, respectful, responsive.</em></li> +</ul> + + +<p> +By providing a smart connection to the rest of the world while respecting the user’s attention, Android Wear feels personal and global, simple and smart, unobtrusive and ever-ready. Notifications that respect these principles will feel most at home in the overall Android Wear experience. +</p> + + + +<h2 id="Notifications" style="clear:both">Notification UI Patterns</h2> + +<p>Android notifications appear as cards in the main stream and form the core of the Android Wear experience. Many of the main <a href="http://developer.android.com/design/patterns/notifications.html">Android Design guidelines for notifications</a> apply in Android Wear. Be respectful of users' attention and aware of how unnecessary interruptions will reflect on your application’s reputation.</p> + +<p>Omit needless text from your notifications. Design for glanceability, not reading. Use words and phrases, not sentences. Show, don't tell: where possible use simple icons, glyphs, and visualizations to convey your message.</p> +<img src="/wear/images/circle_message2.png" height="200" style="float:right;clear:right;margin:0 0 20px 60px" /> + +<p>In some cases, particularly with messaging applications, cards will contain dynamic content which may not fit on a single screen. In these cases the content will be automatically truncated to fit on the card and the user may tap to expand, so the full message should be provided.</p> + +<p>Notification priority should reflect the urgency of your notification, with only time-sensitive notifications carrying a high priority. Active notifications – that is, those that cause the device to vibrate – should only be used in cases that need the user's urgent attention or action (e.g. a time-based reminder, a message from a friend). Non-urgent notifications (e.g. a transit times card, daily pedometer count, social network updates) should be silently added to the card stream.</p> + + + + +<h3 id="NotifictionActions" style="clear:both">Actions</h3> + +<img src="/wear/images/circle_message2_reply.png" height="200" style="float:right;clear:right;margin:0 0 20px 40px" /> + +<p>Actions appear to the right of your notification, allowing the user to act on your notification. Up to three actions are permitted. The most-used action should be placed first, so that it is a single swipe away from your content.</p> + +<p>Actions consist of an icon and a caption. Icons should be PNG files, white on transparent background, 64 × 64 DP. Captions should be verb-driven and short, and will be automatically truncated at one line.</p> + +<p>Actions are optional. Many useful notifications will not need to include actions at all.</p> + +<p>For developer details about action buttons, see <a href="/wear/notifications/creating.html">Creating +Notifications for Android Wear</a>.</p> + + + + + + +<h3 id="Images" style="clear:both">Images</h3> + +<img src="/wear/images/circle_badge_B.png" height="200" style="float:right;clear:right;margin:0 0 20px 40px" /> + + +<p>Images appear behind cards in the stream, providing context and additional glanceability. Your image should support the core message of the notification; for example, a card about a sports team could include the team color and logo; a message from a contact should display that person's profile photo.</p> + +<p>Bear in mind that the card will partially cover the lower part of the image. Images should be at least 320 × 320 pixels at hdpi. Image backgrounds move when horizontally swiped, so landscape-oriented images work better on notifications that include pages or actions.</p> + +<p>To add large images, use <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#setLargeIcon(android.graphics.Bitmap)">setLargeIcon()</a></code> with any notification, as +shown in <a href="/wear/notifications/creating.html">Creating +Notifications for Android Wear</a>.</p> + + + + + +<h3 id="AppIcons" style="clear:both">Application Icons</h3> + +<img src="/wear/images/07_appicons.png" height="200" style="float:right;margin:0 0 20px 60px" /> + +<p>Your application’s launcher icon will be automatically placed on the card, identifying your notification. Do not use the notification title or background image to identify or brand your application. Instead, allow your icon to identify itself and focus on delivering a clear, succinct message in the card and image. You can choose not to display this icon. +</p> + + + + + + + +<h3 id="NotificationPages" style="clear:both">Pages</h3> + +<p>Pages are additional cards that can appear to the right of your main card in the stream. If your core message is longer than a short snippet, do not sacrifice glanceability by packing a lot of information into your primary notification. Instead, use pages to provide additional content.</p> + +<img src="/wear/images/08_pages.png" height="200" style="float:left;margin:0 0 20px 0px" /> +<img src="/wear/images/09_pages.png" height="200" style="float:left;margin:0 0 20px 60px" /> +<img src="/wear/images/10_pages.png" height="200" style="float:left;margin:0 0 20px 60px" /> + +<p style="clear:left">Pages appear immediately to the right of the main notification card. They are typically used to provide additional details or alternate views of the main card’s content. For example:</p> +<ul> + <li>A current weather card might provide an additional page showing a three-day forecast.</li> + <li>A next train departure card might provide an additional page showing subsequent departures times.</li> + <li>A daily step count card might provide an additional page showing the same measurement in calories and distance.</li> +</ul> + +<p>There is no imposed limit on the number of pages you may add. However, notifications that provide actions should show no more than three pages to ensure that the actions remain easily accessible.</p> + +<p>Pages are optional. Many useful notifications will not need to include pages at all.</p> + +<p>For developer details about pages, see +described in <a href="/wear/notifications/pages.html">Adding +Pages to a Notification</a>.</p> + + + + + +<h3 id="NotificationStacks" style="clear:both">Notification Stacks</h3> + +<img src="/wear/images/11_bundles_B.png" height="200" style="float:right;margin:0 0 20px 60px" /> +<img src="/wear/images/11_bundles_A.png" height="200" style="float:right;margin:0 0 20px 60px" /> + +<p>Stacks may be used to collect multiple notifications from the same application into a single stack of cards. Whereas pages are used to provide additional detail on a single notification, stacks are used to collect multiple sibling notifications together. A stack may be expanded by the user to access each individual card contained within.</p> + +<p>Stacks are a way of adding multiple useful notifications without overwhelming the user’s stream. If your application may produce multiple concurrent notifications, consider combining them into a stack.</p> + +<p>Each notification within a stack can contain separate pages and separate actions that are relevant to that specific notification. The user can access these actions after expanding that notification's card within the stack.</p> + +<p>For developer details about stacks, see +described in <a href="/wear/notifications/stacks.html">Stacking +Notifications</a>.</p> + + + + + + +<h3 id="VoiceReplies" style="clear:both">Voice Replies</h3> + + +<img src="/wear/images/circle_voice_B.png" height="200" style="float:right;margin:0 0 20px 40px" /> +<img src="/wear/images/circle_voice_A.png" height="200" style="float:right;margin:0 0 20px 40px" /> + +<p>Voice replies are primarily used by messaging applications to provide a hands-free way of dictating a short message. You can also provide a up to five suggested replies or “canned responses” that are useful in a wide range of cases. These canned responses can be tapped by the user, allowing for a fast method of sending simple replies in cases where speaking may not be desirable.</p> + +<p>You should attempt to cover a range of simple, neutral replies in your choices. Longer voice replies may be automatically truncated in the Voice reply UI.</p> + +<p>For developer details about enabling voice replies, see +described in <a href="/wear/notifications/remote-input.html">Receiving Voice Input from +a Notification</a>.</p> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/design/user-interface.html b/docs/html/wear/design/user-interface.html new file mode 100644 index 0000000..f87b9da --- /dev/null +++ b/docs/html/wear/design/user-interface.html @@ -0,0 +1,498 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>UI Overview | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//www.google.com/jsapi" type="text/javascript"></script> +<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script> +<link rel="stylesheet" type="text/css" href="/wear/css/wear.css"> +<script type="text/javascript"> + var toRoot = "/"; + var metaTags = []; + var devsite = false; +</script> +<script src="/assets/js/docs.js" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >UI Overview</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <style> +h3 { + padding:30px 0 10px; +} +</style> + +<p>A new form factor deserves a new UI model. At a high level, the Android Wear UI consists of two +main spaces centered around the core functions of <strong>Suggest</strong> and +<strong>Demand</strong>. Your application will have an important role to play in both of these +spaces.</p> + + + +<h3 id="Stream">Suggest: The Context Stream</h3> + +<div class="wear-inset-video-container" style="float:right;margin:0 -22px 60px 40px"> + <img class="wear-bezel-only" src="/wear/images/screens/bezel.png" alt=""> + <img class="gif" src="/wear/images/screens/stream.gif"> +</div> + +<p>The context stream is a vertical list of cards, each showing a useful or timely piece of +information. Much like Google Now on Android phones and tablets, users swipe vertically to navigate +from card to card for a brief and comprehensive update about what's important to them. Only one card +is displayed on screen at a time, and background images are used to provide additional visual +information. Your application can create cards and inject them into the stream when they are most +likely to be useful.</p> + +<p>Cards in the stream are more than simple notifications. They can be swiped horizontally to +reveal additional pages. Further horizontal swiping may reveal tappable buttons, allowing the user +to take action on the notification. Cards can also be dismissed by swiping left to right, removing +them from the stream until the next time they have useful information to display. In the emulator, +hovering the mouse over the screen illuminates a blue bar at the top of the device +that takes you home when clicked.</p> + + + +<h3 id="CueCard">Demand: The Cue Card</h3> + +<div class="wear-inset-video-container" style="float:right;margin:0 -22px 60px 40px"> + <img class="wear-bezel-only" src="/wear/images/screens/bezel.png" alt=""> + <img class="gif" src="/wear/images/screens/cuecard.gif"> +</div> + +<p>For cases where the context stream can't anticipate what the user would like to do, the cue card +allows users to speak to their device. The cue card is opened by saying, "Ok Google" or by tapping +on the "g" icon on the home screen. Swiping up on the cue card shows a list of actions, which can +also be tapped.</p> + +<p>The list of actions includes Android intents for voice actions. The upcoming Android Wear SDK +will enable developers to match their applications to these intents so users can perform actions +using these voice commands. Multiple applications may register for a single voice intent, and users +will have the opportunity to choose which application they prefer to use.</p> + + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/images/01_notifications.png b/docs/html/wear/images/01_notifications.png Binary files differnew file mode 100644 index 0000000..f9729d2 --- /dev/null +++ b/docs/html/wear/images/01_notifications.png diff --git a/docs/html/wear/images/02_notifications.png b/docs/html/wear/images/02_notifications.png Binary files differnew file mode 100644 index 0000000..417f4a6 --- /dev/null +++ b/docs/html/wear/images/02_notifications.png diff --git a/docs/html/wear/images/03_actions.png b/docs/html/wear/images/03_actions.png Binary files differnew file mode 100644 index 0000000..2e2ab0d --- /dev/null +++ b/docs/html/wear/images/03_actions.png diff --git a/docs/html/wear/images/04_images.png b/docs/html/wear/images/04_images.png Binary files differnew file mode 100644 index 0000000..5c136d6 --- /dev/null +++ b/docs/html/wear/images/04_images.png diff --git a/docs/html/wear/images/05_images.png b/docs/html/wear/images/05_images.png Binary files differnew file mode 100644 index 0000000..54f2827 --- /dev/null +++ b/docs/html/wear/images/05_images.png diff --git a/docs/html/wear/images/06_images.png b/docs/html/wear/images/06_images.png Binary files differnew file mode 100644 index 0000000..fb53af5 --- /dev/null +++ b/docs/html/wear/images/06_images.png diff --git a/docs/html/wear/images/07_appicons.png b/docs/html/wear/images/07_appicons.png Binary files differnew file mode 100644 index 0000000..eb2867f --- /dev/null +++ b/docs/html/wear/images/07_appicons.png diff --git a/docs/html/wear/images/08_pages.png b/docs/html/wear/images/08_pages.png Binary files differnew file mode 100644 index 0000000..9a8fb51 --- /dev/null +++ b/docs/html/wear/images/08_pages.png diff --git a/docs/html/wear/images/09_pages.png b/docs/html/wear/images/09_pages.png Binary files differnew file mode 100644 index 0000000..c0d90da --- /dev/null +++ b/docs/html/wear/images/09_pages.png diff --git a/docs/html/wear/images/10_pages.png b/docs/html/wear/images/10_pages.png Binary files differnew file mode 100644 index 0000000..4a5f4ee --- /dev/null +++ b/docs/html/wear/images/10_pages.png diff --git a/docs/html/wear/images/11_bundles_A.png b/docs/html/wear/images/11_bundles_A.png Binary files differnew file mode 100644 index 0000000..7199a1f --- /dev/null +++ b/docs/html/wear/images/11_bundles_A.png diff --git a/docs/html/wear/images/11_bundles_B.png b/docs/html/wear/images/11_bundles_B.png Binary files differnew file mode 100644 index 0000000..bb751a2 --- /dev/null +++ b/docs/html/wear/images/11_bundles_B.png diff --git a/docs/html/wear/images/12_voicereply.png b/docs/html/wear/images/12_voicereply.png Binary files differnew file mode 100644 index 0000000..04f08cf --- /dev/null +++ b/docs/html/wear/images/12_voicereply.png diff --git a/docs/html/wear/images/13_voicereply.png b/docs/html/wear/images/13_voicereply.png Binary files differnew file mode 100644 index 0000000..2939cad --- /dev/null +++ b/docs/html/wear/images/13_voicereply.png diff --git a/docs/html/wear/images/14_circle_voicereply.png b/docs/html/wear/images/14_circle_voicereply.png Binary files differnew file mode 100644 index 0000000..15e27df --- /dev/null +++ b/docs/html/wear/images/14_circle_voicereply.png diff --git a/docs/html/wear/images/android-wear.png b/docs/html/wear/images/android-wear.png Binary files differnew file mode 100644 index 0000000..081bc89 --- /dev/null +++ b/docs/html/wear/images/android-wear.png diff --git a/docs/html/wear/images/blogger.png b/docs/html/wear/images/blogger.png Binary files differnew file mode 100644 index 0000000..805958b --- /dev/null +++ b/docs/html/wear/images/blogger.png diff --git a/docs/html/wear/images/carrot.png b/docs/html/wear/images/carrot.png Binary files differnew file mode 100644 index 0000000..7f2b20a --- /dev/null +++ b/docs/html/wear/images/carrot.png diff --git a/docs/html/wear/images/circle_badge_B.png b/docs/html/wear/images/circle_badge_B.png Binary files differnew file mode 100644 index 0000000..8e0280a --- /dev/null +++ b/docs/html/wear/images/circle_badge_B.png diff --git a/docs/html/wear/images/circle_email.png b/docs/html/wear/images/circle_email.png Binary files differnew file mode 100644 index 0000000..ef835be --- /dev/null +++ b/docs/html/wear/images/circle_email.png diff --git a/docs/html/wear/images/circle_email_action.png b/docs/html/wear/images/circle_email_action.png Binary files differnew file mode 100644 index 0000000..d0abd0f --- /dev/null +++ b/docs/html/wear/images/circle_email_action.png diff --git a/docs/html/wear/images/circle_message2.png b/docs/html/wear/images/circle_message2.png Binary files differnew file mode 100644 index 0000000..63b7839 --- /dev/null +++ b/docs/html/wear/images/circle_message2.png diff --git a/docs/html/wear/images/circle_message2_reply.png b/docs/html/wear/images/circle_message2_reply.png Binary files differnew file mode 100644 index 0000000..1de6d21 --- /dev/null +++ b/docs/html/wear/images/circle_message2_reply.png diff --git a/docs/html/wear/images/circle_voice_A.png b/docs/html/wear/images/circle_voice_A.png Binary files differnew file mode 100644 index 0000000..c4dd1ad --- /dev/null +++ b/docs/html/wear/images/circle_voice_A.png diff --git a/docs/html/wear/images/circle_voice_B.png b/docs/html/wear/images/circle_voice_B.png Binary files differnew file mode 100644 index 0000000..3aa1d67 --- /dev/null +++ b/docs/html/wear/images/circle_voice_B.png diff --git a/docs/html/wear/images/close.png b/docs/html/wear/images/close.png Binary files differnew file mode 100644 index 0000000..bd473d2 --- /dev/null +++ b/docs/html/wear/images/close.png diff --git a/docs/html/wear/images/features/s1.png b/docs/html/wear/images/features/s1.png Binary files differnew file mode 100644 index 0000000..ba96cf8 --- /dev/null +++ b/docs/html/wear/images/features/s1.png diff --git a/docs/html/wear/images/features/s2.png b/docs/html/wear/images/features/s2.png Binary files differnew file mode 100644 index 0000000..af28496 --- /dev/null +++ b/docs/html/wear/images/features/s2.png diff --git a/docs/html/wear/images/features/s3.png b/docs/html/wear/images/features/s3.png Binary files differnew file mode 100644 index 0000000..6ae9868 --- /dev/null +++ b/docs/html/wear/images/features/s3.png diff --git a/docs/html/wear/images/features/s4.png b/docs/html/wear/images/features/s4.png Binary files differnew file mode 100644 index 0000000..125713d --- /dev/null +++ b/docs/html/wear/images/features/s4.png diff --git a/docs/html/wear/images/features/ts1.png b/docs/html/wear/images/features/ts1.png Binary files differnew file mode 100644 index 0000000..5d4b1c1 --- /dev/null +++ b/docs/html/wear/images/features/ts1.png diff --git a/docs/html/wear/images/features/ts2.png b/docs/html/wear/images/features/ts2.png Binary files differnew file mode 100644 index 0000000..dc798c5 --- /dev/null +++ b/docs/html/wear/images/features/ts2.png diff --git a/docs/html/wear/images/features/ts3.png b/docs/html/wear/images/features/ts3.png Binary files differnew file mode 100644 index 0000000..0d68ebc --- /dev/null +++ b/docs/html/wear/images/features/ts3.png diff --git a/docs/html/wear/images/features/ts4.png b/docs/html/wear/images/features/ts4.png Binary files differnew file mode 100644 index 0000000..e727ab5 --- /dev/null +++ b/docs/html/wear/images/features/ts4.png diff --git a/docs/html/wear/images/fitness-24.png b/docs/html/wear/images/fitness-24.png Binary files differnew file mode 100644 index 0000000..3cf2f3c --- /dev/null +++ b/docs/html/wear/images/fitness-24.png diff --git a/docs/html/wear/images/hero.jpg b/docs/html/wear/images/hero.jpg Binary files differnew file mode 100644 index 0000000..40cc03c --- /dev/null +++ b/docs/html/wear/images/hero.jpg diff --git a/docs/html/wear/images/kitchen_still.jpg b/docs/html/wear/images/kitchen_still.jpg Binary files differnew file mode 100644 index 0000000..4afe359 --- /dev/null +++ b/docs/html/wear/images/kitchen_still.jpg diff --git a/docs/html/wear/images/laptop-bridge.png b/docs/html/wear/images/laptop-bridge.png Binary files differnew file mode 100644 index 0000000..b481224 --- /dev/null +++ b/docs/html/wear/images/laptop-bridge.png diff --git a/docs/html/wear/images/more_bottom.png b/docs/html/wear/images/more_bottom.png Binary files differnew file mode 100644 index 0000000..632546a --- /dev/null +++ b/docs/html/wear/images/more_bottom.png diff --git a/docs/html/wear/images/more_mid.png b/docs/html/wear/images/more_mid.png Binary files differnew file mode 100644 index 0000000..99bc999 --- /dev/null +++ b/docs/html/wear/images/more_mid.png diff --git a/docs/html/wear/images/more_top.png b/docs/html/wear/images/more_top.png Binary files differnew file mode 100644 index 0000000..8ead1d3 --- /dev/null +++ b/docs/html/wear/images/more_top.png diff --git a/docs/html/wear/images/notification_phone@2x.png b/docs/html/wear/images/notification_phone@2x.png Binary files differnew file mode 100644 index 0000000..e1e4297 --- /dev/null +++ b/docs/html/wear/images/notification_phone@2x.png diff --git a/docs/html/wear/images/partners/asus.png b/docs/html/wear/images/partners/asus.png Binary files differnew file mode 100644 index 0000000..37764b4 --- /dev/null +++ b/docs/html/wear/images/partners/asus.png diff --git a/docs/html/wear/images/partners/broadcom.png b/docs/html/wear/images/partners/broadcom.png Binary files differnew file mode 100644 index 0000000..b717142 --- /dev/null +++ b/docs/html/wear/images/partners/broadcom.png diff --git a/docs/html/wear/images/partners/fossil.png b/docs/html/wear/images/partners/fossil.png Binary files differnew file mode 100644 index 0000000..cd311b6 --- /dev/null +++ b/docs/html/wear/images/partners/fossil.png diff --git a/docs/html/wear/images/partners/htc.png b/docs/html/wear/images/partners/htc.png Binary files differnew file mode 100644 index 0000000..8236ac2 --- /dev/null +++ b/docs/html/wear/images/partners/htc.png diff --git a/docs/html/wear/images/partners/intel.png b/docs/html/wear/images/partners/intel.png Binary files differnew file mode 100644 index 0000000..79ca5af --- /dev/null +++ b/docs/html/wear/images/partners/intel.png diff --git a/docs/html/wear/images/partners/lg.png b/docs/html/wear/images/partners/lg.png Binary files differnew file mode 100644 index 0000000..15d84e4 --- /dev/null +++ b/docs/html/wear/images/partners/lg.png diff --git a/docs/html/wear/images/partners/mediatek.png b/docs/html/wear/images/partners/mediatek.png Binary files differnew file mode 100644 index 0000000..2bf0f90 --- /dev/null +++ b/docs/html/wear/images/partners/mediatek.png diff --git a/docs/html/wear/images/partners/mips.png b/docs/html/wear/images/partners/mips.png Binary files differnew file mode 100644 index 0000000..04588f2 --- /dev/null +++ b/docs/html/wear/images/partners/mips.png diff --git a/docs/html/wear/images/partners/motorola.png b/docs/html/wear/images/partners/motorola.png Binary files differnew file mode 100644 index 0000000..8d1129f --- /dev/null +++ b/docs/html/wear/images/partners/motorola.png diff --git a/docs/html/wear/images/partners/qualcomm.png b/docs/html/wear/images/partners/qualcomm.png Binary files differnew file mode 100644 index 0000000..cb52a98 --- /dev/null +++ b/docs/html/wear/images/partners/qualcomm.png diff --git a/docs/html/wear/images/partners/samsung.png b/docs/html/wear/images/partners/samsung.png Binary files differnew file mode 100644 index 0000000..b39629e --- /dev/null +++ b/docs/html/wear/images/partners/samsung.png diff --git a/docs/html/wear/images/screens/05_images.png b/docs/html/wear/images/screens/05_images.png Binary files differnew file mode 100644 index 0000000..46ee5b3 --- /dev/null +++ b/docs/html/wear/images/screens/05_images.png diff --git a/docs/html/wear/images/screens/08_pages.png b/docs/html/wear/images/screens/08_pages.png Binary files differnew file mode 100644 index 0000000..62f2a8d --- /dev/null +++ b/docs/html/wear/images/screens/08_pages.png diff --git a/docs/html/wear/images/screens/11_stack_B.png b/docs/html/wear/images/screens/11_stack_B.png Binary files differnew file mode 100644 index 0000000..f28accb --- /dev/null +++ b/docs/html/wear/images/screens/11_stack_B.png diff --git a/docs/html/wear/images/screens/13_voicereply_02.png b/docs/html/wear/images/screens/13_voicereply_02.png Binary files differnew file mode 100644 index 0000000..290c7b5 --- /dev/null +++ b/docs/html/wear/images/screens/13_voicereply_02.png diff --git a/docs/html/wear/images/screens/14_circle_voicereply.png b/docs/html/wear/images/screens/14_circle_voicereply.png Binary files differnew file mode 100644 index 0000000..b2845d5 --- /dev/null +++ b/docs/html/wear/images/screens/14_circle_voicereply.png diff --git a/docs/html/wear/images/screens/bezel.png b/docs/html/wear/images/screens/bezel.png Binary files differnew file mode 100644 index 0000000..077a7e6 --- /dev/null +++ b/docs/html/wear/images/screens/bezel.png diff --git a/docs/html/wear/images/screens/circle_message2.png b/docs/html/wear/images/screens/circle_message2.png Binary files differnew file mode 100644 index 0000000..da18b8d --- /dev/null +++ b/docs/html/wear/images/screens/circle_message2.png diff --git a/docs/html/wear/images/screens/circle_voice_B.png b/docs/html/wear/images/screens/circle_voice_B.png Binary files differnew file mode 100644 index 0000000..d367c27 --- /dev/null +++ b/docs/html/wear/images/screens/circle_voice_B.png diff --git a/docs/html/wear/images/screens/cuecard.gif b/docs/html/wear/images/screens/cuecard.gif Binary files differnew file mode 100644 index 0000000..4b3d2f3 --- /dev/null +++ b/docs/html/wear/images/screens/cuecard.gif diff --git a/docs/html/wear/images/screens/fitness-24.png b/docs/html/wear/images/screens/fitness-24.png Binary files differnew file mode 100644 index 0000000..18ae969 --- /dev/null +++ b/docs/html/wear/images/screens/fitness-24.png diff --git a/docs/html/wear/images/screens/pages.ogv b/docs/html/wear/images/screens/pages.ogv Binary files differnew file mode 100644 index 0000000..56a15e1 --- /dev/null +++ b/docs/html/wear/images/screens/pages.ogv diff --git a/docs/html/wear/images/screens/pages_animated.gif b/docs/html/wear/images/screens/pages_animated.gif Binary files differnew file mode 100644 index 0000000..d236b0a --- /dev/null +++ b/docs/html/wear/images/screens/pages_animated.gif diff --git a/docs/html/wear/images/screens/reservation_animated.gif b/docs/html/wear/images/screens/reservation_animated.gif Binary files differnew file mode 100644 index 0000000..af98a3c --- /dev/null +++ b/docs/html/wear/images/screens/reservation_animated.gif diff --git a/docs/html/wear/images/screens/stream.gif b/docs/html/wear/images/screens/stream.gif Binary files differnew file mode 100644 index 0000000..656a277 --- /dev/null +++ b/docs/html/wear/images/screens/stream.gif diff --git a/docs/html/wear/images/screens/voice_02.png b/docs/html/wear/images/screens/voice_02.png Binary files differnew file mode 100644 index 0000000..c18a0cf --- /dev/null +++ b/docs/html/wear/images/screens/voice_02.png diff --git a/docs/html/wear/images/screens/yoga.gif b/docs/html/wear/images/screens/yoga.gif Binary files differnew file mode 100644 index 0000000..a3c26be --- /dev/null +++ b/docs/html/wear/images/screens/yoga.gif diff --git a/docs/html/wear/images/voice-23.png b/docs/html/wear/images/voice-23.png Binary files differnew file mode 100644 index 0000000..06cba5b --- /dev/null +++ b/docs/html/wear/images/voice-23.png diff --git a/docs/html/wear/index.html b/docs/html/wear/index.html new file mode 100644 index 0000000..5ea793b --- /dev/null +++ b/docs/html/wear/index.html @@ -0,0 +1,702 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Android Wear | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//www.google.com/jsapi" type="text/javascript"></script> +<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script> +<link rel="stylesheet" type="text/css" href="/wear/css/wear.css"> +<script type="text/javascript"> + var toRoot = "/"; + var metaTags = []; + var devsite = false; +</script> +<script src="/assets/js/docs.js" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div id="body-content"> + + + + +<div class="fullpage" > + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <div id="video-container"> + <div id="video-frame"> + <div class="video-close"> + <span id="icon-video-close"> </span> + </div> + <script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> + <div id="ytapiplayer"> + <a href="http://www.youtube.com/watch?v=i2uvYI6blEE"><img width=600 + src="https://i1.ytimg.com/vi/i2uvYI6blEE/maxresdefault.jpg"></a><!--You need Flash player 8+ and JavaScript enabled to view this video. --> + </div> + </div> +</div> + + +<div class="wear-body-content"> + <div class="wear-hero-container"> + <div class="wear-section wear-hero"> + <div class="wear-hero-scrim"></div> + <div class="wear-hero-wrap"> + <div class="vertical-center-outer"> + <div class="vertical-center-inner"> + + <div class="col-10"> + <div class="wear-section-header"> + <div class="wear-h1 hero">Android Wear</div> + <div class="wear-subhead hero">Information that moves with you</div> + </div> + <div class="wear-hero-description"> + <p>Small, powerful devices, worn on the body. + Useful information when you need it most. + Intelligent answers to spoken questions. + Tools to help reach fitness goals. + Your key to a multiscreen world.</p> + </div> + + <div class="wear-body"> + <a href="/wear/preview/start.html" class="wear-button wear-primary" style="margin-top: 40px;"> + Get the Developer Preview + </a> + <a id="watchVideo" href="https://youtube.googleapis.com/v/i2uvYI6blEE"> + <div class="wear-video-link">Watch the video</div> + </a> +<script> +$("#watchVideo").on("click", function(e) { + $("#video-container").fadeIn(400, function(){$("#video-frame").show()}); + + var params = { allowScriptAccess: "always"}; + var atts = { id: "ytapiplayer" }; + swfobject.embedSWF("//www.youtube.com/v/i2uvYI6blEE?enablejsapi=1&playerapiid=ytplayer&version=3&HD=1;rel=0;showinfo=0;modestbranding;origin=developer.android.com;autohide=1;autoplay=1", + "ytapiplayer", "940", "526.4", "8", null, null, params, atts); + + e.preventDefault(); +}); +$("#icon-video-close").on("click", function() { + ytplayer = document.getElementById("ytapiplayer"); + ytplayer.stopVideo(); + $(ytplayer).hide(); + $("#video-container").fadeOut(400); +}); +</script> + </div> + </div> + + </div> + </div> + </div> <!-- end .wrap --> + <div class="wear-scroll-down-affordance"> + <a class="wear-down-arrow" href="#extending-android-to-wearables"> + <img src="/wear/images/carrot.png" alt="Scroll down to read more"> + </a> + </div> + </div> <!-- end .wear-section .wear-hero --> + </div> <!-- end .wear-hero-container --> + + <div class="wear-rest-of-page"> + <div class="wear-section" id="extending-android-to-wearables"> + <div class="wrap"> + <div class="wear-section-header"> + <div class="wear-h1">Extending Android to Wearables</div> + <div class="wear-subhead"> + Android Wear extends the Android platform to a new generation of wearable devices. <br> + The user experience is designed specifically for wearables. + </div> + </div> + + <div class="wear-body"> + <div class="wear-breakout cols"> + <div class="col-3-wide"> + + <div class="wear-inset-video-container"> + <img class="wear-bezel-only" src="/wear/images/screens/bezel.png" alt=""> + <img class="gif" src="/wear/images/screens/reservation_animated.gif"> + </div> + + <p class="wear-small"> + Say “Ok Google” to ask questions and get stuff done. + </p> + </div> + <div class="col-3-wide"> + <img src="/wear/images/screens/circle_message2.png" alt="Image of a Hangouts message"> + <p class="wear-small"> + Get glanceable, actionable information at just the right time throughout the day. + </p> + </div> + <div class="col-3-wide"> + <img src="/wear/images/screens/fitness-24.png" alt="Image showing "> + <p class="wear-small"> + A wide range of sensors is available to your applications, from accelerometers to heart rate monitors. + </p> + </div> + </div> + + <p> + The Android Wear Developer Preview lets you create wearable experiences for your existing Android apps and see how they will appear on square and round Android wearables. + </p> + + <p> + Later this year, we’ll be launching the Android Wear SDK, enabling even more customized experiences. + </p> + </div> + </div> <!-- end .wrap --> + </div> <!-- end .wear-section --> + + <div class="wear-section wear-gray-background"> + <div class="wrap"> + <div class="wear-section-header"> + <div class="wear-h1">Developer Preview</div> + <div class="wear-subhead"> + Your app’s notifications will already appear on Android wearables. <br> + With the new Android Wear APIs you can customize and extend those notifications. + </div> + </div> + + + <div class="wear-body"> + <div class="wear-breakout cols"> + <div class="col-3-wide"> + <img src="images/screens/14_circle_voicereply.png" alt=""> + <p>Receive Voice Replies</p> + <p class="wear-small"> + Add actions to your notifications to allow users to reply by voice or touch. The system delivers the text to your app on the phone. + </p> + <p class="wear-small"> + <a href="/wear/notifications/remote-input.html">Learn about input actions</a> + </p> + </div> + <div class="col-3-wide"> + + + <div class="wear-inset-video-container"> + <img class="wear-bezel-only" src="/wear/images/screens/bezel.png" alt=""> + <img class="gif" src="/wear/images/screens/pages_animated.gif"> + </div> + + <p>Add Notification Pages</p> + <p class="wear-small"> + Add additional pages to your notification that are visible on the wearable device to provide detailed information on the wrist. + </p> + <p class="wear-small"> + <a href="/wear/notifications/pages.html">Learn about pages</a> + </p> + </div> + <div class="col-3-wide"> + <img src="images/screens/11_stack_B.png" alt=""> + <p>Stack Multiple Notifications</p> + <p class="wear-small"> + Your app should consolidate similar notifications. On a wearable, you can stack them together so the details for each are immediately available. + </p> + <p class="wear-small"> + <a href="/wear/notifications/stacks.html">Learn about stacks</a> + </p> + </div> + </div> + + <p> + You can also trigger your notifications contextually using existing Android APIs. For example, use <a href="/training/location/geofencing.html">geofences</a> to provide glanceable information to your users when they are at home, or use the <a href="/training/location/activity-recognition.html">activity detection APIs</a> to send messages to your users’ wrists while they are bicycling. + </p> + + <p>See the <a href="/wear/design/index.html">Android Wear Developer Preview Design Principles</a> for more suggestions on creating great wearable experiences.</p> + + </div> + </div> <!-- end .wrap --> + </div> <!-- end .wear-section --> + + <div class="wear-section" style="background-color:#f5f5f5"> + <div class="wrap"> + <div class="wear-section-header"> + <div class="wear-pre-h1">Coming soon</div> + <div class="wear-h1">The Android Wear SDK</div> + <div class="wear-subhead"> + The Developer Preview is just the beginning for Android Wear. + </div> + </div> + + <div class="wear-body"> + <p> + In the coming months we’ll be launching new APIs and features for Android wearables to create even more unique experiences for the wrist: + </p> + + <div class="wear-breakout cols"> + <div class="col-4"> + <img src="/wear/images/features/ts1.png" alt=""> + <p>Build Custom UI</p> + <p class="wear-small"> + Create custom card layouts and run activities directly on wearables. + </p> + </div> + <div class="col-4"> + <img src="/wear/images/features/ts2.png" alt=""> + <p>Send Data</p> + <p class="wear-small"> + Send data and actions between a phone and a wearable with a data replication APIs and RPCs. + </p> + </div> + <div class="col-4"> + <img src="/wear/images/features/ts3.png" alt=""> + <p>Control Sensors</p> + <p class="wear-small"> + Gather sensor data and display it in real-time on Android wearables. + </p> + </div> + <div class="col-4"> + <img src="/wear/images/features/ts4.png" alt=""> + <p>Voice Actions</p> + <p class="wear-small"> + Register your app to handle voice actions, like "Ok Google, take a note."" + </p> + </div> + </div> + + </div> + </div> <!-- end .wrap --> + </div> <!-- end .wear-section --> + + <div class="wear-section wear-white-background"> + <div class="wrap"> + <div class="wear-section-header"> + <div class="wear-h2">Building an Ecosystem</div> + <div class="wear-body wear-align-center"> + <p class="wear-small"> + We’re working with several partners to bring you watches powered by Android Wear later this year! + </p> + </div> + </div> + + <div class="wear-partners cols"> + <div class="col-4"> + <img src="/wear/images/partners/asus.png" alt="Asus"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/broadcom.png" alt="Broadcom"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/fossil.png" alt="Fossil"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/htc.png" alt="HTC"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/intel.png" alt="Intel"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/lg.png" alt="LG"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/mediatek.png" alt="Mediatek"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/mips.png" alt="MIPS"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/motorola.png" alt="Motorola"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/qualcomm.png" alt="Qualcomm"> + </div> + <div class="col-4"> + <img src="/wear/images/partners/samsung.png" alt="Samsung"> + </div> + </div> + </div> <!-- end .wrap --> + </div> <!-- end .wear-section --> + + <div class="wear-section wear-red-background"> + <div class="wrap"> + <div class="wear-section-header"> + <div class="wear-h1 wear-align-left">Start working with Android Wear</div> + <div class="wear-subhead wear-subhead-red"> + <p> + Your app’s notifications will already appear on Android wearables. <br> + With the new Android Wear APIs, you can customize and extend those notifications. + </p> + <p> + We’re excited about wearables and the experiences developers can create with them. <br> + We can’t wait to see what you do next.</p> + </div> + </div> + <div class="wear-body"> + <a href="/wear/preview/start.html" class="wear-button wear-secondary" style="margin-top: 20px;"> + Get the Developer Preview + </a> + </div> + </div> + </div> + + <div class="wear-section"> + <div class="wrap"> + <div class="cols"> + <div class="wear-body"> + <div class="col-3-wide"> + <a href="/TODO"> + <img class="wear-social-image" src="//www.google.com/images/icons/product/youtube-128.png" alt=""> + </a> + <div class="wear-social-copy"> + <p>DevBytes</p> + <p class="wear-small"> + Learn how to optimize your app notifications for wearable devices in this <a href="/TODO">DevBytes video</a> using the Android Wear Developer Preview. + </p> + </div> + </div> + <div class="col-3-wide"> + <a href="http://android-developers.blogspot.com/"> + <img class="wear-social-image" src="/wear/images/blogger.png" alt=""> + </a> + <div class="wear-social-copy"> + <p>Blog Post</p> + <p class="wear-small"> + Read more about the Android Wear Developer Preview announcement + at the <a href="http://android-developers.blogspot.com/">Android Developers Blog</a>. + </p> + </div> + </div> + <div class="col-3-wide"> + <a href="http://g.co/androidweardev"> + <img class="wear-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt="+Android Wear Developers"> + </a> + <div class="wear-social-copy"> + <p>G+ Community</p> + <p class="wear-small"> + Follow us on Google+ to stay up-to-date on Android Wear development and join the discussion! + </p> + <p class="wear-small"> + <a href="http://g.co/androidweardev">+Android Wear Developers</a> + </p> + </div> + </div> + </div> + </div> + </div> <!-- end .wrap --> + </div> <!-- end .wear-section --> + </div> <!-- end .wear-rest-of-page --> + </div> <!-- end wear-body-content --> + + <script> + $("a.wear-down-arrow").on("click", function(e) { + $("body").animate({ + scrollTop: $(".wear-hero").height() + 76 + }, 1000, "easeOutQuint"); + e.preventDefault(); + }); + </script> + </div> + + <div class="content-footer wrap" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-16" style="padding-top:4px"> + <style>#___plusone_0 {float:right !important;}</style> + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" style="width:940px"> + + + <div id="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>. + </div> + + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/license.html b/docs/html/wear/license.html new file mode 100644 index 0000000..c7569bc --- /dev/null +++ b/docs/html/wear/license.html @@ -0,0 +1,581 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Developer Preview License Agreement | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Developer Preview License Agreement</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <div class="sdk-terms" style="height:auto;border:0;padding:0;width:700px"> +This is the Android Wear Developer Preview License Agreement. + +1. Introduction + +1.1 The Android Wear Developer Preview Kit (referred to in this License Agreement as the “Developer Preview” and specifically including the Android system files, packaged APIs, Developer Preview library files, and the Developer Preview companion app, if and when they are made available) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the Developer Preview. + +1.2 "Android Wear" means the Android Wear devices and the Android Wear software stack for use on Android Wear devices. + +1.3 "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.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. + +2. Accepting this License Agreement + +2.1 In order to use the Developer Preview, you must first agree to this License Agreement. You may not use the Developer Preview if you do not accept this License Agreement. + +2.2 By clicking to accept, you hereby agree to the terms of this License Agreement. + +2.3 You may not use the Developer Preview and may not accept the License Agreement if you are a person barred from receiving the Developer 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 Developer Preview. + +2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Developer Preview on behalf of your employer or other entity. + +3. Developer Preview License from Google + +3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, internal-use, non-assignable and non-exclusive license to use the Developer Preview solely to develop applications to run on the Android Wear platform for Android Wear devices. + +3.2 You agree that Google or third parties own all legal right, title and interest in and to the Developer Preview, including any Intellectual Property Rights that subsist in the Developer 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 Developer Preview for any purpose not expressly permitted by this 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 Developer Preview or any part of the Developer Preview; or (b) load any part of the Developer Preview onto a mobile handset or wearable computing device or any other hardware device except an Android Wear device, combine any part of the Developer Preview with other software, or distribute any software or device incorporating a part of the Developer Preview. + +3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android Wear, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Developer Preview. + +3.5 Use, reproduction and distribution of components of the Developer Preview licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement. + +3.6 You agree that the form and nature of the Developer Preview that Google provides may change without prior notice to you and that future versions of the Developer Preview may be incompatible with applications developed on previous versions of the Developer Preview. You agree that Google may stop (permanently or temporarily) providing the Developer Preview (or any features within the Developer Preview) to you or to users generally at Google's sole discretion, without prior notice to you. + +3.7 Nothing in this 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 Developer Preview. + +3.9 Your use of any Android system files, packaged APIs, or other components of the Developer Preview which are part of the Android Software Development Kit is subject to the terms of the Android Software Development Kit License Agreement located at http://developer.android.com/sdk/terms.html. These terms are hereby incorporated by reference into this License Agreement. + +4. Use of the Developer Preview by You + +4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the Developer Preview, including any intellectual property rights that subsist in those applications. + +4.2 You agree to use the Developer Preview and write applications only for purposes that are permitted by (a) this License Agreement, (b) the Google Play Developer Program Policies located at https://play.google.com/about/developer-content-policy.html, and hereby incorporated into this License Agreement by reference), and (c) 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). You agree to use reasonable efforts to comply with the Android Wear Platform Design Guide available on the Android Wear developer website + +4.3 You agree that if you use the Developer Preview to develop applications for general public users, you will protect the privacy and legal rights of those users. If the 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 the user provides your application 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, the user has given you permission to do so. + +4.4 You agree that you will not engage in any activity with the Developer 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 any third party including, but not limited to, Google. + +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 Wear and/or applications for Android Wear, 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 this 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 Unless otherwise specified in writing by Google, Google does not intend use of Android Wear to create obligations under the Health Insurance Portability and Accountability Act, as amended, (“HIPAA”), and makes no representations that Android Wear satisfies HIPAA requirements. If you are (or become) a Covered Entity or Business Associate under HIPAA, you agree not to use Android Wear for any purpose or in any manner involving Protected Health Information unless you have received prior written consent to such use from Google. + +4.8 The Developer Preview is in development, and your testing and feedback are an important part of the development process. By using the Developer Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Developer Preview, Android Wear devices, Android Wear system software, or Android Wear services having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Developer Preview as this Developer Preview will no longer be supported after the official 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 Developer 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 Developer Preview are being used and how they are being used. Before any of this information is collected, the Developer 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 Developer Preview and is maintained in accordance with Google's Privacy Policy lcoated at http://www.google.com/policies/privacy/. + +7. Third Party Applications + +7.1 If you use the Developer 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. In that case, this License Agreement does not affect your legal relationship with these third parties. + +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 this License Agreement + +9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below. + +9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the Developer Preview and any relevant developer credentials. + +9.3 Google may at any time, terminate this License Agreement with you if: +(A) you have breached any provision of this License Agreement; or +(B) Google is required to do so by law; or +(C) the partner with whom Google offered certain parts of Developer Preview (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the Developer Preview to you; or +(D) Google decides to no longer provide the Developer Preview or certain parts of the Developer Preview to users in the country in which you are resident or from which you use the service, or the provision of the Developer Preview or certain Developer Preview services to you by Google is, in Google's sole discretion, no longer commercially viable. + +9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely. + +10. DISCLAIMER OF WARRANTIES + +10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE DEVELOPER PREVIEW IS AT YOUR SOLE RISK AND THAT THE DEVELOPER PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. + +10.2 YOUR USE OF THE DEVELOPER PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE DEVELOPER 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. + +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 Developer Preview, (b) any application you develop on the Developer Preview that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this 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 Developer Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Developer Preview is made available. + +14. General Legal Terms + +14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Developer 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 Developer Preview. + +14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this 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 this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this 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 this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this 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 this License Agreement. + +14.5 EXPORT RESTRICTIONS. THE DEVELOPER 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 DEVELOPER PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. + +14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party. + +14.7 This License Agreement, and your relationship with Google under this 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 this 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> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/notifications/creating.html b/docs/html/wear/notifications/creating.html new file mode 100644 index 0000000..e83b57a --- /dev/null +++ b/docs/html/wear/notifications/creating.html @@ -0,0 +1,722 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Creating Notifications for Android Wear | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Creating Notifications for Android Wear</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <p>When an Android device such as a phone or tablet is connected to an Android wearable, +all notifications are shared between the devices by default. On the Android wearable, each +notification appears as a new card in the <a href="/wear/design/user-interface.html#Stream" +>context stream</a>.</p> + +<img src="/wear/images/notification_phone@2x.png" width="700" height="265" /> + + +<p>So without any effort, your app notifications are available to users on Android Wear. +However, you can enhance the user experience in several ways. For instance, +if users may respond to a notification by entering text, such as to reply to +a message, you can add the ability for users to reply by voice directly from the +wearable.</p> + +<p>To help you provide the best user experience +for your notifications on Android Wear, this guide shows you how to +build notifications using standard templates in +the <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html">NotificationCompat.Builder</a></code> APIs, plus how to begin +extending your notification's capabilities for the wearable user experience.</p> + +<p class="note"><strong>Note:</strong> +Notifications using <code><a href="/reference/android/widget/RemoteViews.html">RemoteViews</a></code> are stripped of custom +layouts and the system uses only the text and icons in the +<code><a href="/reference/android/app/Notification.html">Notification</a></code> object to +display the notification in a card. However, custom card layouts will be supported by +the official Android Wear SDK that is coming later.</p> +</div> + + + + +<h2 id="Import">Import the Necessary Classes</h2> + +<p>To begin development, you must first complete the instructions in the <a +href="/wear/preview/start">Get Started with the Developer Preview</a> document. +As mentioned in that document, your app must include +both the <a href="http://developer.android.com/tools/support-library/features.html#v4">v4 support +library</a> and the Developer Preview support library. So to get started, +you should include the following imports in your project code:</p> + +<pre> +import android.preview.support.wearable.notifications.*; +import android.preview.support.v4.app.NotificationManagerCompat; +import android.support.v4.app.NotificationCompat; +</pre> + +<p class="caution"><strong>Caution:</strong> +The APIs in the current Android Wear Developer Preview are intended for <b>development and testing purposes only</b>, not for production apps. Google may change this Developer Preview significantly prior to the official release of the Android Wear SDK. You may not publicly distribute or ship any application using this Developer Preview, as this Developer Preview will no longer be supported after the official SDK is released (which will cause applications based only on the Developer Preview to break).</p> + + + +<h2 id="NotificationBuilder">Create Notifications with the Notification Builder</h2> + +<p>The <a href="http://developer.android.com/tools/support-library/features.html#v4">v4 +support library</a> allows you to create notifications using the latest notification features +such as action buttons and large icons, while remaining compatible with Android 1.6 (API level +4) and higher.</p> + + +<p>For example, here's some code that creates and issues a notification using the +<code><a href="/reference/android/support/v4/app/NotificationCompat.html">NotificationCompat</a></code> APIs combined with the new +<a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html"> +<code>NotificationManagerCompat</code></a> API:</p> + + +<pre> +int notificationId = 001; +// Build intent for notification content +Intent viewIntent = new Intent(this, ViewEventActivity.class); +viewIntent.putExtra(EXTRA_EVENT_ID, eventId); +PendingIntent viewPendingIntent = + PendingIntent.getActivity(this, 0, viewIntent, 0); + +NotificationCompat.Builder notificationBuilder = + new NotificationCompat.Builder(this) + .setSmallIcon(R.drawable.ic_event) + .setContentTitle(eventTitle) + .setContentText(eventLocation) + .setContentIntent(viewPendingIntent); + +// Get an instance of the NotificationManager service +NotificationManagerCompat notificationManager = + NotificationManagerCompat.from(this); + +// Build the notification and issues it with notification manager. +notificationManager.notify(notificationId, notificationBuilder.build()); +</pre> + +<p>When this notification appears on a handheld device, the user can invoke the +<code><a href="/reference/android/app/PendingIntent.html">PendingIntent</a></code> +specified by the <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#setContentIntent(android.app.PendingIntent)">setContentIntent()</a></code> method by touching the notification. When this +notification appears on an Android wearable, the user can swipe the notification to the left to +reveal the <strong>Open</strong> action, which invokes the intent on the handheld device.</p> + + + + + + +<img src="/wear/images/circle_email_action.png" height="200" style="float:right;clear:right;margin:0 0 20px 60px" /> + +<h2 id="ActionButtons">Add Action Buttons</h2> + +<p>In addition to the primary content action defined by +<code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#setContentIntent(android.app.PendingIntent)">setContentIntent()</a></code>, you can add other actions by passing a <code><a href="/reference/android/app/PendingIntent.html">PendingIntent</a></code> to +the <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#addAction(int, java.lang.CharSequence, android.app.PendingIntent)">addAction()</a></code> method.</p> + +<p>For example, the following code shows the same type of notification from above, but adds an +action to view the event location on a map.</p> + +<pre style="clear:right"> +// Build an intent for an action to view a map +Intent mapIntent = new Intent(Intent.ACTION_VIEW); +Uri geoUri = Uri.parse("geo:0,0?q=" + Uri.encode(location)); +mapIntent.setData(geoUri); +PendingIntent mapPendingIntent = + PendingIntent.getActivity(this, 0, mapIntent, 0); + +NotificationCompat.Builder notificationBuilder = + new NotificationCompat.Builder(this) + .setSmallIcon(R.drawable.ic_event) + .setContentTitle(eventTitle) + .setContentText(eventLocation) + .setContentIntent(viewPendingIntent) + <b>.addAction(R.drawable.ic_map, + getString(R.string.map), mapPendingIntent);</b> +</pre> + +<p>On a handheld device, the action appears as an +additional button attached to the notification. On an Android wearable, the action appears as +a large button when the user swipes the notification to the left. When the user taps the action, +the associated <code><a href="/reference/android/content/Intent.html">Intent</a></code> is invoked on the handheld device.</p> + +<p class="note"><strong>Tip:</strong> If your notifications includes a "Reply" action + (such as for a messaging app), you can enhance the behavior by enabling + voice input replies directly from the Android wearable. For more information, read + <a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification</a>. +</p> + +<p>For details about designing action buttons (including the icon specifications), see the +<a href="/wear/design/index.html#NotifictionActions">Design Principles of Android +Wear</a>.</p> + + +<h2 id="BigView">Add a Big View</h2> + +<img src="/wear/images/06_images.png" height="200" style="float:right;margin:0 0 20px 40px" /> + +<p>You can insert extended text content +to your notification by adding one of the "big view" styles to your notification. On a +handheld device, users can see the big view content by expanding the notification, +while on Android Wear, the big view content is visible by default.</p> + +<p>To add the extended content to your notification, call <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#setStyle(android.support.v4.app.NotificationCompat.Style)">setStyle()</a></code> on the <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html">NotificationCompat.Builder</a></code> object, passing it an instance of either +<code><a href="/reference/android/support/v4/app/NotificationCompat.BigTextStyle.html">BigTextStyle</a></code> or +<code><a href="/reference/android/support/v4/app/NotificationCompat.InboxStyle.html">InboxStyle</a></code>.</p> + +<p>For example, the following code adds an instance of +<code><a href="/reference/android/support/v4/app/NotificationCompat.BigTextStyle.html">NotificationCompat.BigTextStyle</a></code> to the event notification, +in order to include the complete event description (which includes more text than can fit +into the space provided for <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#setContentText(java.lang.CharSequence)">setContentText()</a></code>).</p> + + +<pre style="clear:right"> +// Specify the 'big view' content to display the long +// event description that may not fit the normal content text. +BigTextStyle bigStyle = new NotificationCompat.BigTextStyle(); +bigStyle.bigText(eventDescription); + +NotificationCompat.Builder notificationBuilder = + new NotificationCompat.Builder(this) + .setSmallIcon(R.drawable.ic_event) + .setLargeIcon(BitmapFractory.decodeResource( + getResources(), R.drawable.notif_background)) + .setContentTitle(eventTitle) + .setContentText(eventLocation) + .setContentIntent(viewPendingIntent) + .addAction(R.drawable.ic_map, + getString(R.string.map), mapPendingIntent) + <b>.setStyle(bigStyle);</b> +</pre> + +<p>Notice that you can add a large background image to any notification using the +<code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#setLargeIcon(android.graphics.Bitmap)">setLargeIcon()</a></code> +method. For more information about designing notifications with large images, see the +<a href="/wear/design/index.html#Images">Design Principles of Android +Wear</a>.</p> + + + +<h2 id="NewFeatures">Add New Features for Wearables</h2> + +<p>The Android Wear preview support library provides new APIs that + allow you to enhance the user experience for notifications on a wearable device. For example, + you can add additional pages of content that users can view by swiping to the left, or add the ability +for users to deliver your app a text response using voice input.</p> + +<p>To use these new APIs, pass your instance of +<code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html">NotificationCompat.Builder</a></code> to the + <a href="/reference/android/preview/support/notifications/WearableNotifications.html"> <code>WearableNotifications.Builder()</code></a> constructor. You can then add new +features to your notification using the + <a href="/wear/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html" + ><code>WearableNotifications.Builder</code></a> methods. For example:</p> + +<pre> +// Create a NotificationCompat.Builder for standard notification features +NotificationCompat.Builder notificationBuilder = + new NotificationCompat.Builder(mContext) + .setContentTitle("New mail from " + sender.toString()) + .setContentText(subject) + .setSmallIcon(R.drawable.new_mail); + +// Create a WearablesNotification.Builder to add special functionality for wearables +Notification notification = + new WearableNotifications.Builder(notificationBuilder) + .setHintHideIcon(true) + .build(); +</pre> + +<p>The <a href="/reference/android/preview/support/notifications/WearableNotifications.Builder.html#setBigActionIcon(int)"> + <code>setHintHideIcon()</code></a> method removes your app icon from the notification card. + This method is just one example of new notification features available from the + <a href="/wear/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html" + ><code>WearableNotifications.Builder</code></a> class.</p> + +<p>When you want to deliver your notifications, be certain to always use the + <a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html"> + <code>NotificationManagerCompat</code></a> API:</p> + +<pre> +// Get an instance of the NotificationManager service +NotificationManagerCompat notificationManager = + NotificationManagerCompat.from(this); + +// Build the notification and issues it with notification manager. +notificationManager.notify(notificationId, notification); +</pre> + +<p>If you instead use the framework's <code><a href="/reference/android/app/NotificationManager.html">NotificationManager</a></code>, some +features from <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html"><code>WearableNotifications.Builder</code></a> +will not work.</p> + +<p>To continue enhancing your notifications for wearables using + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder" + ><code>WearableNotifications.Builder</code></a> and other APIs in the + preview support library, see the following developer guides:</p> + + <dl> + <dt><a href="/wear/notifications/remote-input.html">Receiving Voice Input +from a Notification</a></dt> + <dd>Add an action that receives voice input from the user and delivers the +transcribed message to your app.</dd> + <dt><a href="/wear/notifications/pages.html">Adding Pages to a Notification</a></dt> + <dd>Add additional pages of information that are visible when the user +swipes to the left.</dd> + <dt><a href="/wear/notifications/stacks.html">Stacking Notifications</a></dt> + <dd>Place all similar notifications from your app in a stack, allowing each to be +viewed individually without adding multiple cards to the card stream.</dd> + </dl> + + +<div class="next-docs"> + +<div class="col-12"> + <h2 class="norule">You might also want to read:</h2> + <dl> + <dt><a href="/training/notify-user/index.html">Notifying the User</a></dt> + <dd>Learn more about how to create notifications.</dd> + <dt><a href="/guide/components/intents-filters.html">Intents and Intent Filters</a></dt> + <dd>Learn everything you need to know about the <code><a href="/reference/android/content/Intent.html">Intent</a></code> +APIs, used by notificaton actions.</dd> + </dl> +</div> +</div> + + +</body> +</html> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/notifications/pages.html b/docs/html/wear/notifications/pages.html new file mode 100644 index 0000000..abff8fa --- /dev/null +++ b/docs/html/wear/notifications/pages.html @@ -0,0 +1,500 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Adding Pages to a Notification | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Adding Pages to a Notification</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <img src="/wear/images/09_pages.png" height="200" style="float:right;margin:0 0 20px 40px" /> +<img src="/wear/images/08_pages.png" height="200" style="float:right;margin:0 0 20px 40px" /> + +<p>When you'd like to provide more information without requiring users +to open your app on their phones, you can +add one or more pages to the notification on Android Wear. The additional pages +appear immediately to the right of the main notification card. +For information about when to use and how to design +multiple pages, see the +<a href="/wear/design/index.html#NotificationPages">Design Principles of Android +Wear</a>.</p> + + +<p>When creating a notification with multiple pages, start by creating the main notification +(the first page) the way you'd like the notification to appear on a phone +or tablet. Then, add pages one at a time with the +<a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#addPage(android.app.Notification)"> +<code>addPage()</code></a> method, or add multiple pages in a <code><a href="/reference/java/util/Collection.html">Collection</a></code> with the +<a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#addPages(java.util.Collection<android.app.Notification>)"> +<code>addPages()</code></a> method.</p> + + +<p>For example, here's some code that adds a second page to a notification:</p> + +<pre> +// Create builder for the main notification +NotificationCompat.Builder notificationBuilder = + new NotificationCompat.Builder(this) + .setSmallIcon(R.drawable.new_message) + .setContentTitle("Page 1") + .setContentText("Short message") + .setContentIntent(viewPendingIntent); + +// Create a big text style for the second page +BigTextStyle secondPageStyle = new NotificationCompat.BigTextStyle(); +secondPageStyle.setBigContentTitle("Page 2") + .bigText("A lot of text..."); + +// Create second page notification +Notification secondPageNotification = + new NotificationCompat.Builder(this) + .setStyle(secondPageStyle) + .build(); + +// Create main notification and add the second page +Notification twoPageNotification = + new WearableNotifications.Builder(notificationBuilder) + .addPage(secondPageNotification) + .build(); +</pre> + + + + +</body> +</html> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/notifications/remote-input.html b/docs/html/wear/notifications/remote-input.html new file mode 100644 index 0000000..6500233 --- /dev/null +++ b/docs/html/wear/notifications/remote-input.html @@ -0,0 +1,648 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Receiving Voice Input from a Notification | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Receiving Voice Input from a Notification</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <img src="/wear/images/13_voicereply.png" height="200" width="169" style="float:right;margin:0 0 20px 60px" /> + +<img src="/wear/images/03_actions.png" height="200" width="169" style="float:right;margin:0 0 20px 40px" /> + +<p>If your notification includes an action to respond with text, + such as to reply to an email, it should normally launch an activity + on the handheld device. However, when your notification appears on an Android Wear device, you can + allow users to dictate a reply with voice input. You can also provide pre-defined text + replies for the user to select.</p> + +<p>When the user replies with voice or selects one of the available +responses, the system delivers your app on the handheld the +message as a string extra in the <code><a href="/reference/android/content/Intent.html">Intent</a></code> you specified +to be used for the action.</p> + + +<h2 id="RemoteInput">Define the Remote Input</h2> + +<p>To create an action that supports voice input, first create an instance of + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html"> +<code>RemoteInput</code></a> using the + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html"><code>RemoteInput.Builder</code></a> APIs. + The + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html"><code>RemoteInput.Builder</code></a> constructor takes a string that the system + will use as a key for the <code><a href="/reference/android/content/Intent.html">Intent</a></code> extra that caries the reply message + to your app on the handheld.</p> + +<p>For example, here's a new + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html"> +<code>RemoteInput</code></a> object that provides a custom + label for the voice input prompt:</p> + +<pre class="prettyprint"> +// Key for the string that's delivered in the action's intent +private static final String EXTRA_VOICE_REPLY = "extra_voice_reply"; + +String replyLabel = getResources().getString(R.string.reply_label); + +RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY) + .setLabel(replyLabel) + .build(); +</pre> + + +<h3>Add Pre-defined Text Responses</h3> + +<img src="/wear/images/12_voicereply.png" height="200" style="float:right;margin:0 0 20px 40px" /> + +<p>In addition to allowing voice input, you can + provide up to five text responses the user can select for quick replies. Call + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html#setChoices(java.lang.String[])"><code>setChoices()</code></a> and pass it a string array.</p> + +<p>For example, you may define some responses in a resource array:</p> + +<p class="code-caption">res/values/strings.xml</code> +<pre class="prettyprint"> +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string-array name="reply_choices"> + <item>Yes</item> + <item>No</item> + <item>Maybe</item> + </string-array> +</resources> +</pre> + +<p>Then, inflate the string array and add it to the + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html"><code>RemoteInput</code></a>:</p> + +<pre> +String replyLabel = getResources().getString(R.string.reply_label); +String[] replyChoices = getResources().getStringArray(R.array.reply_choices); + +RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY) + .setLabel(replyLabel) + .setChoices(replyChoices) + .build(); +</pre> + + + + +<h2 id="PrimaryAction">Receive Voice Input for the Primary Action</h2> + +<p>If "Reply" is your notification's primary action (defined by the <code><a href="/reference/android/support/v4/app/NotificationCompat.Builder.html#setContentIntent(android.app.PendingIntent)">setContentIntent()</a></code> +method), then you should attach the + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html"><code>RemoteInput</code></a> to the main action using + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#addRemoteInputForContentIntent(android.preview.support.wearable.notifications.RemoteInput)"> +<code>addRemoteInputForContentIntent()</code></a>. For example:</p> + +<pre> +// Create intent for reply action +Intent replyIntent = new Intent(this, ReplyService.class); +PendingIntent replyPendingIntent = + PendingIntent.getService(this, 0, replyIntent, 0); + +// Build the notification +NotificationCompat.Builder replyNotificationBuilder = + new NotificationCompat.Builder(this) + .setSmallIcon(R.drawable.ic_new_message) + .setContentTitle("Message from Travis") + .setContentText("I love key lime pie!") + .setContentIntent(replyPendingIntent); + +// Create the remote input +RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY) + .setLabel(replyLabel) + .build(); + +// Create wearable notification and add remote input +Notification replyNotification = + new WearableNotifications.Builder(replyNotificationBuilder) + .addRemoteInputForContentIntent(replyAction) + .build(); +</pre> + + +<p>By using + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#addRemoteInputForContentIntent(android.preview.support.wearable.notifications.RemoteInput)"> +<code>addRemoteInputForContentIntent()</code></a> to add the + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html"><code>RemoteInput</code></a> object to the notification's primary action, +the button that normally appears as an "Open" action becomes the "Reply" action +and starts the voice input UI when users select it on Android Wear.</p> + + + +<h2 id="NewAction">Receive Voice Input for a Secondary Action</h2> + +<p>If the "Reply" action is not your notification's primary action and you want to enable +voice input for a secondary action, add the + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html"><code>RemoteInput</code></a> to a new action button defined by an + <a href="/reference/android/preview/support/wearable/notifications/Action.html"> +<code>Action</code></a> object.</p> + +<p>You should instantiate the + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html"> +<code>Action</code></a> with the + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html"><code>Action.Builder()</code></a> +constructor, which takes an icon and text label for the action button, plus the +<code><a href="/reference/android/app/PendingIntent.html">PendingIntent</a></code> +the system should use to invoke your app when the user selects the action. For example:</p> + +<pre> +// Create the pending intent to fire when the user selects the action +Intent replyIntent = new Intent(this, ReplyActivity.class); +PendingIntent pendingReplyIntent = + PendingIntent.getActivity(this, 0, replyIntent, 0); + +// Create the remote input +RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY) + .setLabel(replyLabel) + .build(); + +// Create the notification action +Action replyAction = new Action.Builder(R.drawable.ic_message, + "Reply", pendingIntent) + .addRemoteInput(remoteInput) + .build(); +</pre> + + +<p>After you add the + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html"><code>RemoteInput</code></a> to the + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html"> +<code>Action</code></a>, add the + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html"> +<code>Action</code></a> to the + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html"><code>WearableNotifications.Builder</code></a> using + <a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#addAction(Action)"><code>addAction()</code></a>. +For example:</p> + +<pre> +// Create basic notification builder +NotificationCompat.Builder replyNotificationBuilder = + new NotificationCompat.Builder(this) + .setContentTitle("New message"); + +// Create the notification action and add remote input +Action replyAction = new Action.Builder(R.drawable.ic_message, + "Reply", pendingIntent) + .addRemoteInput(remoteInput) + .build(); + +// Create wearable notification and add action +Notification replyNotification = + new WearableNotifications.Builder(replyNotificationBuilder) + .addAction(replyAction) + .build(); +</pre> + +<p>Now, when the user selects "Reply" from an Android wearable, + the system prompts for voice input (and provides the list of pre-defined replies, if provided). + Once the user completes a response, the system invokes + the <code><a href="/reference/android/content/Intent.html">Intent</a></code> attached to the action and adds the +<code>EXTRA_VOICE_REPLY</code> extra (the string + you passed to the + <a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html"><code>RemoteInput.Builder</code></a> constructor) + with the user's message as the string value.</p> + + + + +</body> +</html> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/notifications/stacks.html b/docs/html/wear/notifications/stacks.html new file mode 100644 index 0000000..5d10165 --- /dev/null +++ b/docs/html/wear/notifications/stacks.html @@ -0,0 +1,507 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Stacking Notifications | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Stacking Notifications</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <img src="/wear/images/11_bundles_B.png" height="200" width="169" style="float:right;margin:0 0 20px 40px" /> +<img src="/wear/images/11_bundles_A.png" height="200" width="169" style="float:right;margin:0 0 20px 40px" /> + +<p>When your app creates more than one notification about the same type, you should traditionally +update the existing notification with a summary of all the notifications instead of creating multiple notifications. For instance, instead +of three notifications for each received email, you should create one with a summary such as "3 new +messages." To view the contents of each message, the user must then touch the notification to open +your app.</p> + +<p>However, when a user is viewing your notifications on a wearable device, you can create +a stack that collects all the notifications for immediate access without creating multiple +cards in the card stream.</p> + +<p>For details about designing notification stacks, see the +<a href="/wear/design/index.html#NotificationStacks">Design Principles of Android +Wear</a>.</p> + + +<h2 id="AddGroup">Add Each Notification to a Group</h2> + +<p>To create a stack, call <a +href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#setGroup(java.lang.String, int)"> +<code>setGroup()</code></a> for each notification you want in the stack, passing the same +group key. For example:</p> + +<pre style="clear:right"> +final static String GROUP_KEY_EMAILS = "group_key_emails"; + +NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext) + .setContentTitle("New mail from " + sender) + .setContentText(subject) + .setSmallIcon(R.drawable.new_mail); + +Notification notif = new WearableNotifications.Builder(builder) + .setGroup(GROUP_KEY_EMAILS) + .build(); +</pre> + +<p>By default, notifications appear in the order in which you added them, with the most recent + notification visible at the top. You can define a specific position in the group + by passing an order position as the second parameter for <a +href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#setGroup(java.lang.String, int)"> +<code>setGroup()</code></a>.</p> + + +<h2 id="AddSummary">Add a Summary Notification</h2> + +<p>It's important that you still provide a summary notification for handheld devices. So in +addition to adding each unique notification to the same stack group, also add the summary +notification but set its order position to be <a +href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html#GROUP_ORDER_SUMMARY"><code>GROUP_ORDER_SUMMARY</code></a>. +The notification in this position does not appear in the stack on the wearable but +appears as the only notification on the handheld.</p> + +<pre> +Notification summaryNotification = new WearableNotifications.Builder(builder) + .setGroup(GROUP_KEY_EMAILS, WearableNotifications.GROUP_ORDER_SUMMARY) + .build(); +</pre> + + +</body> +</html> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/preview/signup.html b/docs/html/wear/preview/signup.html new file mode 100644 index 0000000..ca50179 --- /dev/null +++ b/docs/html/wear/preview/signup.html @@ -0,0 +1,609 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Sign Up for the Developer Preview | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Sign Up for the Developer Preview</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <p>To get started with the Android Wear Developer Preview, you must agree to the + following terms and conditions and provide the email address for your Google account. +After signing up, you’ll have access to:</p> +<ul> + <li>New APIs that allow you to build enhanced notifications for wearables.</li> + <li>Sample code using the new APIs.</li> + <li>The Android Wear Preview app that delivers your notifications to the Android Wear emulator.</li> +</ul> + +<div class="sdk-terms" style="width:678px" onfocus="this.blur()"><div class="sdk-terms-padding"> +This is the Android Wear Developer Preview License Agreement. + +1. Introduction + +1.1 The Android Wear Developer Preview Kit (referred to in this License Agreement as the “Developer Preview” and specifically including the Android system files, packaged APIs, Developer Preview library files, and the Developer Preview companion app, if and when they are made available) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the Developer Preview. + +1.2 "Android Wear" means the Android Wear devices and the Android Wear software stack for use on Android Wear devices. + +1.3 "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.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. + +2. Accepting this License Agreement + +2.1 In order to use the Developer Preview, you must first agree to this License Agreement. You may not use the Developer Preview if you do not accept this License Agreement. + +2.2 By clicking to accept, you hereby agree to the terms of this License Agreement. + +2.3 You may not use the Developer Preview and may not accept the License Agreement if you are a person barred from receiving the Developer 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 Developer Preview. + +2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Developer Preview on behalf of your employer or other entity. + +3. Developer Preview License from Google + +3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, internal-use, non-assignable and non-exclusive license to use the Developer Preview solely to develop applications to run on the Android Wear platform for Android Wear devices. + +3.2 You agree that Google or third parties own all legal right, title and interest in and to the Developer Preview, including any Intellectual Property Rights that subsist in the Developer 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 Developer Preview for any purpose not expressly permitted by this 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 Developer Preview or any part of the Developer Preview; or (b) load any part of the Developer Preview onto a mobile handset or wearable computing device or any other hardware device except an Android Wear device, combine any part of the Developer Preview with other software, or distribute any software or device incorporating a part of the Developer Preview. + +3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android Wear, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Developer Preview. + +3.5 Use, reproduction and distribution of components of the Developer Preview licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement. + +3.6 You agree that the form and nature of the Developer Preview that Google provides may change without prior notice to you and that future versions of the Developer Preview may be incompatible with applications developed on previous versions of the Developer Preview. You agree that Google may stop (permanently or temporarily) providing the Developer Preview (or any features within the Developer Preview) to you or to users generally at Google's sole discretion, without prior notice to you. + +3.7 Nothing in this 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 Developer Preview. + +3.9 Your use of any Android system files, packaged APIs, or other components of the Developer Preview which are part of the Android Software Development Kit is subject to the terms of the Android Software Development Kit License Agreement located at http://developer.android.com/sdk/terms.html. These terms are hereby incorporated by reference into this License Agreement. + +4. Use of the Developer Preview by You + +4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the Developer Preview, including any intellectual property rights that subsist in those applications. + +4.2 You agree to use the Developer Preview and write applications only for purposes that are permitted by (a) this License Agreement, (b) the Google Play Developer Program Policies located at https://play.google.com/about/developer-content-policy.html, and hereby incorporated into this License Agreement by reference), and (c) 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). You agree to use reasonable efforts to comply with the Android Wear Platform Design Guide available on the Android Wear developer website + +4.3 You agree that if you use the Developer Preview to develop applications for general public users, you will protect the privacy and legal rights of those users. If the 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 the user provides your application 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, the user has given you permission to do so. + +4.4 You agree that you will not engage in any activity with the Developer 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 any third party including, but not limited to, Google. + +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 Wear and/or applications for Android Wear, 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 this 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 Unless otherwise specified in writing by Google, Google does not intend use of Android Wear to create obligations under the Health Insurance Portability and Accountability Act, as amended, (“HIPAA”), and makes no representations that Android Wear satisfies HIPAA requirements. If you are (or become) a Covered Entity or Business Associate under HIPAA, you agree not to use Android Wear for any purpose or in any manner involving Protected Health Information unless you have received prior written consent to such use from Google. + +4.8 The Developer Preview is in development, and your testing and feedback are an important part of the development process. By using the Developer Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Developer Preview, Android Wear devices, Android Wear system software, or Android Wear services having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Developer Preview as this Developer Preview will no longer be supported after the official 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 Developer 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 Developer Preview are being used and how they are being used. Before any of this information is collected, the Developer 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 Developer Preview and is maintained in accordance with Google's Privacy Policy lcoated at http://www.google.com/policies/privacy/. + +7. Third Party Applications + +7.1 If you use the Developer 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. In that case, this License Agreement does not affect your legal relationship with these third parties. + +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 this License Agreement + +9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below. + +9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the Developer Preview and any relevant developer credentials. + +9.3 Google may at any time, terminate this License Agreement with you if: +(A) you have breached any provision of this License Agreement; or +(B) Google is required to do so by law; or +(C) the partner with whom Google offered certain parts of Developer Preview (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the Developer Preview to you; or +(D) Google decides to no longer provide the Developer Preview or certain parts of the Developer Preview to users in the country in which you are resident or from which you use the service, or the provision of the Developer Preview or certain Developer Preview services to you by Google is, in Google's sole discretion, no longer commercially viable. + +9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely. + +10. DISCLAIMER OF WARRANTIES + +10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE DEVELOPER PREVIEW IS AT YOUR SOLE RISK AND THAT THE DEVELOPER PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. + +10.2 YOUR USE OF THE DEVELOPER PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE DEVELOPER 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. + +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 Developer Preview, (b) any application you develop on the Developer Preview that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this 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 Developer Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Developer Preview is made available. + +14. General Legal Terms + +14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Developer 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 Developer Preview. + +14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this 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 this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this 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 this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this 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 this License Agreement. + +14.5 EXPORT RESTRICTIONS. THE DEVELOPER 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 DEVELOPER PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. + +14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party. + +14.7 This License Agreement, and your relationship with Google under this 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 this 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></div> + + +<p class="caution"> + <strong>Important:</strong> Your email address is used to provide your Google account + access to the Android Wear Preview app Beta Preview on Google Play Store. As such, the + email address you provide below must be for the account you use to download apps on Google Play Store. + We may also use your email address to provide you with updates about the Android Wear + platform release. +</p> + +<iframe src="https://docs.google.com/forms/d/1iSJ084kEkV242cZisNMnj6G8qpi9r_zdEyfXA-hB1ao/viewform?embedded=true" width="100%" height="540" frameborder="0" marginheight="0" marginwidth="0" id="signupform">Loading...</iframe> + + + + +</body> +</html> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + diff --git a/docs/html/wear/preview/start.html b/docs/html/wear/preview/start.html new file mode 100644 index 0000000..ce51c66 --- /dev/null +++ b/docs/html/wear/preview/start.html @@ -0,0 +1,687 @@ +<!DOCTYPE html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<html> +<head> + + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width" /> + +<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> +<title>Get Started with the Developer Preview | Android Developers</title> + +<!-- STYLESHEETS --> +<link rel="stylesheet" +href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> +<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> + + + +<!-- JAVASCRIPT --> +<script src="//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" type="text/javascript"></script> + +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-5831155-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</head> + +<body class="gc-documentation + " itemscope itemtype="http://schema.org/Article"> + + + +<a name="top"></a> + + <!-- Header --> + <div id="header"> + <div class="wrap" id="header-wrap"> + <div class="col-3 logo-wear"> + <a href="/wear/index.html"> + <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" /> + </a> + </div> + + + <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px; + color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div> + + + <!-- New Search --> + <div class="menu-container"> + <div class="moremenu"> + <div id="more-btn"></div> + </div> + <div class="morehover" id="moremenu"> + <div class="top"></div> + <div class="mid"> + <div class="header">Links</div> + <ul> + <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> + <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> + <li><a href="/about/index.html">About Android</a></li> + </ul> + <div class="header">Android Sites</div> + <ul> + <li><a href="http://www.android.com">Android.com</a></li> + <li class="active"><a>Android Developers</a></li> + <li><a href="http://source.android.com">Android Open Source Project</a></li> + </ul> + + + + <div class="header">Language</div> + <div id="language" class="locales"> + <select name="language" onChange="changeLangPref(this.value, true)"> + <option value="en">English</option> + <option value="es">Español</option> + <option value="ja">日本語</option> + <option value="ko">한국어</option> + <option value="ru">Русский</option> + <option value="zh-cn">中文 (中国)</option> + <option value="zh-tw">中文 (台灣)</option> + </select> + </div> + <script type="text/javascript"> + <!-- + loadLangPref(); + //--> + </script> + + + + + <br class="clearfix" /> + </div><!-- end mid --> + <div class="bottom"></div> + </div><!-- end morehover --> + + <div class="search" id="search-container"> + <div class="search-inner"> + <div id="search-btn"></div> + <div class="left"></div> + <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, '/')" /> + </form> + <div class="right"></div> + <a class="close hide">close</a> + <div class="left"></div> + <div class="right"></div> + </div> + </div><!-- end search --> + + <div class="search_filtered_wrapper reference"> + <div class="suggest-card reference no-display"> + <ul class="search_filtered"> + </ul> + </div> + </div> + + <div class="search_filtered_wrapper docs"> + <div class="suggest-card dummy no-display"> </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><!-- end search_filtered_wrapper --> + + </div> + <!-- end menu_container --> + + + </div><!-- end header-wrap --> + </div> + <!-- /Header --> + + + <div id="searchResults" class="wrap" style="display:none;"> + <h2 id="searchTitle">Results</h2> + <div id="leftSearchControl" class="search-control">Loading...</div> + </div> + + + + + + <div class="wrap clearfix" id="body-content"> + <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div id="devdoc-nav" class="scroll-pane"> +<a class="totop" href="#top" data-g-event="left-nav-top">to top</a> + +<ul id="nav"> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications + </a></div> + </li> + + <li class="nav-section"> + <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div> + <ul class="tree-list-children"> +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div> + <ul> +<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li> + </ul> +</li> + +<li class="nav-section"> +<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div> +<ul> + +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li> +<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li> + +<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li> + </ul> + </li> +</ul> +</li> + + + + <li class="nav-section"> + <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div> + </li> + + +</ul> + + + + </div> + </div> <!-- end side-nav --> + <script> + $(document).ready(function() { + scrollIntoView("devdoc-nav"); + }); + </script> + + + + +<div class="col-12" id="doc-col" > + + + + + + <h1 itemprop="name" >Get Started with the Developer Preview</h1> + + + + + + + <div id="jd-content"> + + + <div class="jd-descr" itemprop="articleBody"> + <div class="cols"> + + <div class="col-5"> +<p>The Android Wear Developer Preview provides tools and APIs that allow you to +enhance your app notifications +to provide an optimized user experience on Android Wear.</p> + +<p>With the Android Wear +Developer Preview, you can:</p> + +<ul> + <li>Run the Android Wear platform in the Android emulator.</li> + <li>Connect your Android device to the emulator and view notifications from the +device as cards on Android Wear.</li> + <li>Try new APIs in the preview support library that enhance your app's notifications +with features such as voice replies and notification pages.</li> +</ul> + +<p>To get access to the Developer Preview tools, +click the sign up button on the right, then follow the setup instructions below.</p> + </div> + + <div class="col-7"> +<img src="/wear/images/laptop-bridge.png" width="400" height="222" alt="" /> + +<a href="/wear/preview/signup.html" class="button" style=" + width: 370px; + margin: 10px 0 20px; + font-weight: bold; + font-size: 16px; +">Sign Up for the Developer Preview</a> + +<p>Signing up provides you access to:</p> +<ul> +<li>New notification APIs in the preview support library.</li> +<li>Sample apps using the new notification APIs.</li> +<li>The <em>Android Wear Preview</em> app for your mobile device, which connects +your device to the Android Wear emulator.</li> +</ul> + + </div> +</div> + + +<p class="caution"><strong>Caution:</strong> +The current Android Wear Developer Preview is intended for <b>development and testing purposes only</b>, not for production apps. Google may change this Developer Preview significantly prior to the official release of the Android Wear SDK. You may not publicly distribute or ship any application using this Developer Preview, as this Developer Preview will no longer be supported after the official SDK is released (which will cause applications based only on the Developer Preview to break).</p> + + + + +<h2 id="Prereq">Prerequisites</h2> + +<p>Before you begin the setup, you must:</p> + +<ol> + <li><a href="/sdk/index.html"><b>Install the Android SDK</b></a>. + <p>The Android SDK includes all the developer tools required to build +apps for Android (optional IDEs are also available for download).</p></li> + <li><a href="/wear/preview/signup.html"><b>Sign up for the Android Wear Developer Preview</b></a>. + <p>You must sign up with a Gmail or other Google account in order to download the +preview support library and receive access to the +<em>Android Wear Preview</em> beta app on Google Play Store.</p></li> +</ol> + +<p class="note"><strong>Note:</strong> +If you're already using the ADT plugin for Eclipse, you must update to version 22.6.1 or higher. +To check for updates, select <strong>Help > Check for updates</strong> in the Eclipse toolbar. </p> + + + +<h2 id="Install">1. Install the Android Wear system image</h2> + + +<ol> + <li>Launch <a href="/tools/help/sdk-manager.html" + >Android SDK Manager</a>. + <ul> + <li>From Eclipse, select <b>Window > Android SDK Manager</b>.</li> + <li>From Android Studio, select <b>Tools > Android > SDK Manager</b>.</li> + </ul> + </li> + <li>Below Tools, verify that you have Android SDK Tools revision 22.6 or higher. + <p>If your version of Android SDK Tools is lower than 22.6, you must update:</p> + <ol> + <li>Select <strong>Android SDK Tools</strong>.</li> + <li>Click <strong>Install package</strong>.</li> + <li>Accept the license and click <strong>Install</strong>.</li> + <li>When the installation completes, restart Android SDK Manager.</li> + </ol> + </li> + + <li>Below Android 4.4.2, select <strong>Android Wear ARM EABI v7a System Image</strong>.</li> + <li>Below Extras, ensure that you have the latest version of the +<a href="/tools/support-library/index.html">Android Support Library</a>. + If an update is available, select <strong>Android Support Library</strong>. If you're using Android Studio, also select <strong>Android Support Repository</strong>.</li> + <li>Click <strong>Install packages</strong>.</li> + <li>Accept the license and click <strong>Install</strong>.</li> +</ol> + + + +<h2 id="SetupEmulator">2. Set Up the Android Wear Emulator</h2> + +<ol> +<li>Launch the <a href="/tools/help/avd-manager.html" + >Android Virtual Device Manager</a>. +<ul> +<li>From Eclipse, select <b>Window > Android Virtual Device Manager</b>.</li> +<li>From Android Studio, select <b>Tools > Android > AVD Manager</b>.</li> +</ul> +</li> +<li>Click <strong>New</strong>.</li> +<li>For the AVD Name, enter "AndroidWearSquare" or "AndroidWearRound", depending on whether +you want to create an emulator with a square or round display.</li> +<li>For the Device, select <strong>Android Wear Square</strong> or + <strong>Android Wear Round</strong>.</li> +<li>For the Target, select <strong>Android 4.4.2 - API Level 19</strong> (or higher).</li> +<li>For the CPU/ABI, select <strong>Android Wear ARM (armeabi-v7a)</strong>.</li> +<li>For the Skin, select <strong>AndroidWearSquare</strong> or +<strong>AndroidWearRound</strong>.</li> +<li>Leave all other options set to their defaults and click <strong>OK</strong>. + <p>Although real Android Wear devices do not provide a keyboard as an input method, + you should keep <strong>Hardware keyboard present</strong> selected so you can + provide text input on screens where users will instead provide voice input.</p> +</li> +<!-- +<li>Click <strong>Device Definitions</strong>.</li> +<li>Select <strong>Android WearSquare</strong> then click <strong>Create AVD</strong>.</li> +<li>Click <strong>OK</strong>.</li> +--> +<li>In the list of AVDs, select the one you just created and click + <strong>Start</strong>. In the following window, click <strong>Launch</strong>.</li> +</ol> + +<p>The Android Wear emulator now starts. To begin testing your app's notifications, +you must now pair the emulator to your development device +that has the <em>Android Wear Preview</em> app installed.</p> + +<p class="note"><strong>Tip:</strong> To improve the emulator startup time, edit your AVD +and enable <strong>Snapshot</strong> under Emulator Options. When you start the emulator, +select <strong>Save to snapshot</strong> then click <strong>Launch</strong>. Once the emulator +is running, close it to save a snapshot of the system. +Start the AVD again, but select <strong>Launch from snapshot</strong> and +deselect <strong>Save to snapshot</strong>.</p> + +<p class="caution"><strong>Caution:</strong> Do not install apps on the Android Wear emulator. +The system does not support traditional Android apps and the result of running such apps is +unpredictable.</p> + + + +<h2 id="SetupApp">3. Set Up the Android Wear Preview App</h2> + +<p>The <em>Android Wear Preview</em> app is an app you must have installed on your Android +device (a phone or tablet) in order to deliver app notifications to the Android Wear emulator.</p> + +<p>To receive the Android Wear Preview app, you must <a +href="/wear/preview/signup.html">sign up for the Developer Preview</a> using the same +Gmail or Google account you use with Google Play Store.</p> +</p> + +<p class="note"><strong>Note:</strong> The <em>Android Wear Preview</em> app is compatible with + Android 4.3 and higher and is not available for the Android emulator.</p> + +<p>After you've signed up for the Developer Preview, + you'll receive a confirmation email that includes a link to opt-in to the + <em>Android Wear Preview</em> app beta program. Once you opt-in, it may take up to 24 hours for the + app to become available in Google Play Store.</p> + +<p>After you install the <em>Android Wear Preview</em> app, you can set up + your device to communicate with the Android Wear emulator:</p> + +<ol> +<li>Open the <em>Android Wear Preview</em> app. You should see a notice that the app is currently + not enabled as a notification listener. Tap the message to open the system settings, + then select Android Wear Preview to grant it notification access.</li> +<li>Connect your device to your development machine over USB. Be sure that no other + Android devices are connected to the machine.</li> +<li>Ensure that the Android Wear emulator (created in the previous section) is running. +The emulator should show the time and an icon that indicates no device is connected.</li> +<li>Open a command line terminal, navigate to your Android SDK's <code>platform-tools/</code> +directory, then execute: +<pre style="margin-top:.5em">adb -d forward tcp:5601 tcp:5601</pre></li> +<li>Return to the Android Wear Preview app. It should now indicate that it is connected to + the emulator. The Android Wear emulator should now show the 'g' orb icon, indicating + that is is connected to your device. +</ol> + +<p>Now, notifications from your device also appear in the Android Wear emulator.</p> + + + + +<h2 id="AddLibrary">4. Add the Support Library to Your Project</h2> + +<p>The Android Wear preview support library includes several APIs that allow you to +optimize your app's notifications for the Android Wear user experience.</p> + +<p>To receive the preview support library, you must <a +href="/wear/preview/signup.html">sign up for the Developer Preview</a>. The +confirmation email you receive after you sign up includes a link to download a ZIP file, +which contains the preview support library and some sample apps.</p> + +<p>After you download and unzip the package, add the preview support library +sto your Android project:</p> + +<p><b>If you're using Eclipse:</b></p> + <ol> + <li>In your Android app project, create a <code>libs/</code> directory in your project root + (the same location as the <code>AndroidManifest.xml</code> file).</li> + <li>Copy the v4 support library JAR file from your Android SDK directory (e.g., + <code><sdk>/extras/android/support/v4/android-support-v4.jar</code>) into your + project <code>libs/</code> directory. + <li>Also save the <code>wearable-preview-support.jar</code> file in the <code>libs/</code> directory. + <li>Right click each JAR file and select <strong>Build Path > Add to Build Path</strong>.</li> + </ol> + + <p><b>If you're using Android Studio:</b></p> + <ol> + <li>In your Android app project, create a <code>libs/</code> directory in your project root + (the same location as the <code>AndroidManifest.xml</code> file).</li> + <li>Save the <code>wearable-preview-support.jar</code> file in the <code>libs/</code> directory. + <li>Open the <code>build.gradle</code> file in your app module.</li> + <li>Add a dependency rule for both the v4 support library and the Android Wear + preview support library: +<pre> +dependencies { + compile "com.android.support:support-v4:18.0.+" + compile files('../libs/wearable-preview-support.jar') +} +</pre> + </li> + <li>Click <strong>Sync Project with Gradle Files</strong> in the toolbar.</li> + </ol> + +<p>To start optimizing your notifications for Android Wear, + read <a href="/wear/notifications/creating.html" + >Creating Notifications for Android Wear</a>.</p> + + + +</body> +</html> + + </div> + + <div class="content-footer layout-content-row" + itemscope itemtype="http://schema.org/SiteNavigationElement"> + <div class="layout-content-col col-9" style="padding-top:4px"> + + <div class="g-plusone" data-size="medium"></div> + + </div> + + <div class="paging-links layout-content-col col-4"> + + </div> + + </div> + + + + + </div> <!-- end jd-content --> + +<div id="footer" class="wrap" > + + + <div id="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>. + </div> + + + <div id="footerlinks"> + + <p> + <a href="/about/index.html">About Android</a> | + <a href="/legal.html">Legal</a> | + <a href="/support.html">Support</a> + </p> + </div> + +</div> <!-- end footer --> +</div><!-- end doc-content --> + +</div> <!-- end body-content --> + + + + + + +<!-- Start of Tag --> +<script type="text/javascript"> +var axel = Math.random() + ""; +var a = axel * 10000000000000; +document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); +</script> +<noscript> +<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> +</noscript> +<!-- End of Tag --> +</body> +</html> + + + |