Merge "docs: Fixing doc issue with Android TV overscan margin recommendations." into mnc-docs
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 1fc69c0..73bb426 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -3182,8 +3182,8 @@
}
/**
- * Sets GPS processing method. It will store up to 32 characters
- * in JPEG EXIF header.
+ * Sets GPS processing method. The method will be stored in a UTF-8 string up to 31 bytes
+ * long, in the JPEG EXIF header.
*
* @param processing_method The processing method to get this location.
*/
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index c580083..8d3cea6 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -472,13 +472,13 @@
* <li>The maximum available resolution for RAW_SENSOR streams
* will match either the value in
* {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
- * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</li>
+ * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li>
* <li>All DNG-related optional metadata entries are provided
* by the camera device.</li>
* </ul>
*
- * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
* @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
+ * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
* @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
*/
public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 3f566eb..67835a0 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -556,6 +556,10 @@
* Set a capture request field to a value. The field definitions can be
* found in {@link CaptureRequest}.
*
+ * <p>Setting a field to {@code null} will remove that field from the capture request.
+ * Unless the field is optional, removing it will likely produce an error from the camera
+ * device when the request is submitted.</p>
+ *
* @param key The metadata field to write.
* @param value The value to set the field to, which must be of a matching
* type to the key.
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index fb31871..56689cc 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -843,7 +843,7 @@
<!-- =============================================================== -->
<eat-comment />
- <!-- Allows an application to modify and remove existing voicemails in the system
+ <!-- Allows an application to modify and remove existing voicemails in the system.
<p>Protection level: system|signature
-->
<permission android:name="com.android.voicemail.permission.WRITE_VOICEMAIL"
@@ -860,7 +860,7 @@
<!-- ======================================= -->
<eat-comment />
- <!-- Allows an application to access extra location provider commands
+ <!-- Allows an application to access extra location provider commands.
<p>Protection level: normal
-->
<permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"
@@ -906,7 +906,7 @@
android:label="@string/permlab_createNetworkSockets"
android:protectionLevel="normal" />
- <!-- Allows applications to access information about networks
+ <!-- Allows applications to access information about networks.
<p>Protection level: normal
-->
<permission android:name="android.permission.ACCESS_NETWORK_STATE"
@@ -1037,7 +1037,7 @@
<eat-comment />
<!-- Allows access to the list of accounts in the Accounts Service.
- <p>Protection level: normal
+ <p>Protection level: dangerous
-->
<permission android:name="android.permission.GET_ACCOUNTS"
android:permissionGroup="android.permission-group.CONTACTS"
@@ -1934,7 +1934,7 @@
<permission android:name="android.permission.BIND_PRINT_SPOOLER_SERVICE"
android:protectionLevel="signature" />
- <!-- Must be required by a TextService (e.g. SpellCheckerService)
+ <!-- Must be required by a TextService (eg SpellCheckerService)
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
diff --git a/docs/html/design/tv/images/icon.png b/docs/html/design/tv/images/icon.png
index ae34e18..9cf584c 100644
--- a/docs/html/design/tv/images/icon.png
+++ b/docs/html/design/tv/images/icon.png
Binary files differ
diff --git a/docs/html/design/tv/patterns.jd b/docs/html/design/tv/patterns.jd
index f38fa76..622e678 100644
--- a/docs/html/design/tv/patterns.jd
+++ b/docs/html/design/tv/patterns.jd
@@ -114,20 +114,24 @@
<h4>Small icon</h4>
-<p>Recommendation cards include a small icon that is imposed over a colored background. The icon and
-background color display at 100% opacity when the card is selected, and at 50% opacity when not
-selected.</p>
+<p>Recommendation cards include a small icon that is imposed over a colored
+background. The icon and background color both display at 100% opacity when the card
+is selected and at 50% opacity when the card is not selected.</p>
<img src="{@docRoot}design/tv/images/icon.png" alt="Recommendation icon examples" />
-<p>Here are the requirements for recommendation small icons:</p>
+<p>Here are the requirements for a small recommendation icon:</p>
<ul>
- <li>Flat image</li>
- <li>Monocolor: size 16x16dp, white (#fff) icon with transparent background, PNG format</li>
- <li>Graphics should be centered within the icon image</li>
+ <li>Visually flat graphic, monocolor, 16x16dp</li>
+ <li>Color <code>#eeeeee</code> with transparency</li>
+ <li>Graphic centered over transparent background</li>
+ <li>PNG file format</li>
</ul>
+<p class="note"><strong>Note:</strong> The color value <code>#eeeeee</code> is actually a light
+gray, but it is used by the system to create a background which appears white.</p>
+
<h2>Audio Feedback</h2>
<p>Sounds on Android TV bring a cinematic quality to the interaction experience. You should
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
index 1c6139f..4591e76 100644
--- a/docs/html/develop/index.jd
+++ b/docs/html/develop/index.jd
@@ -84,6 +84,23 @@
data-sortOrder="random"></div>
</div></section>
+<section class="dac-section dac-gray"><div class="wrap">
+ <h1 class="dac-section-title">Android development patterns</h1>
+ <div class="dac-section-subtitle">
+ Fundamental components and best practices that can help you build better apps.
+ </div>
+ <div class="resource-widget resource-flow-layout col-16"
+ data-query="collection:develop/landing/devpatterns"
+ data-cardSizes="6x6"
+ data-maxResults="3"></div>
+ <ul class="dac-section-links">
+ <li class="dac-section-link"><a href="https://www.youtube.com/playlist?list=PLWz5rJ2EKKc-lJo_RGGXL2Psr8vVCTWjM">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Playlist
+ </a></li>
+ </ul>
+</div></section>
+
<section class="dac-section dac-section-light"><div class="wrap">
<h1 class="dac-section-title">Android performance patterns</h1>
<div class="dac-section-subtitle">
diff --git a/docs/html/distribute/googleplay/googleplay_toc.cs b/docs/html/distribute/googleplay/googleplay_toc.cs
index 60da6d2..f84dbf2 100644
--- a/docs/html/distribute/googleplay/googleplay_toc.cs
+++ b/docs/html/distribute/googleplay/googleplay_toc.cs
@@ -39,19 +39,6 @@
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/guide.html"
- es-lang="Cómo tener éxito en Google Play"
- ja-lang="Google Play で成功を手にする"
- ko-lang="Google Play에서 성공 모색"
- pt-br-lang="Obtendo sucesso no Google Play"
- ru-lang="Найдите свой путь к успеху в Google Play"
- zh-cn-lang="在 Google Play 上取得成功"
- zh-tw-lang="在 Google Play 上尋找成功">
- Find Success on <span style="white-space:nowrap">Google Play
- </a>
- </div>
- </li>
- <li class="nav-section">
<div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/wear.html"
es-lang="Distribución para Android Wear"
ja-lang="Android Wear への配布"
@@ -136,6 +123,19 @@
</a>
</div>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/guide.html"
+ es-lang="Cómo tener éxito en Google Play"
+ ja-lang="Google Play で成功を手にする"
+ ko-lang="Google Play에서 성공 모색"
+ pt-br-lang="Obtendo sucesso no Google Play"
+ ru-lang="Найдите свой путь к успеху в Google Play"
+ zh-cn-lang="在 Google Play 上取得成功"
+ zh-tw-lang="在 Google Play 上尋找成功">
+ Find Success on <span style="white-space:nowrap">Google Play
+ </a>
+ </div>
+ </li>
</ul>
<script type="text/javascript">
<!--
diff --git a/docs/html/distribute/googleplay/guide.jd b/docs/html/distribute/googleplay/guide.jd
index 8317206..6cb8cc0 100644
--- a/docs/html/distribute/googleplay/guide.jd
+++ b/docs/html/distribute/googleplay/guide.jd
@@ -1,7 +1,8 @@
-page.title=Finding Success on Google Play
-page.metaDescription=A guide to help you find success with your app or game business on Google Play.
-meta.tags="distribute", "bestpractices"
-page.tags="google play", "business", "monetize", "engagement"
+page.title=Find Success on Google Play
+page.metaDescription=The updated guide that helps you find success with your app or game business on Google Play.
+page.tags="play,protips"
+page.timestamp=1447437450
+meta.tags="secrets, success, play, google"
page.image=distribute/images/play_dev_guide.png
@jd:body
@@ -9,63 +10,34 @@
<p>
We’ve created a downloadable guide to help you find success with your app or
game business on Google Play. In it, you’ll find features, tips, and best
- practices to help you build an effective strategy.
+ practices to help you build an effective strategy to improve the quality,
+ reach, retention, and monetization of your apps and games.
</p>
-<p>
- The guide is separated into the following sections:
-</p>
-<ul>
- <li>
- <strong>Publishing on Google Play</strong> — using the Google Play
- Developer Console to distribute your app to over 1 billion Android users
- worldwide.
- </li>
+<a href="https://play.google.com/store/books/details?id=O2a5CgAAQBAJ&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1">
+ <img src="{@docRoot}images/distribute/secrets_v2_banner.jpg">
+</a>
- <li>
- <strong>Quality</strong> — The fundamentals of building a great app
- and an insight into the Google Play guidelines and policies.
- </li>
+<div style="text-align:center">
+ <a href="https://play.google.com/store/books/details?id=O2a5CgAAQBAJ&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1">
+ <img alt="Get it on Google Play"
+ src="https://play.google.com/intl/en_us/badges/images/books/en-play-badge-border.png"
+ style="height:60px" />
+ </a>
+</div>
- <li>
- <strong>Discoverability & reach</strong> — Maximizing your app's
- discoverability and reaching the widest audience possible.
- </li>
-
- <li>
- <strong>Engagement & retention</strong> — Converting
- installations into active users and improving user retention.
- </li>
-
- <li>
- <strong>Monetization</strong> — Monetization strategies to generate
- ongoing, growing revenue streams.
- </li>
-
- <li>
- <strong>Measurement with Google Analytics</strong> — Understanding
- your users and improving your app experience, conversions, and marketing.
- </li>
-
- <li>
- <strong>Going global</strong> — Launching your app in local markets
- around the world.
- </li>
-</ul>
-
-<p>
- Download the guide by clicking the image below or <a href=
- "http://goo.gl/DFjbrS">get it on Google Play</a>.
+<p><a
+ href="https://docs.google.com/forms/d/1KFE9D7NlOrxM_jzmyMeZGaczgg1xo57jBoGq0R5nnsU/viewform">Sign
+ up to be notified</a> when the guide is released in the following languages:
+ Bahasa Indonesia, Deutsch, español (Latinoamérica), le français, português do
+ Brasil, <span style="white-space: nowrap;">tiếng Việt</span>, <span style="white-space:
+ nowrap;">русский язы́к</span>, <span style="white-space: nowrap;">ไทย</span>,
+ <span style="white-space: nowrap;">한국어</span>, <span style="white-space: nowrap;">中文
+ (简体)</span>, <span style="white-space: nowrap;">中文 (繁體)</span>, and <span style="white-space:
+ nowrap;">日本語</span>.
</p>
-<p>
- We’ll release the guide in more languages in the coming months. Check back to
- this website regularly as we post information on new features and best
- practices to help you distribute and monetize your app.
+<p>You can also <a
+ href="{@docRoot}shareables/distribute/secrets_play/v2/web/secrets_to_app_success_v2_en.pdf">download
+ the pdf</a>.
</p>
- <div class="resource-widget resource-flow-layout col-16"
- data-query="collection:play_dev_guide"
- data-cardSizes="9x6"
- data-maxResults="1">
- </div>
-
diff --git a/docs/html/google/play/billing/billing_overview.jd b/docs/html/google/play/billing/billing_overview.jd
index 4ec4946..cc56468 100644
--- a/docs/html/google/play/billing/billing_overview.jd
+++ b/docs/html/google/play/billing/billing_overview.jd
@@ -32,6 +32,11 @@
<li><a href="{@docRoot}training/in-app-billing/preparing-iab-app.html#GetSample">Sample
Application (V3)</a></li>
</ol>
+ <h2>Related Videos</h2>
+ <ol>
+ <li><a href="https://www.youtube.com/watch?v=UvCl5Xx7Z5o">Implementing
+ Freemium</a></li>
+ </ol>
</div>
</div>
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index c1ccef0..9ac514c 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -562,10 +562,11 @@
<tr>
<td rowspan="6">Camera</td>
<td><code>android.hardware.camera</code></td>
- <td>The application uses the device's camera. If the device supports
- multiple cameras, the application uses the camera that facing
- away from the screen.</td>
- <td></td>
+ <td>The application uses the device's back-facing (main) camera.</td>
+ <td>Devices with only a front-facing camera do not list this feature, so the
+ <code>android.hardware.camera.any</code> feature should be
+ used instead if a camera facing any direction is acceptable for the
+ application.</td>
</tr>
<tr>
<td><code>android.hardware.camera.autofocus</code></td>
diff --git a/docs/html/images/distribute/hero-IO15-growing-games.jpg b/docs/html/images/distribute/hero-IO15-growing-games.jpg
index c08bd71..f2f6584 100644
--- a/docs/html/images/distribute/hero-IO15-growing-games.jpg
+++ b/docs/html/images/distribute/hero-IO15-growing-games.jpg
Binary files differ
diff --git a/docs/html/images/distribute/hero-acquisition-devbyte.jpg b/docs/html/images/distribute/hero-acquisition-devbyte.jpg
new file mode 100644
index 0000000..6a533bc
--- /dev/null
+++ b/docs/html/images/distribute/hero-acquisition-devbyte.jpg
Binary files differ
diff --git a/docs/html/images/distribute/hero-domain-story.jpg b/docs/html/images/distribute/hero-domain-story.jpg
new file mode 100644
index 0000000..2246de0
--- /dev/null
+++ b/docs/html/images/distribute/hero-domain-story.jpg
Binary files differ
diff --git a/docs/html/images/distribute/hero-dots-story.jpg b/docs/html/images/distribute/hero-dots-story.jpg
new file mode 100644
index 0000000..2791c7e
--- /dev/null
+++ b/docs/html/images/distribute/hero-dots-story.jpg
Binary files differ
diff --git a/docs/html/images/distribute/hero-jelly-button.jpg b/docs/html/images/distribute/hero-jelly-button.jpg
index 032755b..3cc40f8 100644
--- a/docs/html/images/distribute/hero-jelly-button.jpg
+++ b/docs/html/images/distribute/hero-jelly-button.jpg
Binary files differ
diff --git a/docs/html/images/distribute/hero-playtime-opener.jpg b/docs/html/images/distribute/hero-playtime-opener.jpg
new file mode 100644
index 0000000..fbd21bd
--- /dev/null
+++ b/docs/html/images/distribute/hero-playtime-opener.jpg
Binary files differ
diff --git a/docs/html/images/distribute/hero-rogervoice-story.jpg b/docs/html/images/distribute/hero-rogervoice-story.jpg
new file mode 100644
index 0000000..2e48b55
--- /dev/null
+++ b/docs/html/images/distribute/hero-rogervoice-story.jpg
Binary files differ
diff --git a/docs/html/images/distribute/hero-secrets-to-app-success.jpg b/docs/html/images/distribute/hero-secrets-to-app-success.jpg
new file mode 100644
index 0000000..4d59e6b
--- /dev/null
+++ b/docs/html/images/distribute/hero-secrets-to-app-success.jpg
Binary files differ
diff --git a/docs/html/images/distribute/secrets_v2_banner.jpg b/docs/html/images/distribute/secrets_v2_banner.jpg
new file mode 100644
index 0000000..cec4d8e
--- /dev/null
+++ b/docs/html/images/distribute/secrets_v2_banner.jpg
Binary files differ
diff --git a/docs/html/images/gp-badges-set.png b/docs/html/images/gp-badges-set.png
index e2e0e94..f1c74a7 100644
--- a/docs/html/images/gp-badges-set.png
+++ b/docs/html/images/gp-badges-set.png
Binary files differ
diff --git a/docs/html/images/training/app/app_icon_action.png b/docs/html/images/training/app/app_icon_action.png
deleted file mode 100644
index 591475d..0000000
--- a/docs/html/images/training/app/app_icon_action.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/app_icon_gather.png b/docs/html/images/training/app/app_icon_gather.png
deleted file mode 100644
index 73a8736..0000000
--- a/docs/html/images/training/app/app_icon_gather.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/app_icon_insight.png b/docs/html/images/training/app/app_icon_insight.png
deleted file mode 100644
index fbdcb80..0000000
--- a/docs/html/images/training/app/app_icon_insight.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/app_logo_black_decal.png b/docs/html/images/training/app/app_logo_black_decal.png
deleted file mode 100644
index 7964ff6..0000000
--- a/docs/html/images/training/app/app_logo_black_decal.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/app_logo_black_decal_no_text.png b/docs/html/images/training/app/app_logo_black_decal_no_text.png
deleted file mode 100644
index a3bcb68..0000000
--- a/docs/html/images/training/app/app_logo_black_decal_no_text.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/app_logo_decal_white.png b/docs/html/images/training/app/app_logo_decal_white.png
deleted file mode 100644
index 7063f0e..0000000
--- a/docs/html/images/training/app/app_logo_decal_white.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/combine_views.png b/docs/html/images/training/app/combine_views.png
deleted file mode 100644
index f4bb620..0000000
--- a/docs/html/images/training/app/combine_views.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/find_in_path_dialog.png b/docs/html/images/training/app/find_in_path_dialog.png
deleted file mode 100644
index 26aa00b..0000000
--- a/docs/html/images/training/app/find_in_path_dialog.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/flatten_view_hierarchy.png b/docs/html/images/training/app/flatten_view_hierarchy.png
deleted file mode 100644
index d6ae80f..0000000
--- a/docs/html/images/training/app/flatten_view_hierarchy.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/gather_insight_action.png b/docs/html/images/training/app/gather_insight_action.png
deleted file mode 100644
index 1ce7ec1..0000000
--- a/docs/html/images/training/app/gather_insight_action.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/gcm_flow.png b/docs/html/images/training/app/gcm_flow.png
deleted file mode 100644
index 991c761..0000000
--- a/docs/html/images/training/app/gcm_flow.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/layout_pass_multiplication.png b/docs/html/images/training/app/layout_pass_multiplication.png
deleted file mode 100644
index c0737fd..0000000
--- a/docs/html/images/training/app/layout_pass_multiplication.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/network_traffic_colors.png b/docs/html/images/training/app/network_traffic_colors.png
deleted file mode 100644
index 1199c6c..0000000
--- a/docs/html/images/training/app/network_traffic_colors.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/network_traffic_gray.png b/docs/html/images/training/app/network_traffic_gray.png
deleted file mode 100644
index dde704d..0000000
--- a/docs/html/images/training/app/network_traffic_gray.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/optimal_network_traffic_pattern.png b/docs/html/images/training/app/optimal_network_traffic_pattern.png
deleted file mode 100644
index 0f68d83..0000000
--- a/docs/html/images/training/app/optimal_network_traffic_pattern.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/overdraw_screen_example_before_after.png b/docs/html/images/training/app/overdraw_screen_example_before_after.png
deleted file mode 100644
index d8eea6b..0000000
--- a/docs/html/images/training/app/overdraw_screen_example_before_after.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/profile_gpu_rendering_annotated_graph.png b/docs/html/images/training/app/profile_gpu_rendering_annotated_graph.png
deleted file mode 100644
index 0642fe0..0000000
--- a/docs/html/images/training/app/profile_gpu_rendering_annotated_graph.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/remove_hidden_views.png b/docs/html/images/training/app/remove_hidden_views.png
deleted file mode 100644
index 8ab5148..0000000
--- a/docs/html/images/training/app/remove_hidden_views.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/stacked_cards.png b/docs/html/images/training/app/stacked_cards.png
deleted file mode 100644
index 5de874a..0000000
--- a/docs/html/images/training/app/stacked_cards.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/app/suboptimal_network_traffic_pattern.png b/docs/html/images/training/app/suboptimal_network_traffic_pattern.png
deleted file mode 100644
index 484019c..0000000
--- a/docs/html/images/training/app/suboptimal_network_traffic_pattern.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/training/wear/ask_again.png b/docs/html/images/training/wear/ask_again.png
new file mode 100644
index 0000000..33c110b
--- /dev/null
+++ b/docs/html/images/training/wear/ask_again.png
Binary files differ
diff --git a/docs/html/images/training/wear/ask_again_2x.png b/docs/html/images/training/wear/ask_again_2x.png
new file mode 100644
index 0000000..8996203
--- /dev/null
+++ b/docs/html/images/training/wear/ask_again_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/ask_in_context.png b/docs/html/images/training/wear/ask_in_context.png
new file mode 100644
index 0000000..61fa478
--- /dev/null
+++ b/docs/html/images/training/wear/ask_in_context.png
Binary files differ
diff --git a/docs/html/images/training/wear/ask_in_context_2x.png b/docs/html/images/training/wear/ask_in_context_2x.png
new file mode 100644
index 0000000..20c1f47
--- /dev/null
+++ b/docs/html/images/training/wear/ask_in_context_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/ask_up_front.png b/docs/html/images/training/wear/ask_up_front.png
new file mode 100644
index 0000000..ced2228
--- /dev/null
+++ b/docs/html/images/training/wear/ask_up_front.png
Binary files differ
diff --git a/docs/html/images/training/wear/ask_up_front_2x.png b/docs/html/images/training/wear/ask_up_front_2x.png
new file mode 100644
index 0000000..ef7eb46
--- /dev/null
+++ b/docs/html/images/training/wear/ask_up_front_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/deny.png b/docs/html/images/training/wear/deny.png
new file mode 100644
index 0000000..a1e9562
--- /dev/null
+++ b/docs/html/images/training/wear/deny.png
Binary files differ
diff --git a/docs/html/images/training/wear/deny_2x.png b/docs/html/images/training/wear/deny_2x.png
new file mode 100644
index 0000000..721c271
--- /dev/null
+++ b/docs/html/images/training/wear/deny_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/educate_in_context.png b/docs/html/images/training/wear/educate_in_context.png
new file mode 100644
index 0000000..c8ac641
--- /dev/null
+++ b/docs/html/images/training/wear/educate_in_context.png
Binary files differ
diff --git a/docs/html/images/training/wear/educate_in_context_2x.png b/docs/html/images/training/wear/educate_in_context_2x.png
new file mode 100644
index 0000000..92baead
--- /dev/null
+++ b/docs/html/images/training/wear/educate_in_context_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/educate_up_front.png b/docs/html/images/training/wear/educate_up_front.png
new file mode 100644
index 0000000..2e4fdf7
--- /dev/null
+++ b/docs/html/images/training/wear/educate_up_front.png
Binary files differ
diff --git a/docs/html/images/training/wear/educate_up_front_2x.png b/docs/html/images/training/wear/educate_up_front_2x.png
new file mode 100644
index 0000000..1f6f491
--- /dev/null
+++ b/docs/html/images/training/wear/educate_up_front_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/for_services.png b/docs/html/images/training/wear/for_services.png
new file mode 100644
index 0000000..0aaae10
--- /dev/null
+++ b/docs/html/images/training/wear/for_services.png
Binary files differ
diff --git a/docs/html/images/training/wear/for_services_2x.png b/docs/html/images/training/wear/for_services_2x.png
new file mode 100644
index 0000000..a7f92f2
--- /dev/null
+++ b/docs/html/images/training/wear/for_services_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/for_settings.png b/docs/html/images/training/wear/for_settings.png
new file mode 100644
index 0000000..fde50c7
--- /dev/null
+++ b/docs/html/images/training/wear/for_settings.png
Binary files differ
diff --git a/docs/html/images/training/wear/for_settings_2x.png b/docs/html/images/training/wear/for_settings_2x.png
new file mode 100644
index 0000000..c2daa7c
--- /dev/null
+++ b/docs/html/images/training/wear/for_settings_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/multiple_permissions.png b/docs/html/images/training/wear/multiple_permissions.png
new file mode 100644
index 0000000..65e3e08
--- /dev/null
+++ b/docs/html/images/training/wear/multiple_permissions.png
Binary files differ
diff --git a/docs/html/images/training/wear/multiple_permissions_2x.png b/docs/html/images/training/wear/multiple_permissions_2x.png
new file mode 100644
index 0000000..cbaace8
--- /dev/null
+++ b/docs/html/images/training/wear/multiple_permissions_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/open_on_phone.png b/docs/html/images/training/wear/open_on_phone.png
new file mode 100644
index 0000000..1899839
--- /dev/null
+++ b/docs/html/images/training/wear/open_on_phone.png
Binary files differ
diff --git a/docs/html/images/training/wear/open_on_phone_2x.png b/docs/html/images/training/wear/open_on_phone_2x.png
new file mode 100644
index 0000000..e5c2c96
--- /dev/null
+++ b/docs/html/images/training/wear/open_on_phone_2x.png
Binary files differ
diff --git a/docs/html/images/training/wear/phone_requests_wear.png b/docs/html/images/training/wear/phone_requests_wear.png
new file mode 100644
index 0000000..4d0b09d
--- /dev/null
+++ b/docs/html/images/training/wear/phone_requests_wear.png
Binary files differ
diff --git a/docs/html/images/training/wear/phone_requests_wear_2x.png b/docs/html/images/training/wear/phone_requests_wear_2x.png
new file mode 100644
index 0000000..1c98f4a
--- /dev/null
+++ b/docs/html/images/training/wear/phone_requests_wear_2x.png
Binary files differ
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index 9f39602..6f9915c 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -16,10 +16,10 @@
"index/secondary/carousel": {
"title": "",
"resources": [
- "http://www.youtube.com/watch?v=0r36OJaeMo4",
- "http://www.youtube.com/watch?v=1Iw7Tg_afKk",
- "http://www.youtube.com/watch?v=TieksFvD-7o",
- "http://www.youtube.com/watch?v=MCoh4Pxs_ok"
+ "http://www.youtube.com/watch?v=yJisuP94lHU",
+ "http://www.youtube.com/watch?v=rcU7VEs1hiE",
+ "http://www.youtube.com/watch?v=JFlX9rW7Epc",
+ "http://www.youtube.com/watch?v=4CqXCkcN_d4"
]
},
"index/multiscreen": {
@@ -95,6 +95,14 @@
"http://android-developers.blogspot.com/2015/03/a-new-reference-app-for-multi-device.html"
]
},
+ "develop/landing/devpatterns": {
+ "title": "",
+ "resources": [
+ "https://www.youtube.com/watch?v=kmUGLURRPkI",
+ "https://www.youtube.com/watch?v=HGElAW224dE",
+ "https://www.youtube.com/watch?v=zQekzaAgIlQ"
+ ]
+ },
"develop/landing/performance": {
"title": "",
"resources": [
@@ -179,10 +187,10 @@
"distribute/landing/carousel": {
"title": "",
"resources": [
- "https://www.youtube.com/watch?v=QDM52bblwlg",
- "https://www.youtube.com/watch?v=wcjqBSei3a0&list=PLOU2XLYxmsIKLNUPiFCWVtcO7mZRZ9MmS",
- "https://www.youtube.com/watch?v=B6ydLpkhq04&list=PLOU2XLYxmsIKLNUPiFCWVtcO7mZRZ9MmS",
- "https://www.youtube.com/watch?v=jyO3-rF4Mu0&list=PLOU2XLYxmsIKLNUPiFCWVtcO7mZRZ9MmS",
+ "distribute/googleplay/guide.html",
+ "http://www.youtube.com/watch?v=JrR6o5tYMWQ",
+ "https://www.youtube.com/watch?v=B6ydLpkhq04&list=PLOU2XLYxmsIKLNUPiFCWVtcO7mZRZ9MmS",
+ "http://www.youtube.com/watch?v=yJisuP94lHU",
]
},
"distribute/landing/googleplay": {
@@ -300,6 +308,7 @@
"distribute/googleplay/edu/about.html",
"distribute/googleplay/cast.html",
"distribute/googleplay/cardboard.html",
+ "distribute/googleplay/guide.html"
]
},
"distribute/googleplay/gpfw": {
@@ -455,7 +464,7 @@
"https://support.google.com/googleplay/android-developer",
"distribute/tools/promote/brand.html",
"distribute/tools/promote/device-art.html",
- "distribute/tools/promote/badges.html",
+ "https://play.google.com/intl/en_us/badges/",
"distribute/tools/promote/linking.html",
"distribute/tools/open-distribution.html",
"about/dashboards/index.html"
@@ -1433,12 +1442,6 @@
"training/wearables/ui/index.html"
]
},
- "play_dev_guide": {
- "title": "",
- "resources": [
- "shareables/distribute/play_dev_guide_secrets_en.pdf"
- ]
- },
"design/auto/auto_ui_guidelines": {
"title": "",
"resources": [
@@ -1635,9 +1638,9 @@
"marshmallow/landing/resources": {
"title": "",
"resources": [
+ "about/versions/marshmallow/android-6.0-changes.html",
"about/versions/marshmallow/android-6.0.html",
- "about/versions/marshmallow/samples.html",
- "https://developers.google.com/android/nexus/images"
+ "about/versions/marshmallow/samples.html"
]
},
"marshmallow/landing/videos": {
@@ -1667,7 +1670,8 @@
"training/monitoring-device-state/doze-standby.html",
"training/app-links/index.html",
"training/articles/assistant.html",
- "training/testing/performance.html"
+ "training/testing/performance.html",
+ "https://developers.google.com/android/nexus/images"
]
},
}
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index dda5277..e102b2f 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -247,6 +247,42 @@
"type":"video"
},
{
+ "title":"Toolbars for a flexible Action Bar & more",
+ "titleFriendly":"",
+ "summary":"Toolbars are a flexible View you can add to your Android app which provides many of the same APIs as the system provided Action Bar, but can also do so much more such as reacting to scrolling or being integrated directly into your layouts.",
+ "url":"https://www.youtube.com/watch?v=kmUGLURRPkI",
+ "group":"",
+ "keywords": [],
+ "tags": [
+ ],
+ "image":"http://i1.ytimg.com/vi/kmUGLURRPkI/maxresdefault.jpg",
+ "type":"video"
+ },
+ {
+ "title":"Protecting Implicit Intents with Runtime Checks",
+ "titleFriendly":"",
+ "summary":"Make sure you protect your implicit intents with a simple runtime check.",
+ "url":"https://www.youtube.com/watch?v=HGElAW224dE",
+ "group":"",
+ "keywords": [],
+ "tags": [
+ ],
+ "image":"http://i1.ytimg.com/vi/HGElAW224dE/maxresdefault.jpg",
+ "type":"video"
+ },
+ {
+ "title":"Tabs and ViewPager",
+ "titleFriendly":"",
+ "summary":"Showing multiple screens or pages of content is easy with the help of ViewPager and a PagerAdapter. Combining that with tabs make for an effective top level navigation strategy for your app or for moving between content at the same level of hierarchy within your app.",
+ "url":"https://www.youtube.com/watch?v=zQekzaAgIlQ",
+ "group":"",
+ "keywords": [],
+ "tags": [
+ ],
+ "image":"http://i1.ytimg.com/vi/zQekzaAgIlQ/maxresdefault.jpg",
+ "type":"video"
+ },
+ {
"title":"Battery Drain and Networking",
"titleFriendly":"",
"summary":"Let’s take a moment to make something insanely clear: As far as battery is concerned, NETWORKING is the biggest, baddest, dirtiest offender there is. And optimizing performance here isn’t easy. Since the chip isn’t always awake and draining power, means you can optimize how it wakes up, sends traffic, and saves battery.",
@@ -425,6 +461,17 @@
"type":"google"
},
{
+ "title":"Google Play Badge Generator",
+ "titleFriendly":"",
+ "summary":"Build badges for your app in just a few clicks, or download hi-res badge assets localized for a variety of languages.",
+ "url":"https://play.google.com/intl/en_us/badges/",
+ "group":"",
+ "keywords": [],
+ "tags": ["#developersupport"],
+ "image":"images/gp-badges-set.png",
+ "type":"google"
+ },
+ {
"lang": "en",
"group": "",
"tags": ["#developersupport #termsandpolicies"],
@@ -586,13 +633,13 @@
{
"lang": "en",
"group": "",
- "tags": [],
+ "tags": ["devices", "nexus", "testing"],
"url": "https://developers.google.com/android/nexus/images",
"timestamp": 1194884220000,
"image": "images/cards/card-download_16-9_2x.png",
- "title": "System Images",
- "summary": "Download system images for Marshmallow.",
- "keywords": [],
+ "title": "Factory Images for Nexus Devices",
+ "summary": "System image files for Android 6.0 and other Android releases.",
+ "keywords": ["nexus, downloads"],
"type": "support",
"titleFriendly": ""
},
@@ -1931,15 +1978,15 @@
{
"lang": "en",
"group": "",
- "tags": [],
- "url": "shareables/distribute/play_dev_guide_secrets_en.pdf",
- "timestamp": null,
- "image": "distribute/images/play_dev_guide_b.jpg",
+ "tags": ["play,protips"],
+ "url": "shareables/distribute/secrets_play/v2/web/secrets_to_app_success_v2_en.pdf",
+ "timestamp": 1447437450,
+ "image": "images/distribute/secrets_v2_banner.jpg",
"title": "The Secrets to App Success on Google Play",
- "summary": "A guide to useful features, tips, and best practices that will help you grow a successful app business on Google Play.",
- "keywords": ["distribute"],
- "type": "PDF DOWNLOAD (11MB)",
- "titleFriendly": ""
+ "summary": "Get the updated guide full of useful features, tips, and best practices that will help you grow a successful app or game business on Google Play.",
+ "keywords": ["secrets, success, play, google"],
+ "type": "Book",
+ "category": "distribute"
},
{
"lang": "en",
@@ -3589,10 +3636,31 @@
"tags":["io15","android", "googleplay","games"],
"keywords":["Google I/O","google play","games"],
"type":"youtube"
- }
+ },
+ {
+ "url":"http://www.youtube.com/watch?v=yJisuP94lHU",
+ "image": "images/distribute/hero-playtime-opener.jpg",
+ "title": "Playtime 2015: Innovation happens everywhere",
+ "type":"Video",
+ "tags":["googleplay"],
+ "summary": "Watch the opening video from Google Play's annual event series, Playtime, which celebrates inspirational developers who are changing the world around them.",
+ },
+{
+ "url":"http://www.youtube.com/watch?v=JrR6o5tYMWQ",
+ "image": "images/distribute/hero-acquisition-devbyte.jpg",
+ "title": "User acquisition and tracking on Google Play",
+ "type" : "Video",
+ "tags" : "users,googleplay,googleio",
+ "summary": "Learn how to get new users, using Universal app campaigns directly within the Google Play Developer Console to increase your installs from ads, and find out how your acquisition channels perform.",
+ },
]);
var CAROUSEL_OVERRIDE = {
+ "distribute/googleplay/guide.html": {
+ "image": "images/distribute/hero-secrets-to-app-success.jpg",
+ "title": "The Secrets to App Success on Google Play",
+ "summary": "Get the updated guide full of useful features, tips, and best practices that will help you grow a successful app or game business on Google Play.",
+ },
"about/versions/lollipop.html": {
"image": "images/home/hero-lollipop_2x.png",
"heroColor": "#263238",
@@ -3600,6 +3668,41 @@
"title": "Android 5.0 Lollipop",
"summary": "The Android 5.0 update adds a variety of new features for your apps, such as notifications on the lock screen, an all-new camera API, OpenGL ES 3.1, the new naterial design interface, and much more.",
},
+ "http://www.youtube.com/watch?v=yJisuP94lHU": {
+ "url":"https://www.youtube.com/watch?v=yJisuP94lHU&index=1&list=PLWz5rJ2EKKc_QRBk7Zkl5uGjR1He7vG-w",
+ "image": "images/distribute/hero-playtime-opener.jpg",
+ "title": "Playtime 2015: Innovation happens everywhere",
+ "type":"youtube",
+ "summary": "Watch the opening video from Google Play's annual event series, Playtime, which celebrates inspirational developers who are changing the world around them.",
+ },
+ "http://www.youtube.com/watch?v=rcU7VEs1hiE": {
+ "url":"http://www.youtube.com/watch?v=rcU7VEs1hiE&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c",
+ "image": "images/distribute/hero-rogervoice-story.jpg",
+ "title": "RogerVoice uses beta testing to launch on Android first",
+ "type" : "youtube",
+ "summary": "RogerVoice helps people who are hearing impaired make phone calls through voice recognition and text captions. Hear how they used material design and beta testing to create a UI that's accessible and intuitive to navigate.",
+ },
+ "http://www.youtube.com/watch?v=JFlX9rW7Epc": {
+ "url":"http://www.youtube.com/watch?v=JFlX9rW7Epc&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c",
+ "image": "images/distribute/hero-domain-story.jpg",
+ "title": "Domain increases installs by 44% with Material Design",
+ "type" : "youtube",
+ "summary": "Learn how Domain, a premier real-estate portal in Australia, drastically improved their Google Play app reviews, ratings and downloads by investing in their Android app experience.",
+ },
+ "http://www.youtube.com/watch?v=4CqXCkcN_d4": {
+ "url":"http://www.youtube.com/watch?v=4CqXCkcN_d4&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c",
+ "image": "images/distribute/hero-dots-story.jpg",
+ "title": "Dots increases installs with Store Listing Experiments",
+ "type" : "youtube",
+ "summary": "Hear how US-founded game developer, Dots, used the Store Listing Experiments feature in the Google Play Developer Console to test what icon, graphics, and text worked the best at converting visitors to installs.",
+ },
+ "http://www.youtube.com/watch?v=JrR6o5tYMWQ": {
+ "url":"http://www.youtube.com/watch?v=JrR6o5tYMWQ",
+ "image": "images/distribute/hero-acquisition-devbyte.jpg",
+ "title": "User acquisition and tracking on Google Play",
+ "type" : "youtube",
+ "summary": "Learn how to get new users, using Universal app campaigns directly within the Google Play Developer Console to increase your installs from ads, and find out how your acquisition channels perform.",
+ },
"http://www.youtube.com/watch?v=Pd49vTkvu0U": {
"url":"http://www.youtube.com/watch?v=Pd49vTkvu0U&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c",
"image": "images/distribute/hero-jelly-button.jpg",
@@ -3623,12 +3726,6 @@
"title": "How GinLemon is breaking through with Google Play",
"summary": "Meet Vincenzo Colucci, developer and founder of GinLemon, which started as a summer holiday joke and has now become a successful global app business on Google Play based in Manfredonia, southern Italy.",
},
- "distribute/googleplay/guide.html": {
- "heroColor": "#fcb94e",
- "image": "images/distribute/hero-g-play-guidebooks_2x.png",
- "title": "Finding success on Google Play",
- "summary": "We’ve created a downloadable guide to help you find success with your app or game business on Google Play. In it, you’ll find features, tips, and best practices to help you build an effective strategy.",
- },
"http://www.youtube.com/watch?v=0r36OJaeMo4": {
"url":"http://www.youtube.com/watch?v=0r36OJaeMo4&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c",
"image": "images/distribute/hero-shifty-jelly.jpg",
diff --git a/docs/html/tools/support-library/index.jd b/docs/html/tools/support-library/index.jd
index f6baf19..d702b40 100644
--- a/docs/html/tools/support-library/index.jd
+++ b/docs/html/tools/support-library/index.jd
@@ -58,10 +58,54 @@
<p>This section provides details about the Support Library package releases.</p>
-
<div class="toggle-content opened">
- <p id="rev23-1-0"><a href="#" onclick="return toggleContent(this)">
+ <p id="rev23"><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" alt=""
+/>Android Support Library, revision 23.1.1</a> <em>(November 2015)</em>
+ </p>
+ <div class="toggle-content-toggleme">
+ <dl>
+ <dt>Changes for <a href="features.html#v7-recyclerview">v7 recyclerview library:</a></dt>
+ <dd>
+ <ul>
+ <li>Fixed a crash that occurs when you perform a swipe-to-dismiss action that the
+ {@code ItemTouchHelper} utility class provides, and then add an item.
+ (<a href="http://b.android.com/190500">Issue 190500</a>)</li>
+ </ul>
+ </dd>
+ <dt>Changes for <a href="features.html#v7-preference">v7 preference library:</a></dt>
+ <dd>
+ <ul>
+ <li>Fixed an issue with ProGuard usage.
+ (<a href="http://b.android.com/183261">Issue 183261</a>)</li>
+ </ul>
+ </dd>
+
+ <dt>Changes for <a href="features.html#v17-leanback">v17 Leanback Support library:</a></dt>
+ <dd>
+ <ul>
+ <li>Fixed a number of internal issues in this library.</li>
+ </ul>
+ </dd>
+ <dt>Changes for <a href="features.html#design">Design Support library:</a></dt>
+ <dd>
+ <ul>
+ <li>Added the <code>getHeaderView</code> method to the <code>NavigationView</code> class.</li>
+ <li>Fixed a transparent background issue for a <code>FloatingActionButton</code> object on
+ devices running Android 4.0 (API level 15) and lower.
+ (<a href="http://b.android.com/183315">Issue 183315</a>)</li>
+ </ul>
+ </dd>
+ </dl>
+
+ </div>
+</div> <!-- end of collapsible section -->
+
+
+
+<div class="toggle-content closed">
+ <p id="rev23-1-0"><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt=""
/>Android Support Library, revision 23.1.0</a> <em>(October 2015)</em>
</p>
<div class="toggle-content-toggleme">
diff --git a/docs/html/training/app/battery/index.jd b/docs/html/training/app/battery/index.jd
deleted file mode 100644
index c8445d7..0000000
--- a/docs/html/training/app/battery/index.jd
+++ /dev/null
@@ -1,4 +0,0 @@
-page.title=Optimizing Battery Life
-page.tags=battery
-
-@jd:body
diff --git a/docs/html/training/app/index.jd b/docs/html/training/app/index.jd
deleted file mode 100644
index 2675a78..0000000
--- a/docs/html/training/app/index.jd
+++ /dev/null
@@ -1,4 +0,0 @@
-page.title=Android Performance Patterns
-page.tags=app
-
-@jd:body
diff --git a/docs/html/training/app/rendering/index.jd b/docs/html/training/app/rendering/index.jd
deleted file mode 100644
index 733131e..0000000
--- a/docs/html/training/app/rendering/index.jd
+++ /dev/null
@@ -1,4 +0,0 @@
-page.title=Optimizing Rendering Performance
-page.tags=render
-
-@jd:body
diff --git a/docs/html/training/articles/wear-permissions.jd b/docs/html/training/articles/wear-permissions.jd
new file mode 100644
index 0000000..5f226e4
--- /dev/null
+++ b/docs/html/training/articles/wear-permissions.jd
@@ -0,0 +1,323 @@
+page.title=Requesting Permissions on Android Wear
+page.tags="Permissions"
+
+page.article=true
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>In this document</h2>
+<ol class="nolist">
+ <li><a href="#scenarios">Permission Scenarios</a></li>
+ <li><a href="#requesting">Requesting Permissions</a></li>
+ <li><a href="#services">Permissions for Services</a></li>
+ <li><a href="#settings">Settings</a></li>
+</ol>
+<!-- Required platform, tools, add-ons, devices, knowledge, etc. -->
+<h2>Dependencies and prerequisites</h2>
+<ul>
+ <li><a href="{@docRoot}about/versions/marshmallow/index.html">Android 6.0</a>
+ (API Level 23) or higher on the wearable and accompanying device</li>
+ <li><a href="{@docRoot}google/play-services/index.html">Google Play
+services</a> 8.3 or higher</li>
+ <li>An <a href="{@docRoot}wear/index.html">Android Wear</a> device</li>
+</ul>
+<h2>See also</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/security/permissions.html">System Permissions</a></li>
+ <li><a href="{@docRoot}training/permissions/index.html">Working with System Permissions</a></li>
+</ul>
+</div></div>
+
+<p><a href="{@docRoot}about/versions/marshmallow/index.html">Android 6.0</a> (API level 23)
+introduces a new <a href="{@docRoot}training/permissions/requesting.html">permissions model</a>,
+bringing some changes that are specific to Wear, and other changes that apply to all Android-powered
+devices.</p>
+
+<p>The user must now grant permissions to Wear apps separately from the handset versions of the
+apps. Previously, when a user installed a Wear app, it automatically inherited the set of
+permissions that the user had granted to the handset version of the app. However, from Android 6.0
+(API level 23), the Wear app no longer inherits these permissions. Thus, for example,
+a user might grant a handset app permission to use location data, and subsequently
+have to grant the same permission to the Wear version of the app.</p>
+
+<p>For both Wear and handset apps, the Android 6.0 (API level 23) permissions model also
+streamlines app installation and upgrade by eliminating the requirement that the user grant upfront
+every permission an app may ever need. Instead, the app does not request permissions until it
+actually needs them.</p>
+
+<p class="note"><strong>Note: </strong> For an app to use the new permissions model, it must
+specify a value of {@code 23} for both
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code uses-sdk-element}</a>
+and <a href="{@docRoot}tools/building/configuring-gradle.html">{@code compileSdkVersion}</a>.</p>
+
+<p>The rest of this document discusses how to use the Android 6.0 (API level 23) permissions model
+when developing Android Wear apps.</p>
+
+<h2 id="scenarios">Permission Scenarios</h2>
+
+<p>Broadly speaking, there are four scenarios you may encounter when requesting
+<a href="{@docRoot}guide/topics/security/permissions.html#normal-dangerous">dangerous permissions</a>
+on Android Wear:</p>
+
+<ul>
+ <li>The <em>Wear app</em> requests permissions for an app running on the <em>wearable</em>
+ device.</li>
+
+ <li>The <em>Wear app</em> requests permissions for an app running on the <em>handset</em>.</li>
+
+ <li>The <em>handset app</em> requests permissions for an app running on the
+ <em>wearable</em> device.</li>
+
+ <li>The wearable app uses a <em>different permission model</em> from its handset counterpart.
+ </li>
+</ul>
+
+<p>The rest of this section explains each of these scenarios. For more detailed information
+about requesting permissions, see <a href="#requesting">Requesting Permissions</a>.</p>
+
+<h3 id="wear-app-wear-perm">Wear app requests permission for an app running on the wearable
+device</h3>
+
+<p>When the Wear app requests a permission for an app running on the wearable device, the system
+displays a dialog to prompt the user for that permission. An app or service can only call the
+{@link android.support.v4.app.ActivityCompat#requestPermissions requestPermissions()}
+method from an activity. If the user interacts with your app
+<a href="#services">via a service</a>, such as
+a watch face, the service must open an activity before requesting the permission.</p>
+
+<p>Your app requests permissions in context when it’s clear why the
+permissions are needed to perform a given operation. If it's obvious that your app requires
+certain permissions, your app can prompt for them on launch. If it may not be so obvious,
+you may choose to provide additional education before prompting for a permission.</p>
+
+<p>If an app or watch face requires more than one permission at a time,
+permission requests appear one after the other.</p>
+
+<img src="{@docRoot}images/training/wear/multiple_permissions.png"
+srcset="{@docRoot}images/training/wear/multiple_permissions.png 1x,
+{@docRoot}images/training/wear/multiple_permissions_2x.png 2x"
+alt="Multiple permission screens, one after another." width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Permission screens appearing in succession.
+</p>
+
+<p class="note"><strong>Note:</strong> From Android 6.0 (API level 23), Android Wear
+automatically syncs Calendar, Contact, and Location data to the Wear device. As a result, this
+scenario is the applicable one when Wear requests this data.</p>
+
+<h3>Wear app requests handset permission</h3>
+
+<p>When the Wear app requests a handset permission, the
+Wear app must send the user to the handset to accept the permission. There, the handset app can
+provide additional education to the user via an activity. The activity should include two buttons:
+one for granting, and one for denying, the permission.</p>
+
+<img src="{@docRoot}images/training/wear/open_on_phone.png"
+srcset="{@docRoot}images/training/wear/open_on_phone.png 1x,
+{@docRoot}images/training/wear/open_on_phone_2x.png 2x"
+alt="The Wear app sends the user to the handset to grant permission." width="700"
+height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 2.</strong> Sending the user to the handset to grant permission.
+</p>
+<h3>Handset app requests wearable permission</h3>
+
+<p>When the user is in a handset app and the app requires a wearable permission, the
+handset app must send the user to the wearable to accept the permission.
+The handset app uses the
+{@link android.support.v4.app.ActivityCompat#requestPermissions requestPermissions()}
+method on the wearable to trigger the system permissions dialog.</p>
+
+<img src="{@docRoot}images/training/wear/phone_requests_wear.png"
+srcset="{@docRoot}images/training/wear/phone_requests_wear.png 1x,
+{@docRoot}images/training/wear/phone_requests_wear_2x.png 2x"
+alt="The handset app sends the user to the wearable to grant permission."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 3.</strong> Sending the user to the wearable to grant permission.
+</p>
+
+<h3>Mismatching permission models between wearable and handset app</h3>
+
+<p>If your handset app begins using the Android 6.0 (API level 23) model but your
+wearable app does not, the system downloads the Wear app, but does not install it.
+The first time the user launches the app, the system prompts them to grant all pending permissions.
+Once they do so, it installs the app.
+If your app, for example a watch face, does not have a launcher, the system displays a
+stream notification asking the user to grant the permissions the app needs.
+</p>
+
+<h2 id="requesting">Permission-Request Patterns</h2>
+
+<p>There are different patterns for requesting permission from users. In order of
+priority, they are:</p>
+
+<ul>
+ <li><a href="#aic">Ask in context</a> when the permission is obviously necessary for a specific
+ functionality, but is not necessary for the app to run at all.</li>
+
+ <li><a href="#eic">Educate in context</a> when the reason for requesting the permission is
+ not obvious, and the permission is not necessary for the app to run at all.</li>
+
+ <li><a href="#auf">Ask up front</a> when the need for the permission is obvious, and the
+ permission is required in order for the app to run at all.</li>
+
+ <li><a href="#euf">Educate up front</a> when the need for the permission is not obvious, but
+ the permission is required in order for the app to run at all.</li>
+</ul>
+
+<h3 id="aic">Ask in context</h3>
+
+<p>Your app should request permissions when it’s clear why they are needed in order to perform a
+given operation. Users are more likely to grant a permission when they understand its connection to
+the feature they want to use.</p>
+
+<p>For example, an app may require a user’s location in order to show nearby
+places of interest. When the user taps to search for nearby places, the app can
+immediately request the location permission, because there is a clear
+relationship between searching for nearby places and the need for the location
+permission. The obviousness of this relationship makes it unnecessary for the app to display
+additional education screens.</p>
+
+<img src="{@docRoot}images/training/wear/ask_in_context.png"
+srcset="{@docRoot}images/training/wear/ask_in_context.png 1x,
+{@docRoot}images/training/wear/ask_in_context_2x.png 2x"
+alt="The app requests permission when it's obviously necessary."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 4.</strong> Asking in context.
+
+<h3 id="eic">Educate in context</h3>
+
+<p>If necessary, you may choose to provide additional education before prompting
+for a permission. Again, your app should do this in context of a specific
+action, if it’s unclear why your app needs access to the requested permission
+in order to complete that action.</p>
+
+<p>Figure 5 shows an example of in-context education. The app does not require permissions
+in order to start the timer, but an inline educational cue shows that part of the
+activity (location detection) is locked. When the user taps the cue, a permission-request screen
+appears, allowing the user to unlock location-detection.</p>
+
+<p>You can use the {@link
+ android.support.v4.app.ActivityCompat#shouldShowRequestPermissionRationale
+ shouldShowRequestPermissionRationale()} method to help your app decide whether to provide more
+ information. For additional details, see <a
+ href="{@docRoot}training/permissions/requesting.html#explain">Requesting Permissions
+ at Run Time</a>.</p>
+
+
+<img src="{@docRoot}images/training/wear/educate_in_context.png"
+srcset="{@docRoot}images/training/wear/educate_in_context.png 1x,
+{@docRoot}images/training/wear/educate_in_context_2x.png 2x"
+alt="When the need for the permission arises, the app explains why the permission is necessary."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 5.</strong> Educating in context.
+
+<h3 id="auf">Ask up front</h3>
+
+<p>If your app clearly requires a permission in order to work at all, you can prompt for that
+permission when the user launches the app. For example, a maps app clearly requires access
+to the device’s location to run its expected activities. No further education
+is necessary for this permission.</p>
+
+<img src="{@docRoot}images/training/wear/ask_up_front.png"
+srcset="{@docRoot}images/training/wear/ask_up_front.png 1x,
+{@docRoot}images/training/wear/ask_up_front_2x.png 2x"
+alt="If the app obviously needs a permission to run at all, it can ask for it immediately on
+launch."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 6.</strong> Asking up front.
+
+
+<h3 id="euf">Educate up front</h3>
+
+<p>In some cases, the app requires a permission for basic functionality, but the need for that
+permission is not obvious. In these cases, when the user first
+starts the app or sets a watch face, the app or watch face may choose to educate the user and
+ask for the permission.</p>
+
+<img src="{@docRoot}images/training/wear/educate_up_front.png"
+srcset="{@docRoot}images/training/wear/educate_up_front.png 1x,
+{@docRoot}images/training/wear/educate_up_front_2x.png 2x"
+alt="When requesting a permission on launch, the app can explain why it needs the permission."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 7.</strong> Educating up front.
+
+<h3 id="nope">Handling Rejection</h3>
+
+<p>If a user denies a requested permission that is not critical to an intended
+activity, do not block them from continuing the activity. If certain parts of
+the activity are disabled by the denied permission, provide visual, actionable
+feedback. Figure 8 shows the use of a lock icon to indicate that a feature is
+locked because the user did not grant permission to use it.</p>
+
+<img src="{@docRoot}images/training/wear/deny.png"
+srcset="{@docRoot}images/training/wear/deny.png 1x,
+{@docRoot}images/training/wear/deny_2x.png 2x"
+alt="When the user denies permission, a lock icon is shown alongside the associated feature."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 8.</strong> Lock icon, showing a feature is locked because of denied permission.
+</p>
+<p>When a previously denied wearable permission dialog appears a second
+time, it includes a <strong>Deny, don't show again</strong> option. If the user
+chooses this option, then the only way for them to allow this permission in the
+future is to go into the wearable's Settings app.</p>
+
+<img src="{@docRoot}images/training/wear/ask_again.png"
+srcset="{@docRoot}images/training/wear/ask_again.png 1x,
+{@docRoot}images/training/wear/ask_again_2x.png 2x"
+alt="The system offers to stop requesting permission."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 9.</strong> Offering not to show the permission-request screen anymore.
+
+<h2 id="services">Permissions for Services</h2>
+
+<p>As mentioned above, only an activity can call the
+{@link android.support.v4.app.ActivityCompat#requestPermissions requestPermissions()}
+method, so if the user interacts with your app via a service,
+for example a watch face, the service must open a background activity before requesting
+the permission. This activity could provide additional education, or it could simply
+be an invisible activity that brings up the system dialog.</p>
+
+<p>If your wearable app runs a service that is not a watch face, and the user does not launch
+an app in which it might make sense to request a permission,
+you can post an educational notification on the wearable. The notification can
+provide an action to open an activity that then triggers the system permissions
+dialog.</p>
+
+<p class="note"><strong>Note:</strong> This is the only acceptable use of a stream notification
+for permissions requests.</p>
+
+<img src="{@docRoot}images/training/wear/for_services.png"
+srcset="{@docRoot}images/training/wear/for_services.png 1x,
+{@docRoot}images/training/wear/for_services_2x.png 2x"
+alt="The user may need to grant a permission when indirectly interacting with an app, via a
+service."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 10.</strong> A service requesting permission.
+
+<h2 id="settings">Settings</h2>
+
+<p>As with the handset, the user can change a Wear app’s permissions in Settings at any time.
+Therefore, when the user tries to do something that requires a
+permission, the app should always first call the
+{@link android.support.v4.content.ContextCompat#checkSelfPermission(android.content.Context,java.lang.String) checkSelfPermission()}
+method to see if the app currently has permission to perform this operation. The app should perform
+this check even if it knows the user has previously granted that permission, since the
+user might have subsequently revoked that permission.</p>
+
+<img src="{@docRoot}images/training/wear/for_settings.png"
+srcset="{@docRoot}images/training/wear/for_settings.png 1x,
+{@docRoot}images/training/wear/for_settings_2x.png 2x"
+alt="The user can change permissions through the Settings app."
+width="700" height="" id="permission-flow" />
+<p class="img-caption">
+ <strong>Figure 11.</strong> Changing settings via the Settings app.
diff --git a/docs/html/training/auto/audio/index.jd b/docs/html/training/auto/audio/index.jd
index 68aff75..d183f11 100644
--- a/docs/html/training/auto/audio/index.jd
+++ b/docs/html/training/auto/audio/index.jd
@@ -491,7 +491,13 @@
<a href="{@docRoot}training/managing-audio/index.html">Managing Audio Playback</a>, and
<a href="{@docRoot}guide/topics/media/exoplayer.html">ExoPlayer</a>.</p>
-
+<a class="notice-developers-video wide"
+href="https://www.youtube.com/watch?v=xc2HZSwPcwM">
+<div>
+ <h3>Video</h3>
+ <p>Devbytes: Android Auto Voice Actions</p>
+</div>
+</a>
<h2 id="support_voice">Support Voice Actions</h2>
<p>To reduce driver distractions, you can add voice actions in your audio playback app. With voice
diff --git a/docs/html/training/auto/index.jd b/docs/html/training/auto/index.jd
index c34911c..0a7ceb3 100644
--- a/docs/html/training/auto/index.jd
+++ b/docs/html/training/auto/index.jd
@@ -27,8 +27,7 @@
For more information, follow the links below to learn how to extend your Android app to support
use in vehicles.
</p>
-
-
+
<h2 id="overview">Get Started</h2>
<p>
@@ -82,3 +81,20 @@
data-cardSizes="9x3"
data-maxResults="6">
</div>
+
+<h2 id="training">Video Training</h2>
+
+<div class="wrap">
+ <div class="cols">
+ <div class="col-1of2">
+ <p>If you prefer to learn through interactive video training,
+ check out this online course about extending your apps to work with Android Auto.</p>
+ <p><a href="https://www.udacity.com/course/ud875C" class="button">
+ Start the video course</a>
+ </p>
+ </div>
+ <div class="col-1of2">
+ <iframe width="300" height="169" src="https://www.youtube.com/embed/pK2HQMTdq6Y?utohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git a/docs/html/training/building-wearables.jd b/docs/html/training/building-wearables.jd
index c9e1856..9044928 100644
--- a/docs/html/training/building-wearables.jd
+++ b/docs/html/training/building-wearables.jd
@@ -12,3 +12,17 @@
<p class="note"><strong>Note:</strong> For more information about the APIs used in these training
classes, see the <a href="{@docRoot}reference/packages-wearable-support.html">Wear API reference
documentation</a>.</p>
+
+<div class="wrap">
+ <div class="cols">
+ <div class="col-1of2">
+ <p>If you prefer to learn through interactive video training, check out this online course
+ about Android Wear Development.</p>
+ <p><a href="https://www.udacity.com/course/ud875A" class="button">
+ Start the video course</a>
+ </p>
+ </div>
+ <div class="col-1of2">
+ <iframe width="300" height="169" src="//www.youtube.com/embed/t2JaW-8WDok?utm_source=dac&utm_medium=video&utm_content=build_wear&utm_campaign=udacint?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>
+ </div>
+</div>
diff --git a/docs/html/training/in-app-billing/preparing-iab-app.jd b/docs/html/training/in-app-billing/preparing-iab-app.jd
index 17cd0d51..ca33008 100644
--- a/docs/html/training/in-app-billing/preparing-iab-app.jd
+++ b/docs/html/training/in-app-billing/preparing-iab-app.jd
@@ -30,18 +30,35 @@
</div>
</div>
+<a class="notice-developers-video wide"
+href="https://www.youtube.com/watch?v=UvCl5Xx7Z5o">
+<div>
+ <h3>Video</h3>
+ <p>Implementing Freemium</p>
+ </div>
+ </a>
+
<p>Before you can start using the In-app Billing service, you'll need to add the library that contains the In-app Billing Version 3 API to your Android project. You also need to set the permissions for your application to communicate with Google Play. In addition, you'll need to establish a connection between your application and Google Play. You should also verify that the In-app Billing API version that you are using in your application is supported by Google Play.</p>
<h2 id="GetSample">Download the Sample Application</h2>
<p>In this training class, you will use a reference implementation for the In-app Billing Version 3 API called the {@code TrivialDrive} sample application. The sample includes convenience classes to quickly set up the In-app Billing service, marshal and unmarshal data types, and handle In-app Billing requests from the main thread of your application.</p>
<p>To download the sample application:</p>
<ol>
-<li>Open the <a href="{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>.</li>
-<li>In the SDK Manager, expand the {@code Extras} section.</li>
-<li>Select <strong>Google Play Billing Library</strong>.</li>
-<li>Click <strong>Install packages</strong> to complete the download.</li>
+<li>Open Android Studio and then close any open projects until you are
+presented with the welcome screen.</li>
+<li>Choose <strong>Import an Android code sample</strong> from the
+ <strong>Quick Start</strong> list on the right side the window.</li>
+<li>Type {@code Trivial Drive} into the search bar and select the
+ <strong>Trivial Drive</strong> sample.</li>
+<li>Follow the rest of the instructions in the <strong>Import Sample</strong>
+ wizard to import the sample to a directory of your choosing. The sample code
+ is in the <strong>TrivialDrive</strong> subdirectory of the repository.</li>
</ol>
-<p>The sample files will be installed to {@code <sdk>/extras/google/play_billing/}.</p>
+
+<p>Alternatively, you can use {@code git} to manually clone
+ the repository from <a
+ href="https://github.com/googlesamples/android-play-billing"
+ class="external-link">https://github.com/googlesamples/android-play-billing</a></p>
<h2 id="AddToDevConsole">Add Your Application to the Developer Console</h2>
<p>The Google Play Developer Console is where you publish your In-app Billing application and manage the various digital goods that are available for purchase from your application. When you create a new application entry in the Developer Console, it automatically generates a public license key for your application. You will need this key to establish a trusted connection from your application to the Google Play servers. You only need to generate this key once per application, and don’t need to repeat these steps when you update the APK file for your application.</p>
diff --git a/docs/html/training/testing/ui-testing/espresso-testing.jd b/docs/html/training/testing/ui-testing/espresso-testing.jd
index 01e74b0..72689ff 100644
--- a/docs/html/training/testing/ui-testing/espresso-testing.jd
+++ b/docs/html/training/testing/ui-testing/espresso-testing.jd
@@ -120,9 +120,12 @@
<pre>
dependencies {
- androidTestCompile 'com.android.support.test:runner:0.4'
- androidTestCompile 'com.android.support.test:rules:0.4'
+ androidTestCompile 'com.android.support:support-annotations:23.0.1'
+ androidTestCompile 'com.android.support.test:runner:0.4.1'
+ androidTestCompile 'com.android.support.test:rules:0.4.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
+ // Set this dependency if you want to use Hamcrest matching
+ androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
}
</pre>
</li>
diff --git a/docs/html/training/testing/ui-testing/uiautomator-testing.jd b/docs/html/training/testing/ui-testing/uiautomator-testing.jd
index a0050a8..ea15d8b 100644
--- a/docs/html/training/testing/ui-testing/uiautomator-testing.jd
+++ b/docs/html/training/testing/ui-testing/uiautomator-testing.jd
@@ -89,9 +89,11 @@
<pre>
dependencies {
- androidTestCompile 'com.android.support.test:runner:0.3'
- androidTestCompile 'com.android.support.test:rules:0.3'
+ androidTestCompile 'com.android.support:support-annotations:23.0.1'
+ androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
+ // Set this dependency if you want to use Hamcrest matching
+ androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
}
</pre>
</li>
@@ -186,9 +188,21 @@
<h2 id="build">Create a UI Automator Test Class</h2>
-<p>To build a UI Automator test, create a class that extends
-{@link android.test.InstrumentationTestCase}. Implement the following programming model in your
-UI Automator test class:</p>
+<p>
+Your UI Automator test class should be written the same way as a JUnit 4 test class. To learn more
+about creating JUnit 4 test classes and using JUnit 4 assertions and annotations, see
+<a href="{@docRoot}training/testing/unit-testing/instrumented-unit-tests.html#build">
+Create an Instrumented Unit Test Class</a>.
+</p>
+<p>Add the {@code @RunWith(AndroidJUnit4.class)} annotation at the beginning of your test class
+definition. You also need to specify the
+<a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
+{@code AndroidJUnitRunner}</a> class
+provided in the Android Testing Support Library as your default test runner. This step is described
+in more detail in <a href="#run">Run UI Automator Tests on a Device or Emulator</a>.
+</p>
+
+<p>Implement the following programming model in your UI Automator test class:</p>
<ol>
<li>Get a
@@ -241,21 +255,52 @@
and simulate a Home button press:</p>
<pre>
-import android.test.InstrumentationTestCase;
+import org.junit.Before;
+import android.support.test.runner.AndroidJUnit4;
+import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.By;
+import android.support.test.uiautomator.Until;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import static org.junit.Assert.assertThat;
-public class CalculatorUiTest extends InstrumentationTestCase {
+@RunWith(AndroidJUnit4.class)
+@SdkSuppress(minSdkVersion = 18)
+public class ChangeTextBehaviorTest {
+ private static final String BASIC_SAMPLE_PACKAGE
+ = "com.example.android.testing.uiautomator.BasicSample";
+ private static final int LAUNCH_TIMEOUT = 5000;
+ private static final String STRING_TO_BE_TYPED = "UiAutomator";
private UiDevice mDevice;
- public void setUp() {
+ @Before
+ public void startMainActivityFromHomeScreen() {
// Initialize UiDevice instance
- mDevice = UiDevice.getInstance(getInstrumentation());
+ mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
// Start from the home screen
mDevice.pressHome();
- mDevice.wait(Until.hasObject(By.pkg(getHomeScreenPackage()).depth(0)),
+
+ // Wait for launcher
+ final String launcherPackage = mDevice.getLauncherPackageName();
+ assertThat(launcherPackage, notNullValue());
+ mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)),
+ LAUNCH_TIMEOUT);
+
+ // Launch the app
+ Context context = InstrumentationRegistry.getContext();
+ final Intent intent = context.getPackageManager()
+ .getLaunchIntentForPackage(BASIC_SAMPLE_PACKAGE);
+ // Clear out any previous instances
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
+ context.startActivity(intent);
+
+ // Wait for the app to appear
+ mDevice.wait(Until.hasObject(By.pkg(BASIC_SAMPLE_PACKAGE).depth(0)),
+ LAUNCH_TIMEOUT);
}
}
</pre>
@@ -292,8 +337,7 @@
<h4 id="specifying-selector">Specifying a selector</h4>
<p>If you want to access a specific UI component in an app, use the
<a href="{@docRoot}reference/android/support/test/uiautomator/UiSelector.html">{@code UiSelector}</a>
-class. This class represents a query for specific elements in the
-currently displayed UI. </p>
+class. This class represents a query for specific elements in the currently displayed UI. </p>
<p>If more than one matching element is found, the first matching element in the layout hierarchy
is returned as the target
@@ -306,8 +350,8 @@
{@code UiAutomatorObjectNotFoundException}</a> is thrown. </p>
<p>You can use the
-<a href="{@docRoot}reference/android/support/test/uiautomator/UiSelector.html#childSelector(android.support.test.uiautomator.UiSelector)">{@code childSelector()}</a>
-method to nest multiple
+<a href="{@docRoot}reference/android/support/test/uiautomator/UiSelector.html#childSelector(android.support.test.uiautomator.UiSelector)">
+{@code childSelector()}</a> method to nest multiple
<a href="{@docRoot}reference/android/support/test/uiautomator/UiSelector.html">{@code UiSelector}</a>
instances. For example, the following code example shows how your test might specify a search to
find the first {@link android.widget.ListView} in the currently displayed UI, then search within that
diff --git a/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd b/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd
index eb159df..db4cc8c 100644
--- a/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd
+++ b/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd
@@ -76,10 +76,11 @@
<pre>
dependencies {
- androidTestCompile 'com.android.support.test:runner:0.3'
- androidTestCompile 'com.android.support.test:rules:0.3'
+ androidTestCompile 'com.android.support:support-annotations:23.0.1'
+ androidTestCompile 'com.android.support.test:runner:0.4.1'
+ androidTestCompile 'com.android.support.test:rules:0.4.1'
// Set this dependency if you want to use Hamcrest matching
- androidTestCompile 'org.hamcrest:hamcrest-library:1.1'
+ androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
}
</pre>
</li>
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 85733bf..8f08651 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -1008,6 +1008,21 @@
"How to detect location data on Android Wear devices."
>Detecting Location</a>
</li>
+
+ <li>
+ <a href="<?cs var:toroot ?>training/articles/wear-permissions.html"
+ description=
+ "How to request permissions on Android Wear devices."
+ >Requesting Permissions</a>
+ </li>
+
+ <li>
+ <a href="<?cs var:toroot ?>training/wearables/wearable-sounds.html"
+ description=
+ "How to use the speaker on Android Wear devices."
+ >Using the Speaker</a>
+ </li>
+
</ul>
</li>
<!-- End Building for wearables -->
diff --git a/docs/html/training/wearables/wearable-sounds.jd b/docs/html/training/wearables/wearable-sounds.jd
new file mode 100644
index 0000000..3c3c135
--- /dev/null
+++ b/docs/html/training/wearables/wearable-sounds.jd
@@ -0,0 +1,63 @@
+page.title=Using Speakers on Wearables
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#Detect">Detect the Speaker</a></li>
+ <li><a href="#Play">Play Sounds</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}design/wear/watchfaces.html">Watch Faces for Android Wear</a></li>
+</ul>
+</div>
+</div>
+
+<p>Some Android Wear devices include speakers, enabling them to incorporate sound into their
+apps and offer an extra dimension of engagement with the user. A speaker-equipped Wear device might
+trigger a clock or timer alarm, complete with audio notification. Games on Wear become become more
+entertaining by offering not just sight, but sound.</p>
+
+<p>This page describes how apps on Wear devices running Android 6.0 (API level 23) can use
+familiar Android APIs to play sounds through the device speaker.</p>
+
+<h2 id="Detect">Detect the Speaker</h2>
+
+<p>A Wear app must first detect whether the wearable device has a speaker. In the following example,
+the app uses the {@link android.media.AudioManager#getDevices(int) getDevices() } method in
+conjunction with the value of {@link android.content.pm.PackageManager#FEATURE_AUDIO_OUTPUT} to
+confirm that the device is equipped with a speaker.</p>
+
+<pre>
+PackageManager packageManager = context.getPackageManager();
+AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
+
+// Check whether the device has a speaker.
+if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ // Check FEATURE_AUDIO_OUTPUT to guard against false positives.
+ if (!packageManager.hasSystemFeature(PackageManager.FEATURE_AUDIO_OUTPUT)) {
+ return false;
+ }
+
+ AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS);
+ for (AudioDeviceInfo device : devices) {
+ if (device.getType() == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER) {
+ return true;
+ }
+ }
+}
+return false;
+</pre>
+
+<h2 id="Play">Play Sounds</h2>
+
+<p>Once you've detected the speaker, the process for playing sound on Android Wear is the
+same as for a handset or other device. For more information, see
+<a href="{@docRoot}guide/topics/media/mediaplayer.html">Media Playback</a>.</p>
+
+<p>If you also want to record audio from the microphone on the wearable, your app must also get
+permission to use the microphone. To learn more, see
+<a href="{@docRoot}training/articles/wear-permissions.html">Permissions on Android Wear.</a></p>
\ No newline at end of file