Merge "fix typo in book path for devsite builds." into mnc-mr-docs
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index a556563..b772bc9 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1593,10 +1593,6 @@
* receive either {@link #onRestart}, {@link #onDestroy}, or nothing,
* depending on later user activity.
*
- * <p>Note that this method may never be called, in low memory situations
- * where the system does not have enough memory to keep your activity's
- * process running after its {@link #onPause} method is called.
- *
* <p><em>Derived classes must call through to the super class's
* implementation of this method. If they do not, an exception will be
* thrown.</em></p>
diff --git a/docs/html-intl/intl/es/preview/overview.jd b/docs/html-intl/intl/es/preview/overview.jd
index 6cd026a..f7cf9da 100644
--- a/docs/html-intl/intl/es/preview/overview.jd
+++ b/docs/html-intl/intl/es/preview/overview.jd
@@ -151,8 +151,8 @@
</p>
<ul>
- <li><strong><a href="{@docRoot}preview/support.html">Preview 1</a></strong> (versión inicial, alpha);</li>
- <li><strong>Preview 2</strong> (actualización gradual, beta);</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong> (versión inicial, alpha);</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong> (actualización gradual, alpha);</li>
<li><strong>Preview 3</strong> (actualización gradual, beta);</li>
<li><strong>Preview 4</strong> (API finales y SDK oficial, publicación en Google Play);</li>
<li><strong>Preview 5</strong> (imágenes de sistema casi definitivas para pruebas finales);</li>
diff --git a/docs/html-intl/intl/es/preview/setup-sdk.jd b/docs/html-intl/intl/es/preview/setup-sdk.jd
index 4ccc4f8..01c715b 100644
--- a/docs/html-intl/intl/es/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/es/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
según lo descrito a continuación.
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>Android Studio 2.1 actualmente se encuentra disponible como muestra en el canal de
versiones Canary. Si ya
cuentas con Android Studio y no deseas realizar la actualización al canal Canary, puedes
diff --git a/docs/html-intl/intl/in/preview/overview.jd b/docs/html-intl/intl/in/preview/overview.jd
index 4b48a22..56e963b 100644
--- a/docs/html-intl/intl/in/preview/overview.jd
+++ b/docs/html-intl/intl/in/preview/overview.jd
@@ -151,8 +151,8 @@
</p>
<ul>
- <li><strong><a href="{@docRoot}preview/support.html">Preview 1</a></strong> (rilis pertama, alfa)</li>
- <li><strong>Preview 2</strong> (pembaruan bertahap, beta)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong> (rilis pertama, alfa)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong> (pembaruan bertahap, alpha)</li>
<li><strong>Preview 3</strong> (pembaruan bertahap, beta)</li>
<li><strong>Preview 4</strong> (API final dan SDK resmi, publikasi di Play)</li>
<li><strong>Preview 5</strong> (citra sistem hampir final untuk pengujian akhir)</li>
diff --git a/docs/html-intl/intl/in/preview/setup-sdk.jd b/docs/html-intl/intl/in/preview/setup-sdk.jd
index 5187e99..a842931 100644
--- a/docs/html-intl/intl/in/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/in/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
seperti dijelaskan di bawah ini.
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>Android Studio 2.1 saat ini tersedia sebagai preview di
Canary Release Channel. Jika Anda sudah
memiliki Android Studio dan tidak ingin memperbarui ke Canary Channel, Anda bisa
diff --git a/docs/html-intl/intl/ja/preview/overview.jd b/docs/html-intl/intl/ja/preview/overview.jd
index 29340f8..1cc56fd 100644
--- a/docs/html-intl/intl/ja/preview/overview.jd
+++ b/docs/html-intl/intl/ja/preview/overview.jd
@@ -151,8 +151,8 @@
</p>
<ul>
- <li><strong><a href="{@docRoot}preview/support.html">Preview 1</a></strong>(初回リリース、アルファ版)</li>
- <li><strong>Preview 2</strong>(追加アップデート、ベータ版)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong>(初回リリース、アルファ版)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong>(追加アップデート、アルファ版)</li>
<li><strong>Preview 3</strong>(追加アップデート、ベータ版)</li>
<li><strong>Preview 4</strong>(最終版の API と正式な SDK、Google Play への公開)</li>
<li><strong>Preview 5</strong>(最終テスト用の最終版とほぼ同じシステム イメージ)</li>
diff --git a/docs/html-intl/intl/ja/preview/setup-sdk.jd b/docs/html-intl/intl/ja/preview/setup-sdk.jd
index 8f3cd06..fd5faba 100644
--- a/docs/html-intl/intl/ja/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/ja/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>現在、Android Studio 2.1 は、先行リリース チャンネルでプレビューとして入手できます。Android Studio を既に入手していて、先行チャンネル版にアップデートしない場合は、Android Studio 2.1 を個別のインストールとしてダウンロードして、Android N での開発に使用することにより、Android Studio のプライマリ環境に影響を及ぼさないようにすることができます。
diff --git a/docs/html-intl/intl/ko/preview/overview.jd b/docs/html-intl/intl/ko/preview/overview.jd
index a7ee3d3..41200a7 100644
--- a/docs/html-intl/intl/ko/preview/overview.jd
+++ b/docs/html-intl/intl/ko/preview/overview.jd
@@ -151,8 +151,8 @@
</p>
<ul>
- <li><strong><a href="{@docRoot}preview/support.html">Preview 1</a></strong>(최초 릴리스, 알파)</li>
- <li><strong>Preview 2</strong>(증분 업데이트, 베타)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong>(최초 릴리스, 알파)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong>(증분 업데이트, 알파)</li>
<li><strong>Preview 3</strong>(증분 업데이트, 베타)</li>
<li><strong>Preview 4</strong>(최종 API 및 공식 SDK, Play 게시)</li>
<li><strong>Preview 5</strong>(최종 테스트를 위한 거의 최종 시스템 이미지)</li>
diff --git a/docs/html-intl/intl/ko/preview/setup-sdk.jd b/docs/html-intl/intl/ko/preview/setup-sdk.jd
index 91c68a6..adb9edf 100644
--- a/docs/html-intl/intl/ko/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/ko/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
업데이트해야 합니다.
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>현재 Android Studio 2.1은 Canary 릴리스 채널에서 프리뷰로
제공됩니다.
Android Studio가 이미 있고 Canary Channel로 업데이트하지 않으려면,
diff --git a/docs/html-intl/intl/pt-br/preview/overview.jd b/docs/html-intl/intl/pt-br/preview/overview.jd
index be4e43f..e02c8d1 100644
--- a/docs/html-intl/intl/pt-br/preview/overview.jd
+++ b/docs/html-intl/intl/pt-br/preview/overview.jd
@@ -151,8 +151,8 @@
</p>
<ul>
- <li><strong><a href="{@docRoot}preview/support.html">Preview 1</a></strong> (versão inicial, alpha)</li>
- <li><strong>Preview 2</strong> (atualização incremental, beta)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong> (versão inicial, alpha)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong> (atualização incremental, alpha)</li>
<li><strong>Preview 3</strong> (atualização incremental, beta)</li>
<li><strong>Preview 4</strong> (APIs finais e SDK oficial, publicação no Play)</li>
<li><strong>Preview 5</strong> (imagens de sistema quase finalizadas para o teste final)</li>
diff --git a/docs/html-intl/intl/pt-br/preview/setup-sdk.jd b/docs/html-intl/intl/pt-br/preview/setup-sdk.jd
index 4766a88..4159c25 100644
--- a/docs/html-intl/intl/pt-br/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/pt-br/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
conforme é descrito abaixo.
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>No momento, o Android Studio 2.1 está disponível como prévia no canal da versão canary
. Se já tiver
o Android Studio e não quiser atualizar para o canal canary, poderá
diff --git a/docs/html-intl/intl/ru/preview/overview.jd b/docs/html-intl/intl/ru/preview/overview.jd
index e78af04..303e9ce 100644
--- a/docs/html-intl/intl/ru/preview/overview.jd
+++ b/docs/html-intl/intl/ru/preview/overview.jd
@@ -151,8 +151,8 @@
</p>
<ul>
- <li><strong><a href="{@docRoot}preview/support.html">Предварительная версия 1</a></strong> (первоначальный выпуск, альфа-версия)</li>
- <li><strong>Предварительная версия 2</strong> (инкрементальное обновление, бета-версия)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp1">Предварительная версия 1</a></strong> (первоначальный выпуск, альфа-версия)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Предварительная версия 2</a></strong> (инкрементальное обновление, альфа-версия)</li>
<li><strong>Предварительная версия 3</strong> (инкрементальное обновление, бета-версия)</li>
<li><strong>Предварительная версия 4</strong> (окончательные версии API и официальный SDK, публикация в Google Play)</li>
<li><strong>Предварительная версия 5</strong> (практически готовые системные образы для заключительного тестирования)</li>
diff --git a/docs/html-intl/intl/ru/preview/setup-sdk.jd b/docs/html-intl/intl/ru/preview/setup-sdk.jd
index 1fcbc0c..3838700 100644
--- a/docs/html-intl/intl/ru/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/ru/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
как описано ниже.
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>Предварительная версия Android Studio 2.1 в настоящее время доступна на канале обновлений Canary.
Если у вас уже есть Android Studio
и вы не хотите обновлять ее до версии канала Canary, вы можете загрузить
diff --git a/docs/html-intl/intl/vi/preview/overview.jd b/docs/html-intl/intl/vi/preview/overview.jd
index 0df55e3..a71bf61 100644
--- a/docs/html-intl/intl/vi/preview/overview.jd
+++ b/docs/html-intl/intl/vi/preview/overview.jd
@@ -151,8 +151,8 @@
</p>
<ul>
- <li><strong><a href="{@docRoot}preview/support.html">Preview 1</a></strong> (phát hành lần đầu, alpha)</li>
- <li><strong>Preview 2</strong> (bản cập nhật tăng dần, beta)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong> (phát hành lần đầu, alpha)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong> (bản cập nhật tăng dần, alpha)</li>
<li><strong>Preview 3</strong> (bản cập nhật tăng dần, beta)</li>
<li><strong>Preview 4</strong> (các API cuối cùng và SDK chính thức, phát hành Play)</li>
<li><strong>Preview 5</strong> (các ảnh hệ thống gần hoàn thiện để kiểm thử cuối cùng)</li>
diff --git a/docs/html-intl/intl/vi/preview/setup-sdk.jd b/docs/html-intl/intl/vi/preview/setup-sdk.jd
index fca5331..2e3a18b 100644
--- a/docs/html-intl/intl/vi/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/vi/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
như mô tả dưới đây.
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>Android Studio 2.1 hiện đang có dưới dạng bản xem trước trong kênh
phát hành Canary. Nếu bạn đã
có Android Studio và không muốn cập nhật lên kênh canary thì bạn có thể
diff --git a/docs/html-intl/intl/zh-cn/preview/setup-sdk.jd b/docs/html-intl/intl/zh-cn/preview/setup-sdk.jd
index 69fe250..216d464 100644
--- a/docs/html-intl/intl/zh-cn/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/zh-cn/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>在 Canary 发布渠道中,Android Studio 2.1 当前可以预览版的形式提供。如果您已拥有 Android Studio 且不需要更新到 Canary 发布渠道,您可通过单独安装的形式下载 Android Studio 2.1,并使用它在 Android N 中进行开发,从而使您的主要 Android Studio 环境不受影响。
diff --git a/docs/html-intl/intl/zh-tw/preview/setup-sdk.jd b/docs/html-intl/intl/zh-tw/preview/setup-sdk.jd
index a5ce556b..d2a9d9e 100644
--- a/docs/html-intl/intl/zh-tw/preview/setup-sdk.jd
+++ b/docs/html-intl/intl/zh-tw/preview/setup-sdk.jd
@@ -42,8 +42,6 @@
</p>
-<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
-
<p>Android Studio 2.1 目前在早期測試發行管道中是以預覽版形式提供。如果您已經有 Android Studio 但不想要更新到早期測試管道,您可以下載 Android Studio 2.1 並另行安裝,並使用它來針對 Android N 進行開發,這樣並不會影響您的主要 Android Studio 環境。
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index a5a4613..33fb19b 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -46,7 +46,7 @@
- from: /tools/sdk/index.html
to: /studio/index.html
- from: /tools/index.html
- to: /tools-moved.html
+ to: /studio/index.html
- from: /tools/sdk/installing.html
to: /studio/index.html
- from: /tools/eclipse/installing-adt.html
@@ -1069,6 +1069,8 @@
to: /studio/test/index.html
- from: /tools/testing/testing_otheride.html
to: /studio/test/command-line.html
+- from: /tools/help/android.html
+ to: /studio/tools/help/android.html
# Files moved out of studio
- from: /tools/sdk/ndk/...
@@ -1079,8 +1081,6 @@
# Removed files
- from: /tools/help/project-mgmt.html
to: /studio/projects/index.html
-- from: /tools/help/android.html
- to: /studio/projects/index.html
- from: /tools/help/hprof-conv.html
to: /studio/profile/investigate-ram.html
- from: /tools/studio/code-tools.html
@@ -1090,9 +1090,9 @@
- from: /tools/help/avd-manager.html
to: /studio/run/managing-avds.html
- from: /tools/devices/managing-avds-cmdline.html
- to: /studio/run/managing-avds.html
+ to: /studio/tools/help/android.html
- from: /tools/projects/projects-cmdline.html
- to: /studio/projects/index.html
+ to: /studio/tools/help/android.html
- from: /tools/help/dmtracedump.html
to: /studio/profile/traceview.html
- from: /tools/help/lint.html
diff --git a/docs/html/about/start.jd b/docs/html/about/start.jd
index 4658141..a09c746 100644
--- a/docs/html/about/start.jd
+++ b/docs/html/about/start.jd
@@ -64,6 +64,6 @@
<h2>Go!</h2>
<p>Get started by installing <a
-href="{@docRoot}sdk/index.html">Android Studio</a>—the official IDE for Android development,
+href="{@docRoot}studio/index.html">Android Studio</a>—the official IDE for Android development,
which includes the Android SDK tools. Then when you're ready to begin coding, follow the training
for <a href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a>.</p>
\ No newline at end of file
diff --git a/docs/html/about/versions/android-1.5.jd b/docs/html/about/versions/android-1.5.jd
index 522f855..775561b 100644
--- a/docs/html/about/versions/android-1.5.jd
+++ b/docs/html/about/versions/android-1.5.jd
@@ -30,11 +30,6 @@
Differences Report »</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
-</ol>
-
</div>
</div>
@@ -54,9 +49,7 @@
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the platform into your Android 1.6 or later SDK. For more information,
-see <a href="{@docRoot}sdk/exploring.html">Exploring the
-SDK</a>.</p>
+download the platform into your Android 1.6 or later SDK.</p>
<h2 id="features">Platform Highlights</h2>
diff --git a/docs/html/about/versions/android-1.6.jd b/docs/html/about/versions/android-1.6.jd
index dc30b49..ffca6b6 100755
--- a/docs/html/about/versions/android-1.6.jd
+++ b/docs/html/about/versions/android-1.6.jd
@@ -30,11 +30,6 @@
Differences Report »</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
-</ol>
-
</div>
</div>
@@ -55,9 +50,7 @@
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the latest Android 1.6 platform into your Android 1.6 or later SDK. For
-more information, see <a href="{@docRoot}sdk/exploring.html">Exploring the
-SDK</a>.</p>
+download the latest Android 1.6 platform into your Android 1.6 or later SDK.</p>
<h2 id="features">Platform Highlights</h2>
diff --git a/docs/html/about/versions/android-2.0.1.jd b/docs/html/about/versions/android-2.0.1.jd
index 2974152..48f7ae8 100644
--- a/docs/html/about/versions/android-2.0.1.jd
+++ b/docs/html/about/versions/android-2.0.1.jd
@@ -30,11 +30,6 @@
</li>
</ol>
- <h2>See Also</h2>
- <ol>
- <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
- </ol>
-
</div>
</div>
@@ -56,9 +51,7 @@
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the platform into your Android 1.6 or later SDK. For more information,
-see <a href="{@docRoot}sdk/exploring.html">Exploring the
-SDK</a>.</p>
+download the platform into your Android 1.6 or later SDK.</p>
<h2 id="features">Platform Highlights</h2>
diff --git a/docs/html/about/versions/android-2.0.jd b/docs/html/about/versions/android-2.0.jd
index 5c0d3dc..329af3c 100644
--- a/docs/html/about/versions/android-2.0.jd
+++ b/docs/html/about/versions/android-2.0.jd
@@ -25,11 +25,6 @@
</ol></li>
</ol>
- <h2>See Also</h2>
- <ol>
- <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
- </ol>
-
</div>
</div>
@@ -49,9 +44,7 @@
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the platform into your SDK. For more information,
-see <a href="{@docRoot}sdk/exploring.html">Exploring the
-SDK</a>.</p>
+download the platform into your SDK.</p>
<h2 id="features">Platform Highlights</h2>
diff --git a/docs/html/about/versions/android-2.1.jd b/docs/html/about/versions/android-2.1.jd
index 02dec7e..ce6f1b2 100644
--- a/docs/html/about/versions/android-2.1.jd
+++ b/docs/html/about/versions/android-2.1.jd
@@ -30,11 +30,6 @@
Differences Report »</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
-</ol>
-
</div>
</div>
@@ -55,9 +50,7 @@
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the platform into your SDK. For more information,
-see <a href="{@docRoot}sdk/exploring.html">Exploring the
-SDK</a>.</p>
+download the platform into your SDK.</p>
<h2 id="features">Platform Highlights</h2>
diff --git a/docs/html/about/versions/android-2.2.jd b/docs/html/about/versions/android-2.2.jd
index bd0f071..84d5c74 100644
--- a/docs/html/about/versions/android-2.2.jd
+++ b/docs/html/about/versions/android-2.2.jd
@@ -26,11 +26,6 @@
Differences Report »</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
-</ol>
-
</div>
</div>
diff --git a/docs/html/about/versions/android-5.0.jd b/docs/html/about/versions/android-5.0.jd
index 8956076..6122a21 100644
--- a/docs/html/about/versions/android-5.0.jd
+++ b/docs/html/about/versions/android-5.0.jd
@@ -136,7 +136,7 @@
<h3 id="Start">Start developing</h3>
-<p>To start building apps for Android 5.0, you must first <a href="{@docRoot}sdk/index.html">get
+<p>To start building apps for Android 5.0, you must first <a href="{@docRoot}studio/index.html">get
the Android SDK</a>. Then use the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>
to download the Android 5.0 SDK Platform and System Images.</p>
diff --git a/docs/html/about/versions/marshmallow/android-6.0.jd b/docs/html/about/versions/marshmallow/android-6.0.jd
index 779ecf4..240b080 100644
--- a/docs/html/about/versions/marshmallow/android-6.0.jd
+++ b/docs/html/about/versions/marshmallow/android-6.0.jd
@@ -56,7 +56,7 @@
<h3 id="Start">Start developing</h3>
-<p>To start building apps for Android 6.0, you must first <a href="{@docRoot}sdk/index.html">get
+<p>To start building apps for Android 6.0, you must first <a href="{@docRoot}studio/index.html">get
the Android SDK</a>. Then use the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>
to download the Android 6.0 SDK Platform and System Images.</p>
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
index de38f3d..fb86295 100644
--- a/docs/html/develop/index.jd
+++ b/docs/html/develop/index.jd
@@ -9,61 +9,44 @@
excludeFromSuggestions=true
@jd:body
-<section class="dac-expand dac-hero dac-section-light" style="background:#FFE57F">
+
+ <section class="dac-expand dac-hero dac-light">
<div class="wrap">
<div class="cols dac-hero-content">
<div class="col-1of2 col-push-1of2 dac-hero-figure">
- <!--
- <iframe width="448" height="252"
- src="//www.youtube.com/embed/Z98hXV9GmzY?autohide=1&showinfo=0"
- frameborder="0" allowfullscreen=""
- style="float: right;"></iframe>
- -->
- <a href="{@docRoot}sdk/index.html">
- <img class="dac-hero-image" src="{@docRoot}images/tools/studio/studio-feature-instant-run_2x.png" />
- </a>
+ <img class="dac-hero-image" src="/images/develop/hero_image_studio5_2x.png" srcset="/images/develop/hero_image_studio5.png 1x, /images/develop/hero_image_studio5_2x.png 2x">
</div>
- <div class="col-1of2 col-pull-1of2">
+ <div class="col-1of2 col-pull-1of2" style="margin-bottom:40px">
<h1 class="dac-hero-title">
- <a style="color:inherit" href="{@docRoot}sdk/index.html">
- Android Studio 2.0,<br>now available!</a></h1>
- <p class="dac-hero-description">
- The latest version of Android Studio is the biggest update yet.
- It includes new features like <strong>Instant Run</strong>, which
- dramatically speeds up your edit, build, and run cycles, keeping
- you "in the flow."</p>
- </p>
- <div class="cols">
- <div class="col-1of2">
- <a class="dac-hero-cta" href="{@docRoot}sdk/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- Get Android Studio
- </a><br>
- <a class="dac-hero-cta" href="{@docRoot}training/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- Build your first app
- </a>
- </div>
- <div class="col-1of2">
- <a class="dac-hero-cta" href="{@docRoot}guide/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- Learn about Android
- </a><br>
- <a class="dac-hero-cta" href="{@docRoot}samples/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- See sample projects
- </a>
- </div>
+ <a style="color:inherit" href="{@docRoot}studio/index.html">
+ Android Studio 2.1,<br>now available!</a></h1>
+
+<p class="dac-hero-description">Android Studio provides the fastest tools for
+building apps on every type of Android device.</p>
+
+<p class="dac-hero-description">The latest version, Android Studio 2.1, adds
+support for N Preview development on top of the faster Android Emulator and
+Instant Run feature from 2.0.</p>
+
+<div class="cols">
+ <div class="col-1of2">
+ <a class="dac-hero-cta" href="{@docRoot}studio/index.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Get Android Studio
+ </a>
+ </div>
+ <div class="col-1of2">
+ <a class="dac-hero-cta" href="{@docRoot}studio/releases/index.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ See the release notes</a>
+ </div>
+</div>
+
</div>
</div>
- <!--<div class="dac-section dac-small">
- <div class="resource-widget resource-flow-layout col-16"
- data-query="collection:develop/landing/mainlinks"
- data-cardSizes="6x2"
- data-maxResults="6"></div>
- </div>-->
</div>
</section>
+
<div class="wrap dac-offset-parent">
<a class="dac-fab dac-scroll-button" data-scroll-button href="#latest">
<i class="dac-sprite dac-arrow-down-gray"></i>
diff --git a/docs/html/distribute/engage/_book.yaml b/docs/html/distribute/engage/_book.yaml
index ef86a2a..87e819a 100644
--- a/docs/html/distribute/engage/_book.yaml
+++ b/docs/html/distribute/engage/_book.yaml
@@ -17,6 +17,9 @@
- title: Encourage Competition
path: /distribute/engage/game-services.html
+- title: Engage Users in Their Language
+ path: /distribute/engage/translate.html
+
- title: Understand User Behavior
path: /distribute/engage/analytics.html
diff --git a/docs/html/distribute/engage/engage_toc.cs b/docs/html/distribute/engage/engage_toc.cs
index e86623f..4f3e0af 100644
--- a/docs/html/distribute/engage/engage_toc.cs
+++ b/docs/html/distribute/engage/engage_toc.cs
@@ -38,6 +38,12 @@
</li>
<li class="nav-section">
<div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs
+ var:toroot?>distribute/engage/translate.html">
+ <span class="en">Engage Users in Their Language</span></a>
+ </div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs
var:toroot?>distribute/engage/analytics.html">
<span class="en">Understand User Behavior</span></a>
</div>
diff --git a/docs/html/distribute/engage/translate.jd b/docs/html/distribute/engage/translate.jd
new file mode 100644
index 0000000..3d391a3
--- /dev/null
+++ b/docs/html/distribute/engage/translate.jd
@@ -0,0 +1,91 @@
+page.title=Engage Users in Their Language
+page.metaDescription=Use the App Translation Service to maximize the amount of people who can install and engage with your app.
+page.tags="app translation service, translation, localization"
+page.image=/images/gp-listing-3.jpg
+
+@jd:body
+
+<div class="figure">
+ <img src="{@docRoot}images/gp-listing-3.jpg" style="width:512px;">
+</div>
+<p>
+ Translating your app's store description, user interface text, and in-app
+ purchase products into multiple languages maximizes the amount of people
+ who can install, engage with, and recommend it.
+</p>
+
+<div class="headerLine">
+ <h2 id="before-translation">Before You Translate</h2>
+</div>
+
+<p>
+ Translation is one of the final steps in localization. For more detailed
+ information about the localization process, refer to the following documentation:
+</p>
+
+<ul>
+ <li>
+ <a href="https://developer.android.com/distribute/tools/localization-checklist.html">
+ Localization Checklist</a>
+ </li>
+
+ <li>
+ <a href="http://developer.android.com/guide/topics/resources/localization.html">Localizing
+ with Resources</a>
+ </li>
+
+ <li>
+ <a href="http://developer.android.com/training/basics/supporting-devices/languages.html">
+ Supporting Different Languages</a>
+ </li>
+</ul>
+
+<div class="headerLine">
+ <h2 id="translate">How to Translate</h2>
+</div>
+
+<p>
+ While translating your store listing and universal app campaign ads (if you have any) can make
+ your app more discoverable, providing a translated user interface and in-app purchase products
+ can maximize user engagement and retention. Depending on your budget, there are several
+ options available:
+</p>
+
+<ul>
+ <li>
+ <strong>Use the Google Play App Translation Service</strong>: For your convenience, Google Play
+ provides an <a href="https://support.google.com/l10n/answer/6359997">App Translation Service</a>
+ that is integrated directly into the <a href="https://support.google.com/l10n/answer/6341304">
+ Developer Console</a> and <a href="https://support.google.com/l10n/answer/6341928">Android
+ Studio</a>. Using this professional, human service, you can order translations for your app,
+ store listing text, in-app purchase products, and universal app campaign ads all in one go.
+ You’ll get instant estimates from multiple vendors, all with the convenience of ordering and
+ paying online.
+ </li>
+
+ <li>
+ <strong>Do it yourself</strong>: If you or your colleagues know the target languages, you can
+ translate everything yourself using any text editor, or you can use the
+ <a href="http://tools.android.com/recent/androidstudio087released">Android Studio Translation
+ Editor</a>.
+ </li>
+
+ <li>
+ <strong>Use a third-party translation service</strong>: You can use a translation service
+ that is offered by one of the many translation companies available online.
+ </li>
+</ul>
+
+<p style="clear:both">
+</p>
+
+<div class="headerLine">
+ <h2 id="related-resources">Related Resources</h2>
+</div>
+
+<div class="resource-widget resource-flow-layout col-13"
+ data-query="collection:distribute/engage/translate"
+ data-sortorder="-timestamp"
+ data-cardsizes="9x3"
+ data-maxresults="6">
+</div>
diff --git a/docs/html/distribute/essentials/quality/billions.jd b/docs/html/distribute/essentials/quality/billions.jd
index 58f15a3..7042143 100644
--- a/docs/html/distribute/essentials/quality/billions.jd
+++ b/docs/html/distribute/essentials/quality/billions.jd
@@ -585,6 +585,16 @@
Implementing a Preferences Activity</a>.</li>
</ul>
+
+
+<h3 class="rel-resources clearfloat">Related resources</h3>
+<div class="resource-widget resource-flow-layout col-13"
+ data-query="collection:distribute/essentials/billionsquality/cost"
+ data-sortOrder="-timestamp"
+ data-cardSizes="6x3"
+ data-maxResults="6"></div>
+
+
<!-- consumption -->
<div class="headerLine">
<h2 id="consumption">Battery Consumption</h2>
diff --git a/docs/html/distribute/tools/localization-checklist.jd b/docs/html/distribute/tools/localization-checklist.jd
index 1497c364..da483ad 100644
--- a/docs/html/distribute/tools/localization-checklist.jd
+++ b/docs/html/distribute/tools/localization-checklist.jd
@@ -530,19 +530,17 @@
</h4>
<p>
- Google Play App Translation Service can help you quickly find and purchase
- translations of your app. In the Developer Console, you can browse a list of
- third-party vendors who are pre-qualified by Google to offer high-quality
- translation at competitive prices. You can upload the strings you want
- translated, select the languages you want to translate into, and select your
- translation vendor based on time and price.
+ The <a href="https://support.google.com/l10n/answer/6359997">App Translation
+ Service</a> can help you quickly purchase translations of your app. In the
+ Developer Console and Android Studio, you get instant quotes from a list of
+ third-party translation vendors. Beyond the app UI strings, your order can
+ include translations for Play Store text, IAP names, and ad text.
</p>
<p>
- Once you've purchased translations, you'll receive an email from your vendor.
- Your translations are a direct business agreement between you and your
- vendor; you'll need to work directly with the vendor to manage the
- translation process and deliverables and resolve any support issues.
+ Your translation order is a direct agreement between you and your chosen
+ vendor. The vendor will work directly with you to provide clarification and
+ resolve any issues during the translation process.
</p>
<div>
@@ -736,10 +734,12 @@
</h2>
<p>
- You can use the App Translation service on Google Play to translate your
- store listing. Prepare an XML file with your store listing information
- and upload just as you would upload the strings.xml file (see <a href=
- "#gp-trans">Purchase professional translations</a>)
+ You can use the <a href=
+ "https://support.google.com/l10n/answer/6359997">App Translation
+ Service</a> on Google Play to translate your store listing. You can use
+ your existing published store listing text as the source or edit it
+ online before placing your order (see <a href="#gp-trans">Purchase
+ professional translations</a>).
</p>
</div>
</div>
diff --git a/docs/html/distribute/users/expand-to-new-markets.jd b/docs/html/distribute/users/expand-to-new-markets.jd
index df1a0fb..26c83c9 100644
--- a/docs/html/distribute/users/expand-to-new-markets.jd
+++ b/docs/html/distribute/users/expand-to-new-markets.jd
@@ -116,12 +116,20 @@
Localization</a> section of the Localization Checklist.
</p>
+<h3>
+ Purchase professional translations through Google Play
+</h3>
+
<p>
- <strong>Google Play App Translation Service</strong> can help you quickly
- find and purchase translations of your apps. In the <a href=
- "https://play.google.com/apps/publish/">Developer Console</a>, you can browse
- a list of third-party vendors who are pre-qualified by Google to offer
- high-quality professional translations at competitive prices.
+ The <a href="https://support.google.com/l10n/answer/6359997">App Translation
+ Service</a> can help you quickly purchase translations of your app. In the
+ <a href="https://support.google.com/l10n/answer/6341304">Developer
+ Console</a> and <a href=
+ "https://support.google.com/l10n/answer/6341928">Android Studio</a>, you can
+ browse a list of third-party vendors who are prequalified by Google to offer
+ high-quality translations at competitive prices. Beyond the app UI strings,
+ you can request translations for Play Store text, in-app purchase products,
+ and universal app campaign ads, all in one go.
</p>
<img src="{@docRoot}images/gp-listing-3.jpg" style="padding:8px 0">
diff --git a/docs/html/google/play/expansion-files.jd b/docs/html/google/play/expansion-files.jd
index 6d1de7e..3c01684 100755
--- a/docs/html/google/play/expansion-files.jd
+++ b/docs/html/google/play/expansion-files.jd
@@ -450,7 +450,7 @@
download two packages from the SDK Manager and add the appropriate libraries to your
application.</p>
-<p>First, open the <a href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>
+<p>First, open the <a href="{@docRoot}studio/intro/update.html">Android SDK Manager</a>
(<strong>Tools > Android > SDK Manager</strong>), and under
<em>Appearance & Behavior > System Settings > Android SDK</em>, select
the <em>SDK Tools</em> tab to select and download:</p>
diff --git a/docs/html/google/play/licensing/setting-up.jd b/docs/html/google/play/licensing/setting-up.jd
index f752182..352b79b 100755
--- a/docs/html/google/play/licensing/setting-up.jd
+++ b/docs/html/google/play/licensing/setting-up.jd
@@ -250,9 +250,8 @@
<code><<em>sdk</em>>/extras/google/market_licensing/sample/</code> (the example
application)</p>
-<p>If you aren't familiar with how to download packess into your SDK, see the
-<a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>
-document. </p>
+<p>If you aren't familiar with how to download packages into your SDK, learn how to
+<a href="{@docRoot}studio/intro/update.html">update the SDK tools</a>. </p>
<h3 id="lvl-setup">Setting Up the Licensing Verification Library</h3>
@@ -324,8 +323,7 @@
</ol>
<p>For more information about how to work with library modules in Android Studio, see
-<a href="{@docRoot}sdk/installing/create-project.html#SettingUpLibraryModule">Managing Projects from
-Android Studio</a>.</p>
+<a href="{@docRoot}studio/projects/android-library.html">Create an Android Library</a>.</p>
<h4>Copying the LVL sources to your application</h4>
diff --git a/docs/html/guide/practices/optimizing-for-3.0.jd b/docs/html/guide/practices/optimizing-for-3.0.jd
index fea54af..135ce42 100644
--- a/docs/html/guide/practices/optimizing-for-3.0.jd
+++ b/docs/html/guide/practices/optimizing-for-3.0.jd
@@ -105,11 +105,8 @@
<p>To start testing and developing your application on Android 3.0, set up your existing Android
SDK with the new platform:</p>
-<p>(If you don't have an existing Android SDK, <a href="{@docRoot}sdk/index.html">download the
-SDK starter package now</a>.)</p>
-
<ol>
- <li><a href="{@docRoot}sdk/exploring.html#launching">Launch the Android SDK
+ <li><a href="{@docRoot}studio/intro/update.html#launching">Launch the Android SDK
Manager</a> and install the following:
<ul>
<li>SDK Platform Android 3.0</li>
@@ -421,7 +418,7 @@
<p>Many of the new features and APIs that are described above and in the <a
href="{@docRoot}about/versions/android-3.0.html#api">Android 3.0 Platform</a> document also have accompanying
samples that allow you to preview the effects and can help you understand how to use them. To get
-the samples, download them from the SDK repository <a href="{@docRoot}sdk/exploring.html"
+the samples, download them from the SDK repository <a href="{@docRoot}studio/intro/update.html"
>using the Android SDK Manager</a>. After downloading the samples ("Samples for SDK API
11"), you can find them in <code><sdk_root>/samples/android-11/</code>. The following list
provides links to the browsable source code for some of the samples:</p>
diff --git a/docs/html/guide/topics/manifest/permission-element.jd b/docs/html/guide/topics/manifest/permission-element.jd
index 4bb5f6a..d8dbf40 100644
--- a/docs/html/guide/topics/manifest/permission-element.jd
+++ b/docs/html/guide/topics/manifest/permission-element.jd
@@ -10,70 +10,80 @@
android:<a href="#label">label</a>="<i>string resource</i>"
android:<a href="#nm">name</a>="<i>string</i>"
android:<a href="#pgroup">permissionGroup</a>="<i>string</i>"
- android:<a href="#plevel">protectionLevel</a>=["normal" | "dangerous" |
+ android:<a href="#plevel">protectionLevel</a>=["normal" | "dangerous" |
"signature" | "signatureOrSystem"] /></pre></dd>
<dt>contained in:</dt>
-<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code></dd>
+<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"
+ ><manifest></a></code></dd>
<dt>description:</dt>
-<dd itemprop="description">Declares a security permission that can be used to limit access
-to specific components or features of this or other applications.
-See the <a href="{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a>
-section in the introduction,
-and the <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a>
-document for more information on how permissions work.</dd>
+<dd itemprop="description">Declares a security permission that can be used to
+limit access to specific components or features of this or other applications.
+See the <a href="{@docRoot}guide/topics/manifest/manifest-intro.html#perms"
+>Permissions</a> section in the introduction, and the <a
+href="{@docRoot}guide/topics/security/security.html">Security and
+Permissions</a> document for more information on how permissions work.</dd>
<dt>attributes:</dt>
<dd><dl class="attr">
<dt><a name="desc"></a>{@code android:description}</dt>
-<dd>A user-readable description of the permission, longer and more
-informative than the label. It may be displayed to explain the
-permission to the user — for example, when the user is asked
+<dd>A user-readable description of the permission, longer and more
+informative than the label. It may be displayed to explain the
+permission to the user — for example, when the user is asked
whether to grant the permission to another application.
<p>
-This attribute must be set as a reference to a string resource;
+This attribute must be set as a reference to a string resource;
unlike the {@code label} attribute, it cannot be a raw string.
</p></dd>
<dt><a name="icon"></a>{@code android:icon}</dt>
-<dd>A reference to a drawable resource for an icon that represents the
+<dd>A reference to a drawable resource for an icon that represents the
permission.</dd>
<dt><a name="label"></a>{@code android:label}</dt>
-<dd>A name for the permission, one that can be displayed to users.
+<dd>A name for the permission, one that can be displayed to users.
<p>
-As a convenience, the label can be directly set
-as a raw string while you're developing the application. However,
-when the application is ready to be published, it should be set as a
-reference to a string resource, so that it can be localized like other
+As a convenience, the label can be directly set
+as a raw string while you're developing the application. However,
+when the application is ready to be published, it should be set as a
+reference to a string resource, so that it can be localized like other
strings in the user interface.
</p></dd>
<dt><a name="nm"></a>{@code android:name}</dt>
-<dd>The name of the permission. This is the name that will be used in
-code to refer to the permission — for example, in a
-<code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission></a></code> element and the
+<dd>The name of the permission. This is the name that will be used in
+code to refer to the permission — for example, in a
+<code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"
+ ><uses-permission></a></code> element and the
{@code permission} attributes of application components.
-<p>
-The name must be unique, so it should use Java-style scoping —
-for example, "{@code com.example.project.PERMITTED_ACTION}".
-</p></dd>
+
+<p class="note">
+ <strong>Note:</strong> The system does not allow multiple packages to declare
+ a permission with the same name, unless all the packages are signed with the
+ same certificate. If a package declares a permission, the system does not permit
+ the user to install other packages with the same permission name, unless
+ those packages are signed with the same certificate as the first package. To
+ avoid naming collisions, we recommend using reverse-domain-style naming for custom
+ permissions, for example <code>com.example.myapp.ENGAGE_HYPERSPACE</code>.
+</p>
+</dd>
<dt><a name="pgroup"></a>{@code android:permissionGroup}</dt>
-<dd>Assigns this permission to a group. The value of this attribute is
-the name of the group, which must be declared with the
-<code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html"><permission-group></a></code> element in this
+<dd>Assigns this permission to a group. The value of this attribute is
+the name of the group, which must be declared with the
+<code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html"
+ ><permission-group></a></code> element in this
or another application. If this attribute is not set, the permission
does not belong to a group.</dd>
<dt><a name="plevel"></a>{@code android:protectionLevel}</dt>
<dd>Characterizes the potential risk implied in the permission and
indicates the procedure the system should follow when determining
-whether or not to grant the permission to an application requesting it.
+whether or not to grant the permission to an application requesting it.
The value can be set to one of the following strings:
<table>
@@ -82,9 +92,9 @@
<th>Meaning</th>
</tr><tr>
<td>"{@code normal}"</td>
- <td>The default value. A lower-risk permission that gives requesting
- applications access to isolated application-level features, with
- minimal risk to other applications, the system, or the user.
+ <td>The default value. A lower-risk permission that gives requesting
+ applications access to isolated application-level features, with
+ minimal risk to other applications, the system, or the user.
The system automatically grants this type
of permission to a requesting application at installation, without
asking for the user's explicit approval (though the user always
@@ -109,11 +119,11 @@
asking for the user's explicit approval.
</tr><tr>
<td>"{@code signatureOrSystem}"</td>
- <td>A permission that the system grants only to applications that are
+ <td>A permission that the system grants only to applications that are
in the Android system image <em>or</em> that are signed with the same
- certificate as the application that declared the permission. Please avoid using this
- option, as the {@code signature} protection level should be sufficient
- for most needs and works regardless of exactly where applications are
+ certificate as the application that declared the permission. Please avoid using this
+ option, as the {@code signature} protection level should be sufficient
+ for most needs and works regardless of exactly where applications are
installed. The "{@code signatureOrSystem}"
permission is used for certain special situations where multiple
vendors have applications built into a system image and need
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 5472453..74ab8f2 100755
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -508,7 +508,7 @@
<p class="note"><strong>Note:</strong> You must use the version of
<code>aapt</code> that is provided for the latest Platform-Tools component available. If
you do not have the latest Platform-Tools component, download it using the <a
-href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>.
+href="{@docRoot}studio/intro/update.html">Android SDK Manager</a>.
</p></li>
<li>Run <code>aapt</code> using this syntax: </li>
</ol>
diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd
index afe4611..e23de86 100755
--- a/docs/html/guide/topics/resources/localization.jd
+++ b/docs/html/guide/topics/resources/localization.jd
@@ -33,6 +33,7 @@
Layouts</a></li>
<li><a href="{@docRoot}reference/android/app/Activity.html#ActivityLifecycle">
Activity Lifecycle</a></li>
+<li><a href="https://support.google.com/l10n/answer/6359997">App Translation Service</a></li>
</ol>
</div>
</div>
@@ -395,6 +396,20 @@
that Android makes available:</p>
<pre>String locale = context.getResources().getConfiguration().locale.getDisplayName();</pre>
+<h4>
+ Use the App Translation Service
+</h4>
+
+<p>
+ The <a href="https://support.google.com/l10n/answer/6359997">App Translation
+ Service</a> is integrated into the <a href=
+ "https://support.google.com/l10n/answer/6341304">Developer Console</a>, and
+ it is also accessible from <a href=
+ "https://support.google.com/l10n/answer/6341928">Android Studio</a>. It is a
+ quick and simple way to get an instant quote and place an order with a
+ translation company. You can order translations into one or more languages
+ for app UI strings, Play Store Listing text, IAP names, and ad campaign text.
+</p>
<h2 id="testing">Testing Localized Applications</h2>
@@ -414,9 +429,7 @@
<h4>Creating and using a custom locale</h4>
<p>A "custom" locale is a language/region combination that the Android
-system image does not explicitly support. (For a list of supported locales in
-Android platforms see the Version Notes in the <a
-href="{@docRoot}sdk/index.html">SDK</a> tab). You can test
+system image does not explicitly support. You can test
how your application will run in a custom locale by creating a custom locale in
the emulator. There are two ways to do this:</p>
diff --git a/docs/html/guide/topics/security/permissions.jd b/docs/html/guide/topics/security/permissions.jd
index ecbe33a..c6a12f6 100644
--- a/docs/html/guide/topics/security/permissions.jd
+++ b/docs/html/guide/topics/security/permissions.jd
@@ -18,6 +18,7 @@
</li>
<li><a href="#defining">Defining and Enforcing Permissions</a>
<ol>
+ <li><a href="#custom-recommendations">Custom permission recommendations</a></li>
<li><a href="#manifest">...in AndroidManifest.xml</a></li>
<li><a href="#broadcasts">...when Sending Broadcasts</a></li>
<li><a href="#enforcement">Other Permission Enforcement</a></li>
@@ -540,17 +541,19 @@
<a name="declaring"></a>
<h2 id="defining">Defining and Enforcing Permissions</h2>
-<p>To enforce your own permissions, you must first declare them in your
-<code>AndroidManifest.xml</code> using one or more
-<code>{@link android.R.styleable#AndroidManifestPermission <permission>}</code>
-tags.</p>
+<p>
+ To enforce your own permissions, you must first declare them in your
+ <code>AndroidManifest.xml</code> using one or more <a href=
+ "{@docRoot}guide/topics/manifest/permission-element.html"><code><permission></code></a>
+ elements.
+</p>
<p>For example, an application that wants to control who can start one
of its activities could declare a permission for this operation as follows:</p>
<pre><manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.me.app.myapp" >
- <permission android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY"
+ package="com.example.myapp" >
+ <permission android:name="com.example.myapp.permission.DEADLY_ACTIVITY"
android:label="@string/permlab_deadlyActivity"
android:description="@string/permdesc_deadlyActivity"
android:permissionGroup="android.permission-group.COST_MONEY"
@@ -558,50 +561,65 @@
...
</manifest></pre>
+<p class="note">
+ <strong>Note:</strong> The system does not allow multiple packages to declare
+ a permission with the same name, unless all the packages are signed with the
+ same certificate. If a package declares a permission, the system does not permit
+ the user to install other packages with the same permission name, unless
+ those packages are signed with the same certificate as the first package. To
+ avoid naming collisions, we recommend using reverse-domain-style naming for custom
+ permissions, for example <code>com.example.myapp.ENGAGE_HYPERSPACE</code>.
+</p>
+
<p>The {@link android.R.styleable#AndroidManifestPermission_protectionLevel
-<protectionLevel>} attribute is required, telling the system how the
+protectionLevel} attribute is required, telling the system how the
user is to be informed of applications requiring the permission, or who is
allowed to hold that permission, as described in the linked documentation.</p>
-<p>The {@link android.R.styleable#AndroidManifestPermission_permissionGroup
-<permissionGroup>} attribute is optional, and only used to help the system display
-permissions to the user. You will usually want to set this to either a standard
-system group (listed in {@link android.Manifest.permission_group
-android.Manifest.permission_group}) or in more rare cases to one defined by
-yourself. It is preferred to use an existing group, as this simplifies the
-permission UI shown to the user.</p>
+<p>
+ The <a href=
+ "{@docRoot}guide/topics/manifest/permission-group-element.html"
+ ><code>android:permissionGroup</code></a>
+ attribute is optional, and only used to help the system display permissions
+ to the user. In most cases you will want to set this to a standard system
+ group (listed in {@link android.Manifest.permission_group
+ android.Manifest.permission_group}), although you can define a group yourself.
+ It is preferable to use an existing group, as this simplifies the
+ permission UI shown to the user.
+</p>
-<p>Note that both a label and description should be supplied for the
-permission. These are string resources that can be displayed to the user when
+<p>You need to supply both a label and description for the
+permission. These are string resources that the user can see when
they are viewing a list of permissions
(<code>{@link android.R.styleable#AndroidManifestPermission_label android:label}</code>)
or details on a single permission (
<code>{@link android.R.styleable#AndroidManifestPermission_description android:description}</code>).
-The label should be short, a few words
+The label should be short; a few words
describing the key piece of functionality the permission is protecting. The
-description should be a couple sentences describing what the permission allows
-a holder to do. Our convention for the description is two sentences, the first
-describing the permission, the second warning the user of what bad things
-can happen if an application is granted the permission.</p>
+description should be a couple of sentences describing what the permission allows
+a holder to do. Our convention is a two-sentence description:
+the first sentence describes the permission, and the second sentence warns the
+user of the type of things that can go wrong if an application is granted the
+permission.</p>
<p>Here is an example of a label and description for the CALL_PHONE
permission:</p>
<pre>
- <string name="permlab_callPhone">directly call phone numbers</string>
- <string name="permdesc_callPhone">Allows the application to call
- phone numbers without your intervention. Malicious applications may
- cause unexpected calls on your phone bill. Note that this does not
- allow the application to call emergency numbers.</string>
+<string name="permlab_callPhone">directly call phone numbers</string>
+<string name="permdesc_callPhone">Allows the application to call
+ phone numbers without your intervention. Malicious applications may
+ cause unexpected calls on your phone bill. Note that this does not
+ allow the application to call emergency numbers.</string>
</pre>
-<p>You can look at the permissions currently defined in the system with the
+<p>You can view at the permissions currently defined in the system using the
Settings app and the shell command <code>adb shell pm list permissions</code>.
-To use the Settings app, go to Settings > Applications. Pick an app and
+To use the Settings app, go to <b>Settings</b> > <b>Applications</b>. Pick an app and
scroll down to see the permissions that the app uses. For developers, the adb '-s'
option displays the permissions in a form similar to how the user will see them:</p>
-<pre>
+<pre class="no-pretty-print">
$ adb shell pm list permissions -s
All Permissions:
@@ -615,14 +633,53 @@
...</pre>
+<h3 id="custom-recommendations">
+ Custom permission recommendations
+</h3>
+
+<p>
+ Apps can define their own custom permissions and request custom permissions
+ from other apps by defining <a href=
+ "{@docRoot}guide/topics/manifest/uses-permission-element.html"><code
+ ><uses-permission></code></a> elements.
+ However, you should carefully assess whether it is necessary for your app to
+ do so.
+</p>
+
+<ul>
+ <li>If you are designing a suite of apps that expose functionality to one
+ another, try to design the apps so that each permission is defined only once.
+ You must do this if the apps are not all signed with the same certificate.
+ Even if the apps are all signed with the same certificate, it's a
+ best practice to define each permission once only.
+ </li>
+
+ <li>If the functionality is only available to apps signed with the same
+ signature as the providing app, you may be able to avoid defining custom
+ permissions by using signature checks. When one of your apps makes a request
+ of another of your apps, the second app can verify that both apps are signed
+ with the same certificate before complying with the request.
+ </li>
+
+ <li>If you are developing a suite of apps runs only on your own
+ devices, you should develop and install a package that
+ manages permissions for all the apps in the suite. This package does not need
+ to provide any services itself. It just declares all the permissions, and the
+ other apps in the suite request those permissions with the <a href=
+ "{@docRoot}guide/topics/manifest/uses-permission-element.html"><code
+ ><uses-permission></code></a>
+ element.
+ </li>
+</ul>
+
<a name="manifest"></a>
<h3>Enforcing Permissions in AndroidManifest.xml</h3>
-<p>High-level permissions restricting access to entire components of the
-system or application can be applied through your
-<code>AndroidManifest.xml</code>. All that this requires is including an {@link
+<p>TYou can apply high-level permissions restricting access to entire components
+of the system or application through your
+<code>AndroidManifest.xml</code>. To do this, include an {@link
android.R.attr#permission android:permission} attribute on the desired
-component, naming the permission that will be used to control access to
+component, naming the permission that controls access to
it.</p>
<p><strong>{@link android.app.Activity}</strong> permissions
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 2f67c58..28b8626 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -55,7 +55,7 @@
</a>
<ul class="dac-actions">
<li class="dac-action">
- <a class="dac-action-link" href="{@docRoot}sdk/index.html">
+ <a class="dac-action-link" href="{@docRoot}studio/index.html">
<i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
Get Android Studio
</a>
@@ -82,7 +82,7 @@
<i class="dac-sprite dac-arrow-down-gray"></i>
</a>
<div class="actions">
- <div><a href="{@docRoot}sdk/index.html">
+ <div><a href="{@docRoot}studio/index.html">
<span class="dac-sprite dac-auto-chevron-large"></span>
Get Android Studio
</a></div>
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index f155521..96a210c 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -18,7 +18,7 @@
"resources": [
"training/building-wearables.html",
"training/material/index.html",
- "sdk/index.html"
+ "studio/index.html"
]
},
"index/secondary/carousel": {
@@ -359,7 +359,7 @@
"distribute/essentials/quality/tv.html",
"distribute/essentials/quality/wear.html",
"distribute/essentials/quality/auto.html",
- "https://developers.google.com/edu/guidelines"
+ "distribute/essentials/quality/billions.html"
]
},
"distribute/essentials/zhcn": {
@@ -395,6 +395,7 @@
"resources": [
"distribute/engage/intents.html",
"distribute/engage/widgets.html",
+ "distribute/engage/translate.html",
"distribute/engage/notifications.html",
"distribute/engage/deep-linking.html",
"distribute/engage/ads.html",
@@ -490,7 +491,7 @@
"distribute/essentials/quality/wear.html",
"distribute/essentials/quality/tv.html",
"distribute/essentials/quality/auto.html",
- "https://developers.google.com/edu/guidelines"
+ "distribute/essentials/quality/billions.html"
]
},
"distribute/essentials/tools": {
@@ -991,6 +992,44 @@
"google/play/filters.html"
]
},
+ "distribute/essentials/billionsquality/connectivity": {
+ "title": "",
+ "resources": [
+ "training/basics/network-ops/managing.html",
+ "training/monitoring-device-state/connectivity-monitoring.html",
+ "guide/topics/providers/content-providers.html"
+ ]
+ },
+ "distribute/essentials/billionsquality/capability": {
+ "title": "",
+ "resources": [
+ "guide/practices/screens_support.html",
+ "training/multiscreen/screendensities.html",
+ "training/articles/memory.html"
+ ]
+ },
+ "distribute/essentials/billionsquality/cost": {
+ "title": "",
+ "resources": [
+ "https://medium.com/@wkalicinski/smallerapk-part-6-image-optimization-zopfli-webp-4c462955647d#.23hlddo3x",
+ "training/basics/network-ops/managing.html"
+ ]
+ },
+ "distribute/essentials/billionsquality/consumption": {
+ "title": "",
+ "resources": [
+ "training/efficient-downloads/efficient-network-access.html",
+ "training/monitoring-device-state/index.html"
+ ]
+ },
+ "distribute/essentials/billionsquality/content": {
+ "title": "",
+ "resources": [
+ "training/material/animations.html#Touch",
+ "training/articles/perf-anr.html",
+ "training/improving-layouts/index.html"
+ ]
+ },
"distribute/essentials/tabletguidelines": {
"title": "",
"resources": [
@@ -1023,6 +1062,12 @@
"guide/topics/appwidgets/index.html"
]
},
+ "distribute/engage/translate": {
+ "title": "",
+ "resources": [
+ "https://support.google.com/l10n/answer/6359997"
+ ]
+ },
"distribute/engage/reengage": {
"title": "",
"resources": [
@@ -1275,7 +1320,8 @@
"distribute/toolsreference/launchchecklist/localization": {
"title": "",
"resources": [
- "distribute/tools/localization-checklist.html"
+ "distribute/tools/localization-checklist.html",
+ "https://support.google.com/l10n/answer/6359997"
]
},
"distribute/toolsreference/launchchecklist/graphics": {
@@ -1814,7 +1860,7 @@
"resources": [
"tools/studio/index.html",
"tools/studio/studio-features.html",
- "sdk/installing/studio-tips.html",
+ "studio/intro/index.html",
]
},
"tools/landing/latest": {
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index d176883..225d4ec 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -32,6 +32,17 @@
"type":"medium"
},
{
+ "title":"SmallerAPK, Part 6: Image optimization, Zopfli & WebP",
+ "category":"",
+ "summary":"Series of posts on minimizing your APK size.",
+ "url":"https://medium.com/@wkalicinski/smallerapk-part-6-image-optimization-zopfli-webp-4c462955647d#.23hlddo3x",
+ "group":"",
+ "keywords": [],
+ "tags": [],
+ "image":"https://cdn-images-1.medium.com/max/2000/1*chMiA9mGa_FBUOoesHHk3Q.png",
+ "type":"medium"
+ },
+ {
"title":"Measure your app’s user acquisition channels",
"titleFriendly":"",
"summary":"Get details on how to use the Developer Console User Acquisitions reports to discover where your users come from.",
@@ -999,6 +1010,19 @@
"lang": "en",
"group": "",
"tags": [],
+ "url": "training/material/animations.html#Touch",
+ "timestamp": 1194884220000,
+ "image": null,
+ "title": "Customize Touch Feedback",
+ "summary": "Provide visual confirmation when users interact with your UI.",
+ "keywords": [],
+ "type": "develop",
+ "category": "guide"
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
"url": "guide/topics/manifest/uses-feature-element.html#testing",
"timestamp": 1194884220000,
"image": null,
@@ -2735,6 +2759,27 @@
"group": "",
"tags": [
"marketing",
+ "engagement",
+ "translate"
+ ],
+ "url": "https://support.google.com/l10n/answer/6359997",
+ "timestamp": null,
+ "image": "images/play_dev.jpg",
+ "title": "Use the App Translation Service",
+ "summary": "The App Translation Service is a human translation service. It makes it easy to order translations for app UI strings, Play Store text, in-app purchase products, and universal app campaign ads.",
+ "keywords": [
+ "marketing",
+ "engagement",
+ "translate"
+ ],
+ "type": "distribute",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [
+ "marketing",
"engagement"
],
"url": "https://support.google.com/adwords/answer/6167162",
diff --git a/docs/html/jd_extras_en.js b/docs/html/jd_extras_en.js
index e1a65798..7ad755c 100644
--- a/docs/html/jd_extras_en.js
+++ b/docs/html/jd_extras_en.js
@@ -657,7 +657,54 @@
"image":"https://i1.ytimg.com/vi/K2dodTXARqc/maxresdefault.jpg",
"type":"video"
},
-
+ {
+ "title":"Instant Run: An Android Tool Time Deep Dive",
+ "category":"",
+ "summary":"Instant Run is an Android Studio feature that significantly reduces the time for building and deploying incremental code changes during your coding / testing / debugging lifecycle.",
+ "url":"https://www.youtube.com/watch?v=StqAZ1OQbqA&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa",
+ "group":"",
+ "keywords": ["studio", "tools"],
+ "tags": [
+ ],
+ "image":"https://i1.ytimg.com/vi/StqAZ1OQbqA/maxresdefault.jpg",
+ "type":"youtube"
+ },
+ {
+ "title":"What’s New in Android Studio 2.1",
+ "category":"",
+ "summary":"Android Studio 2.1 is required to try out new features and APIs of the Android N developer preview including the new Jack compiler and Java 8 language support. It also includes performance improvements to Instant Run, and a number of bug fixes and stability improvements.",
+ "url":"https://www.youtube.com/watch?v=ZOz_yr8Yxq8&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa",
+ "group":"",
+ "keywords": ["studio", "tools"],
+ "tags": [
+ ],
+ "image":"https://i1.ytimg.com/vi/ZOz_yr8Yxq8/maxresdefault.jpg",
+ "type":"youtube"
+ },
+ {
+ "title":"10 Things You Didn’t Know You Could Do",
+ "category":"",
+ "summary":"This Android Tool Time pro-tip roundup with Reto Meier shows off expert Android Studio tips designed to help you write less code, and make every keystroke count",
+ "url":"https://www.youtube.com/watch?v=eOV2owswDkE&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa",
+ "group":"",
+ "keywords": ["studio", "tools"],
+ "tags": [
+ ],
+ "image":"https://i1.ytimg.com/vi/eOV2owswDkE/maxresdefault.jpg",
+ "type":"youtube"
+ },
+ {
+ "title":"Live Templates in Android Studio",
+ "category":"",
+ "summary":"Android Tool Time Protip: Use and create your own Live Templates in Android Studio to write more code with less keystrokes using Live Templates to insert common, templatized code snippets.",
+ "url":"https://www.youtube.com/watch?v=4rI4tTd7-J8&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa",
+ "group":"",
+ "keywords": ["studio", "tools"],
+ "tags": [
+ ],
+ "image":"https://i1.ytimg.com/vi/4rI4tTd7-J8/maxresdefault.jpg",
+ "type":"youtube"
+ },
{
"title":"Google Play Services 7.5",
"category":"",
@@ -2638,6 +2685,27 @@
"group": "",
"tags": [
"marketing",
+ "engagement",
+ "translate"
+ ],
+ "url": "https://support.google.com/l10n/answer/6359997",
+ "timestamp": null,
+ "image": "images/play_dev.jpg",
+ "title": "Use the App Translation Service",
+ "summary": "The App Translation Service is a human translation service. It makes it easy to order translations for app UI strings, Play Store text, in-app purchase products, and universal app campaign ads.",
+ "keywords": [
+ "marketing",
+ "engagement",
+ "translate"
+ ],
+ "type": "distribute",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [
+ "marketing",
"engagement"
],
"url": "https://support.google.com/adwords/answer/6167162",
@@ -3711,11 +3779,10 @@
"develop/landing/tools": {
"title": "",
"resources": [
- "https://www.youtube.com/watch?v=K2dodTXARqc&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
- "https://www.youtube.com/watch?v=cD7NPxuuXYY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
- "https://www.youtube.com/watch?v=JLLnhwtDoHw&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
- "https://www.youtube.com/watch?v=2I6fuD20qlY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
- "https://www.youtube.com/watch?v=5Be2mJzP-Uw&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX"
+ "https://www.youtube.com/watch?v=StqAZ1OQbqA&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa",
+ "https://www.youtube.com/watch?v=ZOz_yr8Yxq8&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa",
+ "https://www.youtube.com/watch?v=eOV2owswDkE&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa",
+ "https://www.youtube.com/watch?v=4rI4tTd7-J8&list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa"
]
},
"google/landing/services": {
@@ -3852,7 +3919,6 @@
"distribute/essentials/quality/wear.html",
"distribute/essentials/quality/auto.html",
"distribute/essentials/quality/billions.html",
- "https://developers.google.com/edu/guidelines"
]
},
"distribute/users": {
@@ -3878,6 +3944,7 @@
"resources": [
"distribute/engage/intents.html",
"distribute/engage/widgets.html",
+ "distribute/engage/translate.html",
"distribute/engage/notifications.html",
"distribute/engage/deep-linking.html",
"distribute/engage/ads.html",
@@ -4492,6 +4559,12 @@
"guide/topics/appwidgets/index.html"
]
},
+ "distribute/engage/translate": {
+ "title": "",
+ "resources": [
+ "https://support.google.com/l10n/answer/6359997"
+ ]
+ },
"distribute/engage/reengage": {
"title": "",
"resources": [
diff --git a/docs/html/legal.jd b/docs/html/legal.jd
index 0a68508..8385774 100755
--- a/docs/html/legal.jd
+++ b/docs/html/legal.jd
@@ -17,7 +17,7 @@
mobile.</p>
<p>To start developing apps for Android, <a
-href="{@docRoot}sdk/index.html">download the free Android SDK</a>.</p>
+href="{@docRoot}studio/index.html">download the free Android SDK</a>.</p>
<h2 id="Brands">Android Brands</h2>
diff --git a/docs/html/ndk/guides/_book.yaml b/docs/html/ndk/guides/_book.yaml
index 287a92d..c015d7a 100644
--- a/docs/html/ndk/guides/_book.yaml
+++ b/docs/html/ndk/guides/_book.yaml
@@ -60,6 +60,16 @@
path: /ndk/guides/audio/basics.html
- title: OpenSL ES for Android
path: /ndk/guides/audio/opensl-for-android.html
+ - title: Audio Input Latency
+ path: /ndk/guides/audio/input-latency.html
+ - title: Audio Output Latency
+ path: /ndk/guides/audio/output-latency.html
+ - title: Floating-Point Audio
+ path: /ndk/guides/audio/floating-point.html
+ - title: Sample Rates
+ path: /ndk/guides/audio/sample-rates.html
+ - title: OpenSL ES Programming Notes
+ path: /ndk/guides/audio/opensl-prog-notes.html
- title: Vulkan
path: /ndk/guides/graphics/index.html
diff --git a/docs/html/ndk/guides/audio/basics.jd b/docs/html/ndk/guides/audio/basics.jd
index a5f0ff5..bdb85fb 100644
--- a/docs/html/ndk/guides/audio/basics.jd
+++ b/docs/html/ndk/guides/audio/basics.jd
@@ -1,4 +1,4 @@
-page.title=OpenSL ES™ Basics
+page.title=High-Performance Audio Basics
@jd:body
<div id="qv-wrapper">
@@ -6,26 +6,51 @@
<h2>On this page</h2>
<ol>
+ <li><a href="#overview">Building Great Audio Apps</a></li>
<li><a href="#adding">Adding OpenSL ES to Your App</a></li>
<li><a href="#building">Building and Debugging</a></li>
+ <li><a href="#power">Audio Power Consumption</a></li>
<li><a href="#samples">Samples</a></li>
</ol>
</div>
</div>
+<a href="https://www.youtube.com/watch?v=d3kfEeMZ65c" class="notice-developers-video">
+<div>
+ <h3>Video</h3>
+ <p>Google I/O 2013 - High Performance Audio</p>
+</div>
+</a>
<p>
-The Khronos Group's OpenSL ES standard exposes audio features
+The Khronos Group's OpenSL ES™ standard exposes audio features
similar to those in the {@link android.media.MediaPlayer} and {@link android.media.MediaRecorder}
APIs in the Android Java framework. OpenSL ES provides a C language interface as well as
C++ bindings, allowing you to call it from code written in either language.
</p>
<p>
-This page describes how to add these audio APIs into your app's source code, and how to incorporate
-them into the build process.
+This page describes the typical use cases for these high-performance audio APIs, how to add them
+into your app's source code, and how to incorporate them into the build process.
</p>
+<h2 id="overview">Building Great Audio Apps</h2>
+
+<p>
+The OpenSL ES APIs are available to help you develop and improve your app's audio performance.
+ Some typical use cases include the following:</p>
+
+<ul>
+ <li>Digital Audio Workstations (DAWs).</li>
+ <li>Synthesizers.</li>
+ <li>Drum machines.</li>
+ <li>Music learning apps.</li>
+ <li>Karaoke apps.</li>
+ <li>DJ mixing.</li>
+ <li>Audio effects.</li>
+ <li>Video/audio conferencing.</li>
+</ul>
+
<h2 id="adding">Adding OpenSL ES to your App</h2>
<p>
@@ -45,6 +70,18 @@
#include <SLES/OpenSLES_Android.h>
</pre>
+<p>
+When you include the {@code OpenSLES_Android.h} header file, the following headers are included
+automatically:
+</p>
+<pre>
+#include <SLES/OpenSLES_AndroidConfiguration.h>
+#include <SLES/OpenSLES_AndroidMetadata.h>
+</pre>
+
+<p class="note"><strong>Note: </strong>
+These headers are not required, but are shown as an aid in learning the API.
+</p>
<h2 id="building">Building and Debugging</h2>
@@ -69,9 +106,9 @@
</p>
<p>
-We use asserts in our <a href="https://github.com/googlesamples/android-ndk">examples</a>, because
-they help catch unrealistic conditions that would indicate a coding error. We have used explicit
-error handling for other conditions more likely to occur in production.
+We use asserts in our <a class="external-link" href="https://github.com/googlesamples/android-ndk">
+examples</a>, because they help catch unrealistic conditions that would indicate a coding error. We
+have used explicit error handling for other conditions more likely to occur in production.
</p>
<p>
@@ -91,18 +128,25 @@
</pre>
<p>
-To examine the log from Android Studio, either click the <em>Logcat</em> tab in the
-<a href="{@docRoot}tools/debugging/debugging-studio.html#runDebug"><em>Debug</em></a>
-window, or click the <em>Devices | logcat</em> tab in the
-<a href="{@docRoot}tools/debugging/debugging-studio.html#systemLogView"><em>Android DDMS</em></a>
+To examine the log from Android Studio, either click the <strong>Logcat</strong> tab in the
+<a href="{@docRoot}tools/debugging/debugging-studio.html#runDebug">Debug</a>
+window, or click the <strong>Devices | logcat</strong> tab in the
+<a href="{@docRoot}tools/debugging/debugging-studio.html#systemLogView">Android DDMS</a>
window.
</p>
-
+<h2 id="power">Audio Power Consumption</h2>
+<p>Constantly outputting audio incurs significant power consumption. Ensure that you stop the
+ output in the
+ <a href="{@docRoot}reference/android/app/Activity.html#onPause()">onPause()</a> method.
+ Also consider pausing the silent output after some period of user inactivity.
+</p>
<h2 id="samples">Samples</h2>
<p>
Supported and tested example code that you can use as a model for your own code resides both locally
-and on GitHub. The local examples are located in
+and on
+<a class="external-link" href="https://github.com/googlesamples/android-audio-high-performance/">
+GitHub</a>. The local examples are located in
{@code platforms/android-9/samples/native-audio/}, under your NDK root installation directory.
On GitHub, they are available from the
<a class="external-link" href="https://github.com/googlesamples/android-ndk">{@code android-ndk}</a>
@@ -122,4 +166,4 @@
For more information on differences between the reference specification and the
Android implementation, see
<a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">
-OpenSL ES™ for Android</a>.
+OpenSL ES for Android</a>.
diff --git a/docs/html/ndk/guides/audio/floating-point.jd b/docs/html/ndk/guides/audio/floating-point.jd
new file mode 100644
index 0000000..76efce3f
--- /dev/null
+++ b/docs/html/ndk/guides/audio/floating-point.jd
@@ -0,0 +1,101 @@
+page.title=Floating-Point Audio
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>On this page</h2>
+
+ <ol>
+ <li><a href="#best">Best Practices for Floating-Point Audio</a></li>
+ <li><a href="#support">Floating-Point Audio in Android SDK</a></li>
+ <li><a href="#more">For More Information</a></li>
+ </ol>
+ </div>
+ </div>
+
+<a href="https://www.youtube.com/watch?v=sIcieUqMml8" class="notice-developers-video">
+<div>
+ <h3>Video</h3>
+ <p>Will it Float? The Glory and Shame of Floating-Point Audio</p>
+</div>
+</a>
+
+<p>Using floating-point numbers to represent audio data can significantly enhance audio
+ quality in high-performance audio applications. Floating point offers the following
+ advantages:</p>
+
+<ul>
+<li>Wider dynamic range.</li>
+<li>Consistent accuracy across the dynamic range.</li>
+<li>More headroom to avoid clipping during intermediate calculations and transients.</li>
+</ul>
+
+<p>While floating-point can enhance audio quality, it does present certain disadvantages:</p>
+
+<ul>
+<li>Floating-point numbers use more memory.</li>
+<li>Floating-point operations employ unexpected properties, for example, addition is
+ not associative.</li>
+<li>Floating-point calculations can sometimes lose arithmetic precision due to rounding or
+ numerically unstable algorithms.</li>
+<li>Using floating-point effectively requires greater understanding to achieve accurate
+ and reproducible results.</li>
+</ul>
+
+<p>
+ Formerly, floating-point was notorious for being unavailable or slow. This is
+ still true for low-end and embedded processors. But processors on modern
+ mobile devices now have hardware floating-point with performance that is
+ similar (or in some cases even faster) than integer. Modern CPUs also support
+ <a href="http://en.wikipedia.org/wiki/SIMD" class="external-link">SIMD</a>
+ (Single instruction, multiple data), which can improve performance further.
+</p>
+
+<h2 id="best">Best Practices for Floating-Point Audio</h2>
+<p>The following best practices help you avoid problems with floating-point calculations:</p>
+<ul>
+<li>Use double precision floating-point for infrequent calculations,
+such as computing filter coefficients.</li>
+<li>Pay attention to the order of operations.</li>
+<li>Declare explicit variables for intermediate values.</li>
+<li>Use parentheses liberally.</li>
+<li>If you get a NaN or infinity result, use binary search to discover
+where it was introduced.</li>
+</ul>
+
+<h2 id="support">Floating-Point Audio in Android SDK</h2>
+
+<p>For floating-point audio, the audio format encoding
+ <code>AudioFormat.ENCODING_PCM_FLOAT</code> is used similarly to
+ <code>ENCODING_PCM_16_BIT</code> or <code>ENCODING_PCM_8_BIT</code> for specifying
+ AudioTrack data
+formats. The corresponding overloaded method <code>AudioTrack.write()</code>
+ takes in a float array to deliver data.</p>
+
+<pre>
+ public int write(float[] audioData,
+ int offsetInFloats,
+ int sizeInFloats,
+ int writeMode)
+</pre>
+
+<h2 id="more">For More Information</h2>
+
+<p>The following Wikipedia pages are helpful in understanding floating-point audio:</p>
+
+<ul>
+<li><a href="http://en.wikipedia.org/wiki/Audio_bit_depth" class="external-link" >Audio bit depth</a></li>
+<li><a href="http://en.wikipedia.org/wiki/Floating_point" class="external-link" >Floating point</a></li>
+<li><a href="http://en.wikipedia.org/wiki/IEEE_floating_point" class="external-link" >IEEE 754 floating-point</a></li>
+<li><a href="http://en.wikipedia.org/wiki/Loss_of_significance" class="external-link" >Loss of significance</a>
+ (catastrophic cancellation)</li>
+<li><a href="https://en.wikipedia.org/wiki/Numerical_stability" class="external-link" >Numerical stability</a></li>
+</ul>
+
+<p>The following article provides information on those aspects of floating-point that have a
+ direct impact on designers of computer systems:</p>
+<ul>
+<li><a href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html" class="external-link" >What every
+ computer scientist should know about floating-point arithmetic</a>
+by David Goldberg, Xerox PARC (edited reprint).</li>
+</ul>
diff --git a/docs/html/ndk/guides/audio/index.jd b/docs/html/ndk/guides/audio/index.jd
index ac6e539..12d9320 100644
--- a/docs/html/ndk/guides/audio/index.jd
+++ b/docs/html/ndk/guides/audio/index.jd
@@ -1,15 +1,27 @@
-page.title=NDK Audio: OpenSL ES™
+page.title=NDK High-Performance Audio
@jd:body
<p>The NDK package includes an Android-specific implementation of the
-<a href="https://www.khronos.org/opensles/">OpenSL ES</a> API
-specification from the <a href="https://www.khronos.org">Khronos Group</a>. This library
-allows you to use C or C++ to implement high-performance, low-latency audio in your game or other
-demanding app.</p>
+<a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES™</a> API
+specification from the <a class="external-link" href="https://www.khronos.org">Khronos Group</a>.
+This library allows you to use C or C++ to implement high-performance, low-latency audio, whether
+you are writing a synthesizer, digital audio workstation, karaoke, game,
+ or other real-time app.</p>
<p>This section begins by providing some
-<a href="{@docRoot}ndk/guides/audio/basics.html">basic information</a> about the API, including how
-to incorporate it into your app. It then explains what you need to know about the
-<a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">Android-specific implementation</a>
-of OpenSL ES, focusing on differences between this implementation and the reference specification.
-</p>
+<a href="{@docRoot}ndk/guides/audio/basics.html">basic information</a> about the API, including
+typical use cases and how to incorporate it into your app. It then explains what you need to know
+about the <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">Android-specific
+implementation</a> of OpenSL ES, focusing on the differences between this implementation and the
+reference specification. Next, you'll learn how to minimze
+ <a href="{@docRoot}ndk/guides/audio/input-latency.html">input latency</a>
+ when using built-in or external microphones
+and some actions that you can take to minimize
+ <a href="{@docRoot}ndk/guides/audio/output-latency.html">output latency</a>.
+ It describes the reasons that you should use
+ <a href="{@docRoot}ndk/guides/audio/floating-point.html">floating-point</a>
+ numbers to represent your audio data, and it provides information that will help you choose the
+optimal <a href="{@docRoot}ndk/guides/audio/sample-rates.html">sample rate</a>. This section
+ concludes with some supplemental <a href="{@docRoot}ndk/guides/audio/opensl-prog-notes.html">
+ programming notes</a> to ensure proper implementation of OpenSL ES.
+ </p>
diff --git a/docs/html/ndk/guides/audio/input-latency.jd b/docs/html/ndk/guides/audio/input-latency.jd
new file mode 100644
index 0000000..f1103fc
--- /dev/null
+++ b/docs/html/ndk/guides/audio/input-latency.jd
@@ -0,0 +1,95 @@
+page.title=Audio Input Latency
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>On this page</h2>
+
+ <ol>
+ <li><a href="#check-list">Checklist</a></li>
+ <li><a href="#ways">Ways to Reduce Audio Input Latency</a></li>
+ <li><a href="#avoid">What to Avoid</a></li>
+ </ol>
+ </div>
+ </div>
+
+
+<p>This page provides guidelines to help you reduce audio input latency when recording with a
+built-in microphone or an external headset microphone.</p>
+
+<h2 id="check-list">Checklist</h2>
+
+<p>Here are a few important prerequisites:</p>
+
+<ul>
+ <li>You must use the Android-specific implementation of the
+ <a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES™</a> API.
+
+ <li>If you haven't already done so, download and install the
+ <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.</li>
+
+ <li>Many of the same requirements for low-latency audio output also apply to low-latency input,
+ so read the requirements for low-latency output in
+ <a href="{@docRoot}ndk/guides/audio/output-latency.html">Audio Output Latency</a>.</li>
+</ul>
+
+<h2 id="ways">Ways to Reduce Audio Input Latency</h2>
+
+<p>The following are some methods to help ensure low audio input latency:
+
+<ul>
+ <li>Suggest to your users, if your app relies on low-latency audio, that they use a headset
+(for example, by displaying a <em>Best with headphones</em> screen on first run). Note
+that just using the headset doesn’t guarantee the lowest possible latency. You may need to
+perform other steps to remove any unwanted signal processing from the audio path, such as by
+using the <a href="http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html#VOICE_RECOGNITION">
+VOICE_RECOGNITION</a> preset when recording.</li>
+
+ <li>It's difficult to test audio input and output latency in isolation. The best solution to
+determine the lowest possible audio input latency is to measure round-trip audio and divide
+by two.</li>
+ <li> Be prepared to handle nominal sample rates of 44,100 and 48,000 Hz as reported by
+<a href="{@docRoot}reference/android/media/AudioManager.html#getProperty(java.lang.String)">
+getProperty(String)</a> for
+<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_SAMPLE_RATE">
+PROPERTY_OUTPUT_SAMPLE_RATE</a>. Other sample rates are possible, but rare.</li>
+
+ <li>Be prepared to handle the buffer size reported by
+<a href="{@docRoot}reference/android/media/AudioManager.html#getProperty(java.lang.String)">
+getProperty(String)</a> for
+<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_FRAMES_PER_BUFFER">
+PROPERTY_OUTPUT_FRAMES_PER_BUFFER</a>. Typical buffer sizes include 96, 128, 160, 192, 240, 256,
+or 512 frames, but other values are possible.</li>
+</ul>
+
+<h2 id="avoid">What to Avoid</h2>
+
+<p>Be sure to take these things into account to help avoid latency issues:</p>
+
+<ul>
+ <li>Don’t assume that the speakers and microphones used in mobile devices generally have good
+acoustics. Due to their small size, the acoustics are generally poor so signal processing is
+added to improve the sound quality. This signal processing introduces latency.</li>
+
+ <li>Don't assume that your input and output callbacks are synchronized. For simultaneous input
+and output, separate buffer queue completion handlers are used for each side. There is no
+guarantee of the relative order of these callbacks or the synchronization of the audio clocks,
+even when both sides use the same sample rate. Your application should buffer the data with
+proper buffer synchronization.</li>
+
+ <li>Don't assume that the actual sample rate exactly matches the nominal sample rate. For
+example, if the nominal sample rate is 48,000 Hz, it is normal for the audio clock to advance
+at a slightly different rate than the operating system {@code CLOCK_MONOTONIC}. This is because
+the audio and system clocks may derive from different crystals.</li>
+
+ <li>Don't assume that the actual playback sample rate exactly matches the actual capture sample
+rate, especially if the endpoints are on separate paths. For example, if you are capturing from
+the on-device microphone at 48,000 Hz nominal sample rate, and playing on USB audio
+at 48,000 Hz nominal sample rate, the actual sample rates are likely to be slightly different
+from each other.</li>
+</ul>
+
+<p>A consequence of potentially independent audio clocks is the need for asynchronous sample rate
+conversion. A simple (though not ideal for audio quality) technique for asynchronous sample rate
+conversion is to duplicate or drop samples as needed near a zero-crossing point. More
+sophisticated conversions are possible.</p>
diff --git a/docs/html/ndk/guides/audio/opensl-for-android.jd b/docs/html/ndk/guides/audio/opensl-for-android.jd
index 763da5a..fa5e260 100644
--- a/docs/html/ndk/guides/audio/opensl-for-android.jd
+++ b/docs/html/ndk/guides/audio/opensl-for-android.jd
@@ -1,4 +1,4 @@
-page.title=Native Audio: OpenSL ES™ for Android
+page.title=OpenSL ES for Android
@jd:body
<div id="qv-wrapper">
@@ -6,23 +6,158 @@
<h2>On this page</h2>
<ol>
+ <li><a href="#getstarted">Getting Started</a></li>
<li><a href="#inherited">Features Inherited from the Reference Specification</a></li>
+ <li><a href="#planning">Planning for Future Versions of OpenSL ES</a></li>
<li><a href="#ae">Android Extensions</a></li>
+ <li><a href="#notes">Programming Notes</a></li>
+ <li><a href="#platform-issues">Platform Issues</a></li>
</ol>
</div>
</div>
<p>
-This page provides details about how the NDK implementation of OpenSL ES™ differs
-from the reference specification for OpenSL ES 1.0.1. When using sample code from the
+This page provides details about how the
+<a href="{@docRoot}tools/sdk/ndk/index.html">NDK</a> implementation of OpenSL
+ES™ differs from the reference specification for OpenSL ES 1.0.1. When using sample code from the
specification, you may need to modify it to work on Android.
</p>
+<p>
+Unless otherwise noted, all features are available at Android 2.3 (API level 9) and higher.
+ Some features are only available for Android 4.0 (API level 14); these are noted.
+</p>
+
+<p class="note"><strong>Note: </strong>
+The Android Compatibility Definition Document (CDD) enumerates the hardware and software
+requirements of a compatible Android device. See
+<a class="external-link" href="https://source.android.com/compatibility/">Android Compatibility</a>
+for more information on the overall compatibility program, and
+<a class="external-link" href="https://static.googleusercontent.com/media/source.android.com/en//compatibility/android-cdd.pdf">
+CDD</a> for the actual CDD document.
+</p>
+
+<p>
+<a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES</a> provides a C
+language interface that is also accessible using C++. It exposes features similar to the audio
+portions of these Android Java APIs:
+</p>
+
+<ul>
+ <li><a href="{@docRoot}reference/android/media/MediaPlayer.html">
+ android.media.MediaPlayer</a></li>
+ <li><a href="{@docRoot}reference/android/media/MediaRecorder.html">
+ android.media.MediaRecorder</a></li>
+</ul>
+
+<p>
+As with all of the Android Native Development Kit (NDK), the primary purpose of OpenSL ES for
+Android is to facilitate the implementation of shared libraries to be called using the Java Native
+Interface (<a class="external-link" href="https://en.wikipedia.org/wiki/Java_Native_Interface">JNI
+</a>). NDK is not intended for writing pure C/C++ applications. However, OpenSL ES is a
+full-featured API, and we expect that you should be able to accomplish most of your audio needs
+using only this API, without up-calls to code running in the Android runtime.
+</p>
+
+<p class="note"><strong>Note: </strong>
+Though based on OpenSL ES, the Android native audio (high-performance audio) API is not a
+conforming implementation of any OpenSL ES 1.0.1 profile (game, music, or phone). This is because
+Android does not implement all of the features required by any one of the profiles. Any known cases
+where Android behaves differently than the specification are described in the <a href="#ae">
+Android extensions</a> section below.
+</p>
+
+<h2 id="getstarted">Getting Started</h2>
+
+<p>
+This section provides the information needed to get started using the OpenSL ES APIs.
+</p>
+
+<h3>Example code</h3>
+
+<p>
+We recommend using supported and tested example code that is usable as a model for your own
+code, which is located in the NDK folder {@code platforms/android-9/samples/native-audio/}, as well
+as in the
+<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/audio-echo">audio-echo</a>
+and
+<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/native-audio">native-audio</a>
+folders of the
+<a class="external-link" href="https://github.com/googlesamples/android-ndk">android-ndk</a> GitHub
+repository.
+</p>
+
+<p class="caution"><strong>Caution: </strong>
+The OpenSL ES 1.0.1 specification contains example code in the appendices (see
+<a class="external-link" href="https://www.khronos.org/registry/sles/">Khronos OpenSL ES Registry</a>
+for more details). However, the examples in <em>Appendix B: Sample Code</em> and
+<em>Appendix C: Use Case Sample Code</em> use features that are not supported by Android. Some
+examples also contain typographical errors, or use APIs that are likely to change. Proceed with
+caution when referring to these; though the code may be helpful in understanding the full OpenSL ES
+standard, it should not be used as-is with Android.
+</p>
+
+<h3>Makefile</h3>
+
+<p>
+Modify your {@code Android.mk} file as follows:
+</p>
+<pre>
+LOCAL_LDLIBS += -lOpenSLES
+</pre>
+
+<h3>Audio content</h3>
+
+<p>
+The following are some of the many ways to package audio content for your application:
+</p>
+
+<ul>
+ <li><strong>Resources</strong>: By placing your audio files into the {@code res/raw/} folder,
+ they can be accessed easily by the associated APIs for
+ <a href="{@docRoot}reference/android/content/res/Resources.html">Resources</a>.
+ However, there is no direct native access to resources, so you must write Java
+ programming language code to copy them out before use.</li>
+ <li><strong>Assets</strong>: By placing your audio files into the {@code assets/} folder, they
+ are directly accessible by the Android native asset manager APIs. See the header files {@code
+ android/asset_manager.h} and {@code android/asset_manager_jni.h} for more information on these
+ APIs. The example code located in the NDK folder {@code platforms/android-9/samples/native-audio/}
+ uses these native asset manager APIs in conjunction with the Android file descriptor data
+ locator.</li>
+ <li><strong>Network</strong>: You can use the URI data locator to play audio content directly
+ from the network. However, be sure to read the <a href="#sandp">Security and permissions</a>
+ section below.</li>
+ <li><strong>Local file system</strong>: The URI data locator supports the {@code file:} scheme
+ for local files, provided the files are accessible by the application. Note that the Android
+ security framework restricts file access via the Linux user ID and group ID mechanisms.</li>
+ <li><strong>Recorded</strong>: Your application can record audio data from the microphone input,
+ store this content, and then play it back later. The example code uses this method for the <em>
+ Playback</em> clip.</li>
+ <li><strong>Compiled and linked inline</strong>: You can link your audio content directly into
+ the shared library, and then play it using an audio player with buffer queue data locator. This
+ is most suitable for short PCM format clips. The example code uses this technique for the <em>
+ Hello</em> and <em>Android</em> clips. The PCM data was converted to hex strings using a
+ {@code bin2c} tool (not supplied).</li>
+ <li><strong>Real-time synthesis</strong>: Your application can synthesize PCM data on the fly and
+ then play it using an audio player with buffer queue data locator. This is a relatively advanced
+ technique, and the details of audio synthesis are beyond the scope of this article.</li>
+</ul>
+
+<p class="note"><strong>Note: </strong>
+Finding or creating useful audio content for your application is beyond the scope of this article.
+You can use web search terms such as <em>interactive audio</em>, <em>game audio</em>, <em>sound
+design</em>, and <em>audio programming</em> to locate more information.
+</p>
+<p class="caution"><strong>Caution:</strong> It is your responsibility
+to ensure that you are legally permitted to play or record content. There may be privacy
+considerations for recording content.
+</p>
+
<h2 id="inherited">Features Inherited from the Reference Specification</h2>
<p>
The Android NDK implementation of OpenSL ES inherits much of the feature set from
-the reference specification, although with certain limitations.
+the reference specification, with certain limitations.
</p>
<h3>Global entry points</h3>
@@ -44,8 +179,9 @@
<h3>Objects and interfaces</h3>
<p>
-Table 1 shows which objects and interfaces the Android NDK implementation of
-OpenSL ES supports. Green cells indicate features available in this implementation.
+Table 1 shows the objects and interfaces that the Android NDK implementation of
+OpenSL ES supports. If a <em>Yes</em> appears in the cell, then the feature is available in this
+implementation.
</p>
<p class="table-caption" id="Objects-and-interfaces">
@@ -214,7 +350,9 @@
</tr>
</table>
-The next section explains limitations of some of these features.
+<p>
+The next section explains the limitations for some of these features.
+</p>
<h3>Limitations</h3>
@@ -265,7 +403,7 @@
to either <code>NULL</code> or a valid UTF-8 string. You must also initialize
<code>containerType</code> to a valid value.
In the absence of other considerations, such as portability to other
-implementations, or content format that an app cannot identify by header,
+implementations or content format that an app cannot identify by header,
we recommend that you
set <code>mimeType</code> to <code>NULL</code> and <code>containerType</code>
to <code>SL_CONTAINERTYPE_UNSPECIFIED</code>.
@@ -275,30 +413,32 @@
Android platform supports them as well:</p>
<ul>
-<li>WAV PCM</li>
-<li>WAV alaw</li>
-<li>WAV ulaw</li>
-<li>MP3 Ogg Vorbis</li>
-<li>AAC LC</li>
-<li>HE-AACv1 (AAC+)</li>
-<li>HE-AACv2 (enhanced AAC+)</li>
-<li>AMR</li>
-<li>FLAC</li>
+<li><a class="external-link" href="https://en.wikipedia.org/wiki/WAV">WAV</a> PCM.</li>
+<li>WAV alaw.</li>
+<li>WAV ulaw.</li>
+<li>MP3 Ogg Vorbis.</li>
+<li>AAC LC.</li>
+<li>HE-AACv1 (AAC+).</li>
+<li>HE-AACv2 (enhanced AAC+).</li>
+<li>AMR.</li>
+<li>FLAC.</li>
</ul>
-<p>
+<p class="note"><strong>Note: </strong>
For a list of audio formats that Android supports, see
<a href="{@docRoot}guide/appendix/media-formats.html">Supported Media Formats</a>.
</p>
<p>
-The following limitations apply to handling of these and other formats in this
+The following limitations apply to the handling of these and other formats in this
implementation of OpenSL ES:
</p>
<ul>
-<li>AAC formats must be reside within an MP4 or ADTS container.</li>
-<li>OpenSL ES for Android does not support MIDI.</li>
+<li><a class="external-link" href="https://en.wikipedia.org/wiki/Advanced_Audio_Coding">AAC</a>
+formats must reside within an MP4 or ADTS container.</li>
+<li>OpenSL ES for Android does not support
+<a class="external-link" href="https://source.android.com/devices/audio/midi.html">MIDI</a>.</li>
<li>WMA is not part of <a class="external-link" href="https://source.android.com/">AOSP</a>, and we
have not verified its compatibility with OpenSL ES for Android.</li>
<li>The Android NDK implementation of OpenSL ES does not support direct
@@ -333,13 +473,23 @@
<li>8-bit unsigned or 16-bit signed.</li>
<li>Mono or stereo.</li>
<li>Little-endian byte ordering.</li>
-<li>Sample rates of: 8,000, 11,025, 12,000, 16,000, 22,050, 24,000, 32,000, 44,100, or
-48,000 Hz.</li>
+<li>Sample rates of:
+ <ul>
+ <li>8,000 Hz.</li>
+ <li>11,025 Hz.</li>
+ <li>12,000 Hz.</li>
+ <li>16,000 Hz.</li>
+ <li>22,050 Hz.</li>
+ <li>24,000 Hz.</li>
+ <li>32,000 Hz.</li>
+ <li>44,100 Hz.</li>
+ <li>48,000 Hz.</li>
+ </ul></li>
</ul>
<p>
The configurations that OpenSL ES for Android supports for recording are
-device-dependent; usually, 16,000 Hz mono 16-bit signed is available regardless of device.
+device-dependent; usually, 16,000 Hz mono/16-bit signed is available regardless of the device.
</p>
<p>
The value of the <code>samplesPerSec</code> field is in units of milliHz, despite the misleading
@@ -393,7 +543,7 @@
An audio player or recorder with a data locator for a buffer queue supports PCM data format only.
</p>
-<h4>I/O Device data locator</h4>
+<h4>I/O device data locator</h4>
<p>
OpenSL ES for Android only supports use of an I/O device data locator when you have
@@ -421,6 +571,150 @@
We have not verified support for {@code rtsp:} with audio on the Android platform.
</p>
+<h4>Data structures</h4>
+
+<p>
+Android supports these OpenSL ES 1.0.1 data structures:
+</p>
+<ul>
+ <li>{@code SLDataFormat_MIME}</li>
+ <li>{@code SLDataFormat_PCM}</li>
+ <li>{@code SLDataLocator_BufferQueue}</li>
+ <li>{@code SLDataLocator_IODevice}</li>
+ <li>{@code SLDataLocator_OutputMix}</li>
+ <li>{@code SLDataLocator_URI}</li>
+ <li>{@code SLDataSink}</li>
+ <li>{@code SLDataSource}</li>
+ <li>{@code SLEngineOption}</li>
+ <li>{@code SLEnvironmentalReverbSettings}</li>
+ <li>{@code SLInterfaceID}</li>
+</ul>
+
+<h4>Platform configuration</h4>
+
+<p>
+OpenSL ES for Android is designed for multi-threaded applications and is thread-safe. It supports a
+single engine per application, and up to 32 objects per engine. Available device memory and CPU may
+further restrict the usable number of objects.
+</p>
+
+<p>
+These engine options are recognized, but ignored by {@code slCreateEngine}:
+</p>
+
+<ul>
+ <li>{@code SL_ENGINEOPTION_THREADSAFE}</li>
+ <li>{@code SL_ENGINEOPTION_LOSSOFCONTROL}</li>
+</ul>
+
+<p>
+OpenMAX AL and OpenSL ES may be used together in the same application. In this case, there is
+a single shared engine object internally, and the 32 object limit is shared between OpenMAX AL
+and OpenSL ES. The application should first create both engines, use both engines, and finally
+destroy both engines. The implementation maintains a reference count on the shared engine so that
+it is correctly destroyed during the second destroy operation.
+</p>
+
+<h2 id="planning">Planning for Future Versions of OpenSL ES</h2>
+
+<p>
+The Android high-performance audio APIs are based on
+<a class="external-link" href="https://www.khronos.org/registry/sles/">Khronos Group OpenSL ES
+1.0.1</a>. Khronos has released a revised version 1.1 of the standard. The
+revised version includes new features, clarifications, corrections of typographical errors, and
+some incompatibilities. Most of the expected incompatibilities are relatively minor or are in
+areas of OpenSL ES that are not supported by Android.
+</p>
+
+<p>
+An application
+developed with this version should work on future versions of the Android platform, provided
+that you follow the guidelines that are outlined in the <a href="#binary-compat">Planning for
+binary compatibility</a> section below.
+</p>
+
+<p class="note"><strong>Note: </strong>
+Future source compatibility is not a goal. That is, if you upgrade to a newer version of the NDK,
+you may need to modify your application source code to conform to the new API. We expect that most
+such changes will be minor; see details below.
+</p>
+
+<h3 id="binary-compat">Planning for binary compatibility</h3>
+
+<p>
+We recommend that your application follow these guidelines to improve future binary compatibility:
+</p>
+
+<ul>
+ <li>Use only the documented subset of Android-supported features from OpenSL ES 1.0.1.</li>
+ <li>Do not depend on a particular result code for an unsuccessful operation; be prepared to deal
+ with a different result code.</li>
+ <li>Application callback handlers generally run in a restricted context. They should be written
+ to perform their work quickly, and then return as soon as possible. Do not run complex operations
+ within a callback handler. For example, within a buffer queue completion callback, you can
+ enqueue another buffer, but do not create an audio player.</li>
+ <li>Callback handlers should be prepared to be called more or less frequently, to receive
+ additional event types, and should ignore event types that they do not recognize. Callbacks that
+ are configured with an event mask made of enabled event types should be prepared to be called
+ with multiple event type bits set simultaneously. Use "&" to test for each event bit rather than
+ a switch case.</li>
+ <li>Use prefetch status and callbacks as a general indication of progress, but do not depend on
+ specific hard-coded fill levels or callback sequences. The meaning of the prefetch status fill
+ level, and the behavior for errors that are detected during prefetch, may change.</li>
+</ul>
+
+<p class="note"><strong>Note: </strong>
+See the <a href="#bq-behavior">Buffer queue behavior</a> section below for more details.
+</p>
+
+<h3>Planning for source compatibility</h3>
+
+<p>
+As mentioned, source code incompatibilities are expected in the next version of OpenSL ES from
+Khronos Group. The likely areas of change include:
+</p>
+
+<ul>
+ <li>The buffer queue interface is expected to have significant changes, especially in the areas
+ of {@code BufferQueue::Enqueue}, the parameter list for {@code slBufferQueueCallback}, and the
+ name of field {@code SLBufferQueueState.playIndex}. We recommend that your application code use
+ Android simple buffer queues instead. In the example
+ code that is supplied with the NDK, we have used Android simple buffer queues for playback for
+ this reason. (We also use Android simple buffer queue for recording and decoding to PCM, but that
+ is because standard OpenSL ES 1.0.1 does not support record or decode to a buffer queue data
+ sink.)</li>
+ <li>There will be an addition of {@code const} to the input parameters passed by reference, and
+ to {@code SLchar *} struct fields used as input values. This should not require any changes to
+ your code.</li>
+ <li>There will be a substitution of unsigned types for some parameters that are currently signed.
+ You may need to change a parameter type from {@code SLint32} to {@code SLuint32} or similar, or
+ add a cast.</li>
+ <li>{@code Equalizer::GetPresetName} copies the string to application memory instead of returning
+ a pointer to implementation memory. This will be a significant change, so we recommend that you
+ either avoid calling this method, or isolate your use of it.</li>
+ <li>There will be additional fields in the struct types. For output parameters, these new fields
+ can be ignored, but for input parameters the new fields will need to be initialized. Fortunately,
+ all of these are expected to be in areas that are not supported by Android.</li>
+ <li>Interface <a class="external-link" href="http://en.wikipedia.org/wiki/Globally_unique_identifier">
+ GUIDs</a> will change. Refer to interfaces by symbolic name rather than GUID to avoid a
+ dependency.</li>
+ <li>{@code SLchar} will change from {@code unsigned char} to {@code char}. This primarily affects
+ the URI data locator and MIME data format.</li>
+ <li>{@code SLDataFormat_MIME.mimeType} will be renamed to {@code pMimeType}, and
+ {@code SLDataLocator_URI.URI} will be renamed to {@code pURI}. We recommend that you initialize
+ the {@code SLDataFormat_MIME} and {@code SLDataLocator_URI} data structures using a
+ brace-enclosed, comma-separated list of values, rather than by field name, to isolate your code
+ from this change. This technique is used in the example code.</li>
+ <li>{@code SL_DATAFORMAT_PCM} does not permit the application to specify the representation of
+ the data as signed integer, unsigned integer, or floating-point. The Android implementation
+ assumes that 8-bit data is unsigned integer and 16-bit is signed integer. In addition, the field
+ {@code samplesPerSec} is a misnomer, as the actual units are milliHz. These issues are expected
+ to be addressed in the next OpenSL ES version, which will introduce a new extended PCM data
+ format that permits the application to explicitly specify the representation and corrects the
+ field name. As this will be a new data format, and the current PCM data format will still be
+ available (though deprecated), it should not require any immediate changes to your code.</li>
+</ul>
+
<h2 id="ae">Android Extensions</h2>
<p>
@@ -444,8 +738,8 @@
<p>
Table 2 shows the Android-specific interfaces and data locators that Android OpenSL ES supports
-for each object type. Green cells indicate interfaces and data locators available for each
-object type.
+for each object type. The <em>Yes</em> values in the cells indicate the interfaces and data
+locators that are available for each object type.
</p>
<p class="table-caption" id="Android-extensions">
@@ -523,7 +817,7 @@
</tr>
</table>
-<h3>Android configuration interface</h3>
+<h3 id="configuration-interface">Android configuration interface</h3>
<p>
The Android configuration interface provides a means to set
@@ -581,6 +875,11 @@
that they provide.
</p>
+<p>
+Portable applications should use the OpenSL ES 1.0.1 APIs for audio effects instead of the Android
+effect extensions.
+</p>
+
<h3>Android file descriptor data locator</h3>
<p>
@@ -597,9 +896,9 @@
<p>
The Android simple buffer queue data locator and interface are
identical to those in the OpenSL ES 1.0.1 reference specification, with two exceptions: You
-can also use Android simple buffer queues with both audio players and audio recorders. Also, PCM
+can also use Android simple buffer queues with both audio players and audio recorders. Also, PCM
is the only data format you can use with these queues.
-In the reference specification, buffer queues are for audio players only, but
+In the reference specification, buffer queues are for audio players only, but they are
compatible with data formats beyond PCM.
</p>
<p>
@@ -613,7 +912,7 @@
buffer queues instead of OpenSL ES 1.0.1 buffer queues.
</p>
-<h3>Dynamic interfaces at object creation</h3>
+<h3 id="dynamic-interfaces">Dynamic interfaces at object creation</h3>
<p>
For convenience, the Android implementation of OpenSL ES 1.0.1
@@ -622,7 +921,7 @@
to add these interfaces after instantiation.
</p>
-<h3>Buffer queue behavior</h3>
+<h3 id="bq-behavior">Buffer queue behavior</h3>
<p>
The Android implementation does not include the
@@ -641,7 +940,7 @@
<p>
Similarly, there is no specification governing whether the trigger for a buffer queue callback must
be a transition to <code>SL_PLAYSTATE_STOPPED</code> or execution of
-<code>BufferQueue::Clear()</code>. Therefore, we recommend against creating a dependency on
+<code>BufferQueue::Clear()</code>. Therefore, we recommend that you do not create a dependency on
one or the other; instead, your app should be able to handle both.
</p>
@@ -679,27 +978,34 @@
</tr>
<tr>
<td>13 and below</td>
- <td>An open-source codec with a suitable license.</td>
+ <td>An open-source codec with a suitable license</td>
</tr>
<tr>
<td>14 to 15</td>
- <td>An open-source codec with a suitable license.</td>
+ <td>An open-source codec with a suitable license</td>
</tr>
<tr>
<td>16 to 20</td>
<td>
- The {@link android.media.MediaCodec} class or an open-source codec with a suitable license.
+ The {@link android.media.MediaCodec} class or an open-source codec with a suitable license
</td>
</tr>
<tr>
<td>21 and above</td>
<td>
NDK MediaCodec in the {@code <media/NdkMedia*.h>} header files, the
- {@link android.media.MediaCodec} class, or an open-source codec with a suitable license.
+ {@link android.media.MediaCodec} class, or an open-source codec with a suitable license
</td>
</tr>
</table>
+<p class="note"><strong>Note: </strong>
+There is currently no documentation for the NDK version of the {@code MediaCodec} API. However,
+you can refer to the
+<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/native-codec">
+native-codec</a> sample code for an example.
+</p>
+
<p>
A standard audio player plays back to an audio device, specifying the output mix as the data sink.
The Android extension differs in that an audio player instead
@@ -710,17 +1016,18 @@
<p>
This feature is primarily intended for games to pre-load their audio assets when changing to a
-new game level, similar to the functionality that the {@link android.media.SoundPool} class
-provides.
+new game level, which is similar to the functionality that the {@link android.media.SoundPool}
+class provides.
</p>
<p>
The application should initially enqueue a set of empty buffers in the Android simple
-buffer queue. After that, the app fills the buffers with with PCM data. The Android simple
+buffer queue. After that, the app fills the buffers with PCM data. The Android simple
buffer queue callback fires after each buffer is filled. The callback handler processes
the PCM data, re-enqueues the now-empty buffer, and then returns. The application is responsible for
keeping track of decoded buffers; the callback parameter list does not include
-sufficient information to indicate which buffer contains data or which buffer to enqueue next.
+sufficient information to indicate the buffer that contains data or the buffer that should be
+enqueued next.
</p>
<p>
@@ -753,8 +1060,8 @@
To decode an encoded stream to PCM but not play back immediately, for apps running on
Android 4.x (API levels 16–20), we recommend using the {@link android.media.MediaCodec} class.
For new applications running on Android 5.0 (API level 21) or higher, we recommend using the NDK
-equivalent, {@code <NdkMedia*.h>}. These header files reside under
-the {@code media/} directory, under your installation root.
+equivalent, {@code <NdkMedia*.h>}. These header files reside in
+the {@code media/} directory under your installation root.
</p>
<h3>Decode streaming ADTS AAC to PCM</h3>
@@ -796,7 +1103,7 @@
The Android buffer queue callback fires after each buffer is emptied.
The callback handler should refill and re-enqueue the buffer, and then return.
The application need not keep track of encoded buffers; the callback parameter
-list includes sufficient information to indicate which buffer to enqueue next.
+list includes sufficient information to indicate the buffer that should be enqueued next.
The end of stream is explicitly marked by enqueuing an EOS item.
After EOS, no more enqueues are permitted.
</p>
@@ -812,6 +1119,7 @@
In all respects except for the data source, the streaming decode method is the same as
the one that <a href="#da">Decode audio to PCM</a> describes.
</p>
+
<p>
Despite the similarity in names, an Android buffer queue is <em>not</em>
the same as an <a href="#simple">Android simple buffer queue</a>. The streaming decoder
@@ -840,8 +1148,8 @@
practice is to query for the key indices in the main thread after calling the {@code
Object::Realize} method, and to read the PCM format metadata values in the Android simple
buffer queue callback handler when calling it for the first time. Consult the
-<a href="https://github.com/googlesamples/android-ndk">example code in the NDK package</a>
-for examples of working with this interface.
+<a class="external-link" href="https://github.com/googlesamples/android-ndk">example code in the
+NDK package</a> for examples of working with this interface.
</p>
<p>
@@ -879,3 +1187,25 @@
audiosrc.pLocator = ...
audiosrc.pFormat = &pcm;
</pre>
+
+<h2 id="notes">Programming Notes</h2>
+<p><a href="{@docRoot}ndk/guides/audio/opensl-prog-notes.html">OpenSL ES Programming Notes</a>
+ provides supplemental information to ensure proper implementation of OpenSL ES.</p>
+<p class="note"><strong>Note: </strong>
+For your convenience, we have included a copy of the OpenSL ES 1.0.1 specification with the NDK in
+{@code docs/opensles/OpenSL_ES_Specification_1.0.1.pdf}.
+</p>
+
+<h2 id="platform-issues">Platform Issues</h2>
+
+<p>
+This section describes known issues in the initial platform release that supports these APIs.
+</p>
+
+<h3>Dynamic interface management</h3>
+
+<p>
+{@code DynamicInterfaceManagement::AddInterface} does not work. Instead, specify the interface in
+the array that is passed to Create, as shown in the example code for environmental reverb.
+</p>
+
diff --git a/docs/html/ndk/guides/audio/opensl-prog-notes.jd b/docs/html/ndk/guides/audio/opensl-prog-notes.jd
new file mode 100644
index 0000000..3263145
--- /dev/null
+++ b/docs/html/ndk/guides/audio/opensl-prog-notes.jd
@@ -0,0 +1,461 @@
+page.title=OpenSL ES Programming Notes
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>On this page</h2>
+
+ <ol>
+ <li><a href="#init">Objects and Interface Initialization</a></li>
+ <li><a href="#prefetch">Audio Player Prefetch</a></li>
+ <li><a href="#destroy">Destroy</a></li>
+ <li><a href="#panning">Stereo Panning</a></li>
+ <li><a href="#callbacks">Callbacks and Threads</a></li>
+ <li><a href="#perform">Performance</a></li>
+ <li><a href="#sandp">Security and Permissions</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>
+The notes in this section supplement the
+<a class="external-link" href="https://www.khronos.org/registry/sles/">OpenSL ES 1.0.1
+specification</a>.
+</p>
+
+<h2 id="init">Objects and Interface Initialization</h2>
+
+<p>
+Two aspects of the OpenSL ES programming model that may be unfamiliar to new developers are the
+distinction between objects and interfaces, and the initialization sequence.
+</p>
+
+<p>
+Briefly, an OpenSL ES object is similar to the object concept in
+ programming languages such as Java
+and C++, except an OpenSL ES object is only visible via its associated interfaces.
+ This includes
+the initial interface for all objects, called {@code SLObjectItf}.
+ There is no handle for an object
+itself, only a handle to the {@code SLObjectItf} interface of the object.
+</p>
+
+<p>
+An OpenSL ES object is first <em>created</em>, which returns an {@code SLObjectItf}, then
+<em>realized</em>. This is similar to the common programming pattern of first constructing an
+object (which should never fail other than for lack of memory or invalid parameters), and then
+completing initialization (which may fail due to lack of resources). The realize step gives the
+implementation a logical place to allocate additional resources if needed.
+</p>
+
+<p>
+As part of the API to create an object, an application specifies an array of desired interfaces
+that it plans to acquire later. Note that this array does not automatically
+ acquire the interfaces;
+it merely indicates a future intention to acquire them. Interfaces are distinguished as
+<em>implicit</em> or <em>explicit</em>. An explicit interface must be listed in the array if it
+will be acquired later. An implicit interface need not be listed in the
+ object create array, but
+there is no harm in listing it there. OpenSL ES has one more kind of interface called
+<em>dynamic</em>, which does not need to be specified in the object
+ create array and can be added
+later after the object is created. The Android implementation provides
+ a convenience feature to
+avoid this complexity; see the
+ <a href="#dynamic-interfaces">Dynamic interfaces at object creation</a> section above.
+</p>
+
+<p>
+After the object is created and realized, the application should acquire interfaces for each
+feature it needs, using {@code GetInterface} on the initial {@code SLObjectItf}.
+</p>
+
+<p>
+Finally, the object is available for use via its interfaces, though note that
+ some objects require
+further setup. In particular, an audio player with URI data source needs a bit
+ more preparation in
+order to detect connection errors. See the
+ <a href="#prefetch">Audio player prefetch</a> section for details.
+</p>
+
+<p>
+After your application is done with the object, you should explicitly destroy it; see the
+<a href="#destroy">Destroy</a> section below.
+</p>
+
+<h2 id="prefetch">Audio Player Prefetch</h2>
+
+<p>
+For an audio player with URI data source, {@code Object::Realize} allocates
+ resources but does not
+connect to the data source (<em>prepare</em>) or begin pre-fetching data. These occur once the
+player state is set to either {@code SL_PLAYSTATE_PAUSED} or {@code SL_PLAYSTATE_PLAYING}.
+</p>
+
+<p>
+Some information may still be unknown until relatively late in this sequence. In
+particular, initially {@code Player::GetDuration} returns {@code SL_TIME_UNKNOWN} and
+{@code MuteSolo::GetChannelCount} either returns successfully with channel count zero or the
+error result {@code SL_RESULT_PRECONDITIONS_VIOLATED}. These APIs return the proper values
+once they are known.
+</p>
+
+<p>
+Other properties that are initially unknown include the sample rate and
+ actual media content type
+based on examining the content's header (as opposed to the
+ application-specified MIME type and
+container type). These are also determined later during
+ prepare/prefetch, but there are no APIs to
+retrieve them.
+</p>
+
+<p>
+The prefetch status interface is useful for detecting when all information
+ is available, or your
+application can poll periodically. Note that some information, such as the
+ duration of a streaming
+MP3, may <em>never</em> be known.
+</p>
+
+<p>
+The prefetch status interface is also useful for detecting errors. Register a callback
+ and enable
+at least the {@code SL_PREFETCHEVENT_FILLLEVELCHANGE} and {@code SL_PREFETCHEVENT_STATUSCHANGE}
+events. If both of these events are delivered simultaneously, and
+{@code PrefetchStatus::GetFillLevel} reports a zero level, and
+{@code PrefetchStatus::GetPrefetchStatus} reports {@code SL_PREFETCHSTATUS_UNDERFLOW},
+ then this
+indicates a non-recoverable error in the data source. This includes the inability to
+ connect to the
+data source because the local filename does not exist or the network URI is invalid.
+</p>
+
+<p>
+The next version of OpenSL ES is expected to add more explicit support for
+ handling errors in the
+data source. However, for future binary compatibility, we intend to continue
+ to support the current
+method for reporting a non-recoverable error.
+</p>
+
+<p>
+In summary, a recommended code sequence is:
+</p>
+
+<ol>
+ <li>{@code Engine::CreateAudioPlayer}</li>
+ <li>{@code Object:Realize}</li>
+ <li>{@code Object::GetInterface} for {@code SL_IID_PREFETCHSTATUS}</li>
+ <li>{@code PrefetchStatus::SetCallbackEventsMask}</li>
+ <li>{@code PrefetchStatus::SetFillUpdatePeriod}</li>
+ <li>{@code PrefetchStatus::RegisterCallback}</li>
+ <li>{@code Object::GetInterface} for {@code SL_IID_PLAY}</li>
+ <li>{@code Play::SetPlayState} to {@code SL_PLAYSTATE_PAUSED}, or
+ {@code SL_PLAYSTATE_PLAYING}</li>
+</ol>
+
+<p class="note"><strong>Note: </strong>
+Preparation and prefetching occur here; during this time your callback is called with
+periodic status updates.
+</p>
+
+<h2 id="destroy">Destroy</h2>
+
+<p>
+Be sure to destroy all objects when exiting from your application.
+ Objects should be destroyed in
+reverse order of their creation, as it is not safe to destroy an object that has any dependent
+objects. For example, destroy in this order: audio players and recorders, output mix, and then
+finally the engine.
+</p>
+
+<p>
+OpenSL ES does not support automatic garbage collection or
+<a class="external-link" href="http://en.wikipedia.org/wiki/Reference_counting">reference
+counting</a> of interfaces. After you call {@code Object::Destroy}, all extant
+ interfaces that are
+derived from the associated object become undefined.
+</p>
+
+<p>
+The Android OpenSL ES implementation does not detect the incorrect use of such interfaces.
+Continuing to use such interfaces after the object is destroyed can cause your application to
+crash or behave in unpredictable ways.
+</p>
+
+<p>
+We recommend that you explicitly set both the primary object interface and all associated
+interfaces to NULL as part of your object destruction sequence, which prevents the accidental
+misuse of a stale interface handle.
+</p>
+
+<h2 id="panning">Stereo Panning</h2>
+
+<p>
+When {@code Volume::EnableStereoPosition} is used to enable stereo panning of a mono source,
+ there is a 3-dB reduction in total
+<a class="external-link" href="http://en.wikipedia.org/wiki/Sound_power_level">sound power
+level</a>. This is needed to permit the total sound power level to remain constant as
+ the source is
+panned from one channel to the other. Therefore, only enable stereo positioning if you need
+it. See the Wikipedia article on
+<a class="external-link" href="http://en.wikipedia.org/wiki/Panning_(audio)">audio panning</a>
+ for more information.
+</p>
+
+<h2 id="callbacks">Callbacks and Threads</h2>
+
+<p>
+Callback handlers are generally called synchronously with respect to the event. That is, at the
+moment and location that the event is detected by the implementation. This point is
+asynchronous with respect to the application, so you should use a non-blocking synchronization
+mechanism to control access to any variables shared between the application and the callback
+handler. In the example code, such as for buffer queues, we have either omitted this
+synchronization or used blocking synchronization in the interest of simplicity. However, proper
+non-blocking synchronization is critical for any production code.
+</p>
+
+<p>
+Callback handlers are called from internal non-application threads that are not attached to the
+Android runtime, so they are ineligible to use JNI. Because these internal threads are
+critical to
+the integrity of the OpenSL ES implementation, a callback handler should also not block
+ or perform
+excessive work.
+</p>
+
+<p>
+If your callback handler needs to use JNI or execute work that is not proportional to the
+callback, the handler should instead post an event for another thread to process. Examples of
+acceptable callback workload include rendering and enqueuing the next output buffer
+(for an AudioPlayer), processing the just-filled input buffer and enqueueing the next
+ empty buffer
+(for an AudioRecorder), or simple APIs such as most of the <em>Get</em> family. See the
+<a href="#perform">Performance</a> section below regarding the workload.
+</p>
+
+<p>
+Note that the converse is safe: an Android application thread that has entered JNI
+ is allowed to
+directly call OpenSL ES APIs, including those that block. However, blocking calls are not
+recommended from the main thread, as they may result in
+ <em>Application Not Responding</em> (ANR).
+</p>
+
+<p>
+The determination regarding the thread that calls a callback handler is largely left up to the
+implementation. The reason for this flexibility is to permit future optimizations,
+ especially on
+multi-core devices.
+</p>
+
+<p>
+The thread on which the callback handler runs is not guaranteed to have the same
+ identity across
+different calls. Therefore, do not rely on the {@code pthread_t returned by pthread_self()}
+ or the
+{@code pid_t returned by gettid()} to be consistent across calls. For the same reason,
+ do not use
+the thread local storage (TLS) APIs such as {@code pthread_setspecific()} and
+{@code pthread_getspecific()} from a callback.
+</p>
+
+<p>
+The implementation guarantees that concurrent callbacks of the same kind, for the
+ same object, does
+not occur. However, concurrent callbacks of different kinds for the same object are possible on
+different threads.
+</p>
+
+<h2 id="perform">Performance</h2>
+
+<p>
+As OpenSL ES is a native C API, non-runtime application threads that call OpenSL ES have no
+runtime-related overhead such as garbage collection pauses. With one exception described below,
+there is no additional performance benefit to the use of OpenSL ES other than this.
+ In particular,
+the use of OpenSL ES does not guarantee enhancements such as lower audio latency and higher
+scheduling priority over that which the platform generally provides. On the other hand, as the
+Android platform and specific device implementations continue to evolve, an OpenSL ES application
+can expect to benefit from any future system performance improvements.
+</p>
+
+<p>
+One such evolution is support for reduced
+<a href="{@docRoot}ndk/guides/audio/output-latency.html">audio output latency</a>.
+The underpinnings for reduced
+output latency were first included in Android 4.1 (API level 16), and then
+continued progress occurred in Android 4.2 (API level 17). These improvements are available via
+OpenSL ES for device implementations that
+ claim feature {@code android.hardware.audio.low_latency}.
+If the device doesn't claim this feature but supports Android 2.3 (API level 9)
+or later, then you can still use the OpenSL ES APIs but the output latency may be higher.
+ The lower
+output latency path is used only if the application requests a buffer size and sample rate
+ that are
+compatible with the device's native output configuration. These parameters are
+ device-specific and
+should be obtained as described below.
+</p>
+
+<p>
+Beginning with Android 4.2 (API level 17), an application can query for the
+platform native or optimal output sample rate and buffer size for the device's primary output
+stream. When combined with the feature test just mentioned, an app can now configure itself
+appropriately for lower latency output on devices that claim support.
+</p>
+
+<p>
+For Android 4.2 (API level 17) and earlier, a buffer count of two or more is
+required for lower latency. Beginning with Android 4.3 (API level 18), a buffer
+count of one is sufficient for lower latency.
+</p>
+
+<p>
+All OpenSL ES interfaces for output effects preclude the lower latency path.
+</p>
+
+<p>
+The recommended sequence is as follows:
+</p>
+
+<ol>
+ <li>Check for API level 9 or higher to confirm the use of OpenSL ES.</li>
+ <li>Check for the {@code android.hardware.audio.low_latency} feature using code such as this:
+ <pre>import android.content.pm.PackageManager;
+...
+PackageManager pm = getContext().getPackageManager();
+boolean claimsFeature = pm.hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
+ </pre></li>
+ <li>Check for API level 17 or higher to confirm the use of
+ {@code android.media.AudioManager.getProperty()}.</li>
+ <li>Get the native or optimal output sample rate and buffer size for this device's
+ primary output
+ stream using code such as this:
+ <pre>import android.media.AudioManager;
+...
+AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+String sampleRate = am.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE));
+String framesPerBuffer = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER));
+ </pre>
+ Note that {@code sampleRate} and {@code framesPerBuffer} are <em>strings</em>. First check for
+ null and then convert to int using {@code Integer.parseInt()}.</li>
+ <li>Now use OpenSL ES to create an AudioPlayer with PCM buffer queue data locator.</li>
+</ol>
+
+<p class="note"><strong>Note: </strong>
+You can use the
+<a class="external-link"
+ href="https://play.google.com/store/apps/details?id=com.levien.audiobuffersize">
+ Audio Buffer Size</a>
+test app to determine the native buffer size and sample rate for OpenSL ES audio
+applications on your audio device. You can also visit GitHub to view <a class="external-link"
+href="https://github.com/gkasten/high-performance-audio/tree/master/audio-buffer-size">
+audio-buffer-size</a> samples.
+
+<p>
+The number of lower latency audio players is limited. If your application requires more
+than a few
+audio sources, consider mixing your audio at the application level. Be sure to destroy your audio
+players when your activity is paused, as they are a global resource shared with other apps.
+</p>
+
+<p>
+To avoid audible glitches, the buffer queue callback handler must execute within a small and
+predictable time window. This typically implies no unbounded blocking on mutexes, conditions,
+or I/O operations. Instead consider <em>try locks</em>, locks and waits with timeouts, and
+<a class="external-link"
+ href="https://source.android.com/devices/audio/avoiding_pi.html#nonBlockingAlgorithms">
+ non-blocking algorithms</a>.
+</p>
+
+<p>
+The computation required to render the next buffer (for AudioPlayer) or consume the previous
+buffer (for AudioRecord) should take approximately the same amount of time for each callback.
+Avoid algorithms that execute in a non-deterministic amount of time or are <em>bursty</em> in
+their computations. A callback computation is bursty if the CPU time spent in any given callback
+is significantly larger than the average. In summary, the ideal is for the CPU execution time of
+the handler to have variance near zero, and for the handler to not block for unbounded times.
+</p>
+
+<p>
+Lower latency audio is possible for these outputs only:
+</p>
+
+<ul>
+ <li>On-device speakers.</li>
+ <li>Wired headphones.</li>
+ <li>Wired headsets.</li>
+ <li>Line out.</li>
+ <li><a class="external-link" href="https://source.android.com/devices/audio/usb.html">
+ USB digital
+ audio</a>.</li>
+</ul>
+
+<p>
+On some devices, speaker latency is higher than other paths due to digital signal processing for
+speaker correction and protection.
+</p>
+
+<p>
+As of API level 21,
+<a href="{@docRoot}ndk/guides/audio/input-latency.html">lower latency audio input</a>
+ is supported
+on select devices. To take advantage of
+this feature, first confirm that lower latency output is available as described above. The
+capability for lower latency output is a prerequisite for the lower latency input feature. Then,
+create an AudioRecorder with the same sample rate and buffer size as would be used for output.
+OpenSL ES interfaces for input effects preclude the lower latency path. The record preset
+{@code SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION} must be used for lower latency; this preset
+disables device-specific digital signal processing that may add latency to the input path. For
+more information on record presets, see the <a href="#configuration-interface">Android
+configuration interface</a> section above.
+</p>
+
+<p>
+For simultaneous input and output, separate buffer queue completion handlers are used for each
+side. There is no guarantee of the relative order of these callbacks, or the synchronization of
+the audio clocks, even when both sides use the same sample rate. Your application
+ should buffer the
+data with proper buffer synchronization.
+</p>
+
+<p>
+One consequence of potentially independent audio clocks is the need for asynchronous sample rate
+conversion. A simple (though not ideal for audio quality) technique for asynchronous sample rate
+conversion is to duplicate or drop samples as needed near a zero-crossing point.
+ More sophisticated
+conversions are possible.
+</p>
+
+<h2 id="sandp">Security and Permissions</h2>
+
+<p>
+As far as who can do what, security in Android is done at the process level. Java programming
+language code cannot do anything more than native code, nor can native code do anything more than
+Java programming language code. The only differences between them are the available APIs.
+</p>
+
+<p>
+Applications using OpenSL ES must request the permissions that they would need for similar
+non-native APIs. For example, if your application records audio, then it needs the
+{@code android.permission.RECORD_AUDIO} permission. Applications that use audio effects need
+{@code android.permission.MODIFY_AUDIO_SETTINGS}. Applications that play network URI resources
+need {@code android.permission.NETWORK}. See
+<a href="https://developer.android.com/training/permissions/index.html">Working with System
+Permissions</a> for more information.
+</p>
+
+<p>
+Depending on the platform version and implementation, media content parsers and
+ software codecs may
+run within the context of the Android application that calls OpenSL ES (hardware codecs are
+abstracted but are device-dependent). Malformed content designed to exploit parser and codec
+vulnerabilities is a known attack vector. We recommend that you play media only from trustworthy
+sources or that you partition your application such that code that handles media from
+untrustworthy sources runs in a relatively <em>sandboxed</em> environment. For example, you could
+process media from untrustworthy sources in a separate process. Though both processes would still
+run under the same UID, this separation does make an attack more difficult.
+</p>
diff --git a/docs/html/ndk/guides/audio/output-latency.jd b/docs/html/ndk/guides/audio/output-latency.jd
new file mode 100644
index 0000000..4aa97a6
--- /dev/null
+++ b/docs/html/ndk/guides/audio/output-latency.jd
@@ -0,0 +1,310 @@
+page.title=Audio Output Latency
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>On this page</h2>
+
+ <ol>
+ <li><a href="#prereq">Prerequisites</a></li>
+ <li><a href="#low-lat-track">Obtain a Low-Latency Track</a></li>
+ <li><a href="#buffer-size">Use the Optimal Buffer Size When Enqueuing Audio Data</a></li>
+ <li><a href="#warmup-lat">Avoid Warmup Latency</a></li>
+ </ol>
+ <h2>Also read</h2>
+
+ <ol>
+ <li><a href="https://source.android.com/devices/audio/latency_app.html" class="external-link">
+ Audio Latency for App Developers</a></li>
+ <li><a href="https://source.android.com/devices/audio/latency_contrib.html" class="external-link">
+ Contributors to Audio Latency</a></li>
+ <li><a href="https://source.android.com/devices/audio/latency_measure.html" class="external-link">
+ Measuring Audio Latency</a></li>
+ <li><a href="https://source.android.com/devices/audio/warmup.html" class="external-link">
+ Audio Warmup</a></li>
+ <li><a href="https://en.wikipedia.org/wiki/Latency_%28audio%29" class="external-link">
+ Latency (audio)</a></li>
+ <li><a href="https://en.wikipedia.org/wiki/Round-trip_delay_time" class="external-link">
+ Round-trip delay time</a></li>
+ </ol>
+ </div>
+ </div>
+
+<a href="https://www.youtube.com/watch?v=PnDK17zP9BI" class="notice-developers-video">
+<div>
+ <h3>Video</h3>
+ <p>Audio latency: buffer sizes</p>
+</div>
+</a>
+
+<a href="https://www.youtube.com/watch?v=92fgcUNCHic" class="notice-developers-video">
+<div>
+ <h3>Video</h3>
+ <p>Building great multi-media experiences on Android</p>
+</div>
+</a>
+
+<p>This page describes how to develop your audio app for low-latency output and how to avoid
+warmup latency.</p>
+
+<h2 id="prereq">Prerequisites</h2>
+
+<p>Low-latency audio is currently only supported when using Android's implementation of the
+OpenSL ES™ API specification, and the Android NDK:
+</p>
+
+<ol>
+ <li>Download and install the <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.</li>
+ <li>Read the <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">OpenSL ES
+ documentation</a>.
+</ol>
+
+<h2 id="low-lat-track">Obtain a Low-Latency Track</h2>
+
+<p>Latency is the time it takes for a signal to travel through a system. These are the common
+types of latency related to audio apps:
+
+<ul>
+ <li><strong>Audio output latency</strong> is the time between an audio sample being generated by an
+app and the sample being played through the headphone jack or built-in speaker.</li>
+
+ <li><strong>Audio input latency</strong> is the time between an audio signal being received by a
+device’s audio input, such as the microphone, and that same audio data being available to an
+app.</li>
+
+ <li><strong>Round-trip latency</strong> is the sum of input latency, app processing time, and
+ output latency.</li>
+
+ <li><strong>Touch latency</strong> is the time between a user touching the screen and that
+touch event being received by an app.</li>
+</ul>
+
+<p>It is difficult to test audio output latency in isolation since it requires knowing exactly
+when the first sample is sent into the audio path (although this can be done using a
+<a href="https://source.android.com/devices/audio/testing_circuit.html" class="external-link">
+light testing circuit</a> and an oscilloscope). If you know the round-trip audio latency, you can
+use the rough rule of thumb: <strong>audio output latency is half the round-trip audio latency
+over paths without signal processing</strong>.
+</p>
+
+<p>To obtain the lowest latency, you must supply audio data that matches the device's optimal
+sample rate and buffer size. For more information, see
+<a href="https://source.android.com/devices/audio/latency_design.html" class="external-link">
+Design For Reduced Latency</a>.</p>
+
+<h3>Obtain the optimal sample rate</h3>
+
+<p>In Java, you can obtain the optimal sample rate from AudioManager as shown in the following
+code example:</p>
+
+<pre>
+AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+String frameRate = am.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
+int frameRateInt = Integer.parseInt(frameRate);
+if (frameRateInt == 0) frameRateInt = 44100; // Use a default value if property not found
+</pre>
+
+<p class="note">
+ <strong>Note:</strong> The sample rate refers to the rate of each stream. If your source audio
+ has two channels (stereo), then you will have one stream playing a pair of samples (frame) at
+ <a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_SAMPLE_RATE">
+ PROPERTY_OUTPUT_SAMPLE_RATE</a>.
+</p>
+
+<h3>Use the optimal sample rate when creating your audio player</h3>
+
+<p>Once you have the optimal sample output rate, you can supply it when creating your player
+using OpenSL ES:</p>
+
+<pre>
+// create buffer queue audio player
+void Java_com_example_audio_generatetone_MainActivity_createBufferQueueAudioPlayer
+ (JNIEnv* env, jclass clazz, jint sampleRate, jint framesPerBuffer)
+{
+ ...
+ // specify the audio source format
+ SLDataFormat_PCM format_pcm;
+ format_pcm.numChannels = 2;
+ format_pcm.samplesPerSec = (SLuint32) sampleRate * 1000;
+ ...
+}
+</pre>
+
+<p class="note">
+ <strong>Note:</strong> {@code samplesPerSec} refers to the <em>sample rate per channel in
+ millihertz</em> (1 Hz = 1000 mHz).
+</p>
+
+<h3>Avoid adding output interfaces that involve signal processing</h3>
+
+<p>Only these interfaces are supported by the fast mixer:</p>
+
+<ul>
+ <li>SL_IID_ANDROIDSIMPLEBUFFERQUEUE</li>
+ <li>SL_IID_VOLUME</li>
+ <li>SL_IID_MUTESOLO</li>
+</ul>
+
+<p>These interfaces are not allowed because they involve signal processing and will cause
+your request for a fast-track to be rejected:</p>
+
+<ul>
+ <li>SL_IID_BASSBOOST</li>
+ <li>SL_IID_EFFECTSEND</li>
+ <li>SL_IID_ENVIRONMENTALREVERB</li>
+ <li>SL_IID_EQUALIZER</li>
+ <li>SL_IID_PLAYBACKRATE</li>
+ <li>SL_IID_PRESETREVERB</li>
+ <li>SL_IID_VIRTUALIZER</li>
+ <li>SL_IID_ANDROIDEFFECT</li>
+ <li>SL_IID_ANDROIDEFFECTSEND</li>
+</ul>
+
+<p>When you create your player, make sure you only add <em>fast</em> interfaces, as shown in
+the following example:</p>
+
+<pre>
+const SLInterfaceID interface_ids[2] = { SL_IID_ANDROIDSIMPLEBUFFERQUEUE, SL_IID_VOLUME };
+</pre>
+
+<h3>Verify you're using a low-latency track</h3>
+
+<p>Complete these steps to verify that you have successfully obtained a low-latency track:</p>
+
+<ol>
+ <li>Launch your app and then run the following command:</li>
+
+<pre>
+adb shell ps | grep your_app_name
+</pre>
+
+ <li>Make a note of your app's process ID.</li>
+
+ <li>Now, play some audio from your app. You have approximately three seconds to run the
+following command from the terminal:</li>
+
+<pre>
+adb shell dumpsys media.audio_flinger
+</pre>
+
+ <li>Scan for your process ID. If you see an <em>F</em> in the <em>Name</em> column, it's on a
+low-latency track (the F stands for <em>fast track</em>).</li>
+
+</ol>
+
+<h3>Measure round-trip latency</h3>
+
+<p>You can measure round-trip audio latency by creating an app that generates an audio signal,
+listens for that signal, and measures the time between sending it and receiving it.
+Alternatively, you can install this
+<a href="https://play.google.com/store/apps/details?id=org.drrickorang.loopback" class="external-link">
+latency testing app</a>. This performs a round-trip latency test using the
+<a href="https://source.android.com/devices/audio/latency_measure.html#larsenTest" class="external-link">
+Larsen test</a>. You can also
+<a href="https://github.com/gkasten/drrickorang/tree/master/LoopbackApp" class="external-link">
+view the source code</a> for the latency testing app.</p>
+
+<p>Since the lowest latency is achieved over audio paths with minimal signal processing, you may
+also want to use an
+<a href="https://source.android.com/devices/audio/latency_measure.html#loopback" class="external-link">
+Audio Loopback Dongle</a>, which allows the test to be run over the headset connector.</p>
+
+<p>The lowest possible round-trip audio latency varies greatly depending on device model and
+Android build. You can measure it yourself using the latency testing app and loopback
+dongle. When creating apps for <em>Nexus devices</em>, you can also use the
+<a href="https://source.android.com/devices/audio/latency_measurements.html" class="external-link">
+published measurements</a>.</p>
+
+<p>You can also get a rough idea of audio performance by testing whether the device reports
+support for the
+<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY">
+low_latency</a> and
+<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_PRO">
+pro</a> hardware features.</p>
+
+<h3>Review the CDD and audio latency</h3>
+
+<p>The Android Compatibility Definition Document (CDD) enumerates the hardware and software
+requirements of a compatible Android device.
+See <a href="https://source.android.com/compatibility/" class="external-link">
+Android Compatibility</a> for more information on the overall compatibility program, and
+<a href="https://static.googleusercontent.com/media/source.android.com/en//compatibility/android-cdd.pdf" class="external-link">
+CDD</a> for the actual CDD document.</p>
+
+<p>In the CDD, round-trip latency is specified as 20 ms or lower (even though musicians
+generally require 10 ms). This is because there are important use cases that are enabled by
+20 ms.</p>
+
+<p>There is currently no API to determine audio latency over any path on an Android device at
+runtime. You can, however, use the following hardware feature flags to find out whether the
+device makes any guarantees for latency:</p>
+
+<ul>
+ <li><a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY">
+android.hardware.audio.low_latency</a> indicates a continuous output latency of 45 ms or
+less.</li>
+
+ <li><a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_PRO">
+android.hardware.audio.pro</a> indicates a continuous round-trip latency of 20 ms or
+less.</li>
+</ul>
+
+<p>The criteria for reporting these flags is defined in the CDD in sections <em>5.6 Audio
+Latency</em> and <em>5.10 Professional Audio</em>.</p>
+
+<p>Here’s how to check for these features in Java:</p>
+
+<pre>
+boolean hasLowLatencyFeature =
+ getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
+
+boolean hasProFeature =
+ getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_PRO);
+</pre>
+
+<p>Regarding the relationship of audio features, the {@code android.hardware.audio.low_latency}
+feature is a prerequisite for {@code android.hardware.audio.pro}. A device can implement
+{@code android.hardware.audio.low_latency} and not {@code android.hardware.audio.pro}, but not
+vice-versa.</p>
+
+<h2 id="buffer-size">Use the Optimal Buffer Size When Enqueuing Audio Data</h2>
+
+<p>You can obtain the optimal buffer size in a similar way to the optimal frame rate, using the
+AudioManager API:</p>
+
+<pre>
+AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+String framesPerBuffer = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
+int framesPerBufferInt = Integer.parseInt(framesPerBuffer);
+if (framesPerBufferInt == 0) framesPerBufferInt = 256; // Use default
+</pre>
+
+<p>The
+<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_FRAMES_PER_BUFFER">
+PROPERTY_OUTPUT_FRAMES_PER_BUFFER</a> property indicates the number of audio frames
+that the HAL (Hardware Abstraction Layer) buffer can hold. You should construct your audio
+buffers so that they contain an exact multiple of this number. If you use the correct number
+of audio frames, your callbacks occur at regular intervals, which reduces jitter.</p>
+
+<p>It is important to use the API to determine buffer size rather than using a hardcoded value,
+ because HAL buffer sizes differ across devices and across Android builds.</p>
+
+<h2 id="warmup-lat">Avoid Warmup Latency</h2>
+
+<p>When you enqueue audio data for the first time, it takes a small, but still significant,
+amount of time for the device audio circuit to warm up. To avoid this warmup latency, you should
+enqueue buffers of audio data containing silence, as shown in the following code example:</p>
+
+<pre>
+#define CHANNELS 1
+static short* silenceBuffer;
+int numSamples = frames * CHANNELS;
+silenceBuffer = malloc(sizeof(*silenceBuffer) * numSamples);
+ for (i = 0; i < numSamples; i++) {
+ silenceBuffer[i] = 0;
+ }
+</pre>
+
+<p>At the point when audio should be produced, you can switch to enqueuing buffers containing
+real audio data.</p>
+
diff --git a/docs/html/ndk/guides/audio/sample-rates.jd b/docs/html/ndk/guides/audio/sample-rates.jd
new file mode 100644
index 0000000..da68597
--- /dev/null
+++ b/docs/html/ndk/guides/audio/sample-rates.jd
@@ -0,0 +1,151 @@
+page.title=Sample Rates
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>On this page</h2>
+
+ <ol>
+ <li><a href="#best">Best Practices for Sampling and Resampling</a></li>
+ <li><a href="#info">For More Information</a></li>
+ </ol>
+ </div>
+ </div>
+
+<a class="notice-developers-video" href="https://www.youtube.com/watch?v=6Dl6BdrA-sQ">
+<div>
+ <h3>Video</h3>
+ <p>Sample Rates: Why Can't We All Just Agree?</p>
+</div>
+</a>
+
+<p>As of Android 5.0 (Lollipop), the audio resamplers are now entirely based
+on FIR filters derived from a Kaiser windowed-sinc function. The Kaiser windowed-sinc
+offers the following properties:
+<ul>
+ <li>It is straightforward to calculate for its design parameters (stopband
+ ripple, transition bandwidth, cutoff frequency, filter length).</li>
+<li>It is nearly optimal for reduction of stopband energy compared to overall
+energy.</li>
+</ul>
+See P.P. Vaidyanathan, <a class="external-link"
+href="https://drive.google.com/file/d/0B7tBh7YQV0DGak9peDhwaUhqY2c/view">
+<i>Multirate Systems and Filter Banks</i></a>, p. 50 for discussions of the
+Kaiser Window and its optimality and relationship to Prolate Spheroidal
+Windows.</p>
+
+<p>The design parameters are automatically computed based on internal
+quality determination and the sampling ratios desired. Based on the
+design parameters, the windowed-sinc filter is generated. For music use,
+the resampler for 44.1 to 48 kHz and vice versa is generated at a higher
+quality than for arbitrary frequency conversion.</p>
+
+<p>The audio resamplers provide increased quality, as well as speed
+to achieve that quality. But resamplers can introduce small amounts
+of passband ripple and aliasing harmonic noise, and they can cause some high
+frequency loss in the transition band, so avoid using them unnecessarily.</p>
+
+<h2 id="best">Best Practices for Sampling and Resampling</h2>
+<p>This section describes some best practices to help you avoid problems with sampling rates.</p>
+<h3>Choose the sampling rate to fit the device</h3>
+
+<p>In general, it is best to choose the sampling rate to fit the device,
+typically 44.1 kHz or 48 kHz. Use of a sample rate greater than
+48 kHz will typically result in decreased quality because a resampler must be
+used to play back the file.</p>
+
+<h3>Use simple resampling ratios (fixed versus interpolated polyphases)</h3>
+
+<p>The resampler operates in one of the following modes:</p>
+<ul>
+ <li>Fixed polyphase mode. The filter coefficients for each polyphase are precomputed.</li>
+ <li>Interpolated polyphase mode. The filter coefficients for each polyphase must
+be interpolated from the nearest two precomputed polyphases.</li>
+</ul>
+<p>The resampler is fastest in fixed polyphase mode, when the ratio of input
+rate over output rate L/M (taking out the greatest common divisor)
+has M less than 256. For example, for 44,100 to 48,000 conversion, L = 147,
+M = 160.</p>
+
+<p>In fixed polyphase mode, the sampling rate is locked for as
+many samples converted and does not change. In interpolated polyphase
+mode, the sampling rate is approximate. The drift is generally on the
+order of one sample over a few hours of playback on a 48-kHz device.
+This is not usually a concern because approximation error is much less than
+frequency error of internal quartz oscillators, thermal drift, or jitter
+ (typically tens of ppm).</p>
+
+<p>Choose simple-ratio sampling rates such as 24 kHz (1:2) and 32 kHz (2:3) when playing back
+ on a 48-kHz device, even though other sampling
+rates and ratios may be permitted through AudioTrack.</p>
+
+<h3>Use upsampling rather than downsampling when changing sample rates</h3>
+
+<p>Sampling rates can be changed on the fly. The granularity of
+such change is based on the internal buffering (typically a few hundred
+samples), not on a sample-by-sample basis. This can be used for effects.</p>
+
+<p>Do not dynamically change sampling rates when
+downsampling. When changing sample rates after an audio track is
+created, differences of around 5 to 10 percent from the original rate may
+trigger a filter recomputation when downsampling (to properly suppress
+aliasing). This can consume computing resources and may cause an audible click
+if the filter is replaced in real time.</p>
+
+<h3>Limit downsampling to no more than 6:1</h3>
+
+<p>Downsampling is typically triggered by hardware device requirements. When the
+ Sample Rate converter is used for downsampling,
+try to limit the downsampling ratio to no more than 6:1 for good aliasing
+suppression (for example, no greater downsample than 48,000 to 8,000). The filter
+lengths adjust to match the downsampling ratio, but you sacrifice more
+transition bandwidth at higher downsampling ratios to avoid excessively
+increasing the filter length. There are no similar aliasing concerns for
+upsampling. Note that some parts of the audio pipeline
+may prevent downsampling greater than 2:1.</p>
+
+<h3 id="latency">If you are concerned about latency, do not resample</h3>
+
+<p>Resampling prevents the track from being placed in the FastMixer
+path, which means that significantly higher latency occurs due to the additional,
+ larger buffer in the ordinary Mixer path. Furthermore,
+ there is an implicit delay from the filter length of the resampler,
+ though this is typically on the order of one millisecond or less,
+ which is not as large as the additional buffering for the ordinary Mixer path
+ (typically 20 milliseconds).</p>
+
+<h2 id="info">For More Information</h2>
+<p>This section lists some additional resources about sampling and resampling.</p>
+
+<h3>Sample rates</h3>
+
+<p>
+<a href="http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29" class="external-link" >
+Sampling (signal processing)</a> at Wikipedia.</p>
+
+<h3>Resampling</h3>
+
+<p><a href="http://en.wikipedia.org/wiki/Sample_rate_conversion" class="external-link" >
+Sample rate conversion</a> at Wikipedia.</p>
+
+<p><a href="http://source.android.com/devices/audio/src.html" class="external-link" >
+Sample Rate Conversion</a> at source.android.com.</p>
+
+<h3>The high bit-depth and high kHz controversy</h3>
+
+<p><a href="http://people.xiph.org/~xiphmont/demo/neil-young.html" class="external-link" >
+24/192 Music Downloads ... and why they make no sense</a>
+by Christopher "Monty" Montgomery of Xiph.Org.</p>
+
+<p><a href="https://www.youtube.com/watch?v=cIQ9IXSUzuM" class="external-link" >
+D/A and A/D | Digital Show and Tell</a>
+video by Christopher "Monty" Montgomery of Xiph.Org.</p>
+
+<p><a href="http://www.trustmeimascientist.com/2013/02/04/the-science-of-sample-rates-when-higher-is-better-and-when-it-isnt/" class="external-link">
+The Science of Sample Rates (When Higher Is Better - And When It Isn't)</a>.</p>
+
+<p><a href="http://www.image-line.com/support/FLHelp/html/app_audio.htm" class="external-link" >
+Audio Myths & DAW Wars</a></p>
+
+<p><a href="http://forums.stevehoffman.tv/threads/192khz-24bit-vs-96khz-24bit-debate-interesting-revelation.317660/" class="external-link">
+192kHz/24bit vs. 96kHz/24bit "debate"- Interesting revelation</a></p>
diff --git a/docs/html/ndk/guides/graphics/getting-started.jd b/docs/html/ndk/guides/graphics/getting-started.jd
index c0dd463..145e534 100644
--- a/docs/html/ndk/guides/graphics/getting-started.jd
+++ b/docs/html/ndk/guides/graphics/getting-started.jd
@@ -48,7 +48,7 @@
<ol style="1">
<li>If you don’t already have Android Studio,
- <a href="{@docRoot}sdk/index.html">download it.</a></li>
+ <a href="{@docRoot}studio/index.html">download it.</a></li>
<li><a href="https://github.com/android-ndk/ndk/wiki">Download</a> NDK r12-beta.</li>
diff --git a/docs/html/ndk/guides/guides_toc.cs b/docs/html/ndk/guides/guides_toc.cs
index 98fc54d..09b2a12 100644
--- a/docs/html/ndk/guides/guides_toc.cs
+++ b/docs/html/ndk/guides/guides_toc.cs
@@ -63,13 +63,23 @@
</ul>
</li>
- <li class="nav-section">
+ <li class="nav-section">
<div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/audio/index.html">
<span class="en">Audio</span></a></div>
<ul>
<li><a href="<?cs var:toroot ?>ndk/guides/audio/basics.html">Basics</a></li>
<li><a href="<?cs var:toroot ?>ndk/guides/audio/opensl-for-android.html">OpenSL ES for
Android</a></li>
+ <li><a href="<?cs var:toroot ?>ndk/guides/audio/input-latency.html">Audio Input
+ Latency</a></li>
+ <li><a href="<?cs var:toroot ?>ndk/guides/audio/output-latency.html">Audio Output
+ Latency</a></li>
+ <li><a href="<?cs var:toroot ?>ndk/guides/audio/floating-point.html">Floating-Point
+ Audio</a></li>
+ <li><a href="<?cs var:toroot ?>ndk/guides/audio/sample-rates.html">Sample Rates
+ </a></li>
+ <li><a href="<?cs var:toroot ?>ndk/guides/audio/opensl-prog-notes.html">OpenSL ES Programming Notes
+ </a></li>
</ul>
</li>
diff --git a/docs/html/ndk/guides/setup.jd b/docs/html/ndk/guides/setup.jd
index 81a33c0..6e53b29 100644
--- a/docs/html/ndk/guides/setup.jd
+++ b/docs/html/ndk/guides/setup.jd
@@ -33,7 +33,7 @@
<h2 id="install">Installation</h2>
<p>To install and configure the NDK, follow these steps:</p>
<ol type="1">
-<li>Get and install the <a href="{@docRoot}sdk/index.html">Android SDK</a>.</li>
+<li>Get and install the <a href="{@docRoot}studio/index.html">Android SDK</a>.</li>
<li><a href="{@docRoot}ndk/downloads/index.html">Download</a> and
<a href="{@docRoot}ndk/downloads/index.html#extract">extract</a> the NDK,
making sure to download the correct version for your development platform. You may place the
diff --git a/docs/html/offline.jd b/docs/html/offline.jd
index 6d4483f..4a1216e 100644
--- a/docs/html/offline.jd
+++ b/docs/html/offline.jd
@@ -38,7 +38,7 @@
<h3>If you've downloaded the Android SDK for the first time</h3>
-<p>Follow the guide to <a href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a>, which
+<p>Follow the guide to <a href="{@docRoot}studio/install.html">Installing the Android SDK</a>, which
will help you setup your development environment.</p>
<h3>If you've installed new SDK components using the Android SDK Manager</h3>
diff --git a/docs/html/preview/_book.yaml b/docs/html/preview/_book.yaml
index cac6d13..0d4b81b 100644
--- a/docs/html/preview/_book.yaml
+++ b/docs/html/preview/_book.yaml
@@ -24,7 +24,7 @@
- title: Support and Release Notes
path: /preview/support.html
-- title: Set Up to Develop
+- title: Set Up the Preview
path: /preview/setup-sdk.html
path_attributes:
- name: es-lang
diff --git a/docs/html/preview/features/multi-window.jd b/docs/html/preview/features/multi-window.jd
index 0773b32..fec0168 100644
--- a/docs/html/preview/features/multi-window.jd
+++ b/docs/html/preview/features/multi-window.jd
@@ -138,7 +138,9 @@
When the user puts an app into multi-window mode, the system notifies the
activity of a configuration change, as specified in <a href=
"{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
- Changes</a>. Essentially, this change has the same activity-lifecycle
+ Changes</a>. This also happens when the user resizes the app, or puts the app
+ back into full-screen mode.
+ Essentially, this change has the same activity-lifecycle
implications as when the system notifies the app that the device has switched
from portrait to landscape mode, except that the device dimensions are
changed instead of just being swapped. As discussed in <a href=
diff --git a/docs/html/preview/overview.jd b/docs/html/preview/overview.jd
index 57b6b9b..0369490 100644
--- a/docs/html/preview/overview.jd
+++ b/docs/html/preview/overview.jd
@@ -152,7 +152,7 @@
<ul>
<li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong> (initial release, alpha)</li>
- <li><strong><a href="{@docRoot}preview/support.html">Preview 2</a></strong> (incremental update, beta)</li>
+ <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong> (incremental update, alpha)</li>
<li><strong>Preview 3</strong> (incremental update, beta)</li>
<li><strong>Preview 4</strong> (final APIs and official SDK, Play publishing)</li>
<li><strong>Preview 5</strong> (near-final system images for final testing)</li>
@@ -218,7 +218,7 @@
<h3 id="sdk_tools">SDK tools</h3>
-<p>You can download these components through the SDK Manager in <a href="{@docRoot}sdk/installing/adding-packages.html">Android Studio</a>:</p>
+<p>You can download these components through the SDK Manager in <a href="{@docRoot}studio/intro/update.html">Android Studio</a>:</p>
<ul>
<li> N Developer Preview <strong>SDK and tools</strong>
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
index ad8d45f..34d00a4 100644
--- a/docs/html/preview/preview_toc.cs
+++ b/docs/html/preview/preview_toc.cs
@@ -31,7 +31,7 @@
vi-lang="Kiểm thử trên Thiết bị"
zh-cn-lang="设置预览版 SDK"
zh-tw-lang="設定預覽版 SDK">
- Set Up to Develop</a></div>
+ Set Up the Preview</a></div>
</li>
<li class="nav-section">
diff --git a/docs/html/reference/android/support/wearable/navtree_data.js b/docs/html/reference/android/support/wearable/navtree_data.js
index 11e04b1..e51f578 100644
--- a/docs/html/reference/android/support/wearable/navtree_data.js
+++ b/docs/html/reference/android/support/wearable/navtree_data.js
@@ -1,5 +1,7 @@
var NAVTREE_DATA =
-[ [ "android.support.wearable.activity", "reference/android/support/wearable/activity/package-summary.html", [ [ "Classes", null, [ [ "ConfirmationActivity", "reference/android/support/wearable/activity/ConfirmationActivity.html", null, null ], [ "WearableActivity", "reference/android/support/wearable/activity/WearableActivity.html", null, null ] ]
+[ [ "android.support.wearable", "reference/android/support/wearable/package-summary.html", [ [ "Classes", null, [ [ "R", "reference/android/support/wearable/R.html", null, null ], [ "R.anim", "reference/android/support/wearable/R.anim.html", null, null ], [ "R.animator", "reference/android/support/wearable/R.animator.html", null, null ], [ "R.array", "reference/android/support/wearable/R.array.html", null, null ], [ "R.attr", "reference/android/support/wearable/R.attr.html", null, null ], [ "R.bool", "reference/android/support/wearable/R.bool.html", null, null ], [ "R.color", "reference/android/support/wearable/R.color.html", null, null ], [ "R.dimen", "reference/android/support/wearable/R.dimen.html", null, null ], [ "R.drawable", "reference/android/support/wearable/R.drawable.html", null, null ], [ "R.id", "reference/android/support/wearable/R.id.html", null, null ], [ "R.integer", "reference/android/support/wearable/R.integer.html", null, null ], [ "R.interpolator", "reference/android/support/wearable/R.interpolator.html", null, null ], [ "R.layout", "reference/android/support/wearable/R.layout.html", null, null ], [ "R.string", "reference/android/support/wearable/R.string.html", null, null ], [ "R.style", "reference/android/support/wearable/R.style.html", null, null ], [ "R.styleable", "reference/android/support/wearable/R.styleable.html", null, null ] ]
+, null ] ]
+, null ], [ "android.support.wearable.activity", "reference/android/support/wearable/activity/package-summary.html", [ [ "Classes", null, [ [ "ConfirmationActivity", "reference/android/support/wearable/activity/ConfirmationActivity.html", null, null ], [ "WearableActivity", "reference/android/support/wearable/activity/WearableActivity.html", null, null ] ]
, null ] ]
, null ], [ "android.support.wearable.companion", "reference/android/support/wearable/companion/package-summary.html", [ [ "Classes", null, [ [ "WatchFaceCompanion", "reference/android/support/wearable/companion/WatchFaceCompanion.html", null, null ] ]
, null ] ]
diff --git a/docs/html/reference/packages-wearable-support.html b/docs/html/reference/packages-wearable-support.html
index 19a785b..aff2e34 100644
--- a/docs/html/reference/packages-wearable-support.html
+++ b/docs/html/reference/packages-wearable-support.html
@@ -351,7 +351,7 @@
es-lang="Referencia">Reference</a>
</li>
<li class="dac-nav-item tools">
- <a class="dac-nav-link" href="../sdk/index.html"
+ <a class="dac-nav-link" href="../studio/index.html"
zh-tw-lang="相關工具"
zh-cn-lang="工具"
ru-lang="Инструменты"
diff --git a/docs/html/samples/index.jd b/docs/html/samples/index.jd
index 267c273..76ea573 100644
--- a/docs/html/samples/index.jd
+++ b/docs/html/samples/index.jd
@@ -52,7 +52,7 @@
<ol>
<li>Unpack the downloaded project package.</li>
- <li>In <a href="{@docRoot}sdk/installing/studio.html">Android Studio</a>, chose
+ <li>In <a href="{@docRoot}studio/index.html">Android Studio</a>, chose
<strong>File > Import Project</strong> and select the root folder of the unpacked project.
<p>Android Studio may ask you to choose the type of project you are importing.
If this is the case, make sure to choose <strong>Import project from
diff --git a/docs/html/sdk/1.0_r1/installing.jd b/docs/html/sdk/1.0_r1/installing.jd
index 2ea04e4..38c2a1a 100644
--- a/docs/html/sdk/1.0_r1/installing.jd
+++ b/docs/html/sdk/1.0_r1/installing.jd
@@ -1,8 +1,8 @@
@jd:body
<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
+ document.location=toRoot+"studio/index.html"
</script>
<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
+<a href="{@docRoot}studio/index.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/1.0_r2/installing.jd b/docs/html/sdk/1.0_r2/installing.jd
index 2ea04e4..38c2a1a 100644
--- a/docs/html/sdk/1.0_r2/installing.jd
+++ b/docs/html/sdk/1.0_r2/installing.jd
@@ -1,8 +1,8 @@
@jd:body
<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
+ document.location=toRoot+"studio/index.html"
</script>
<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
+<a href="{@docRoot}studio/index.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/1.1_r1/installing.jd b/docs/html/sdk/1.1_r1/installing.jd
index 2ea04e4..38c2a1a 100644
--- a/docs/html/sdk/1.1_r1/installing.jd
+++ b/docs/html/sdk/1.1_r1/installing.jd
@@ -1,8 +1,8 @@
@jd:body
<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
+ document.location=toRoot+"studio/index.html"
</script>
<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
+<a href="{@docRoot}studio/index.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/1.5_r1/installing.jd b/docs/html/sdk/1.5_r1/installing.jd
index 2ea04e4..38c2a1a 100644
--- a/docs/html/sdk/1.5_r1/installing.jd
+++ b/docs/html/sdk/1.5_r1/installing.jd
@@ -1,8 +1,8 @@
@jd:body
<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
+ document.location=toRoot+"studio/index.html"
</script>
<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
+<a href="{@docRoot}studio/index.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/1.5_r2/installing.jd b/docs/html/sdk/1.5_r2/installing.jd
index 2ea04e4..38c2a1a 100644
--- a/docs/html/sdk/1.5_r2/installing.jd
+++ b/docs/html/sdk/1.5_r2/installing.jd
@@ -1,8 +1,8 @@
@jd:body
<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
+ document.location=toRoot+"studio/index.html"
</script>
<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
+<a href="{@docRoot}studio/index.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/1.5_r3/installing.jd b/docs/html/sdk/1.5_r3/installing.jd
index 2ea04e4..38c2a1a 100644
--- a/docs/html/sdk/1.5_r3/installing.jd
+++ b/docs/html/sdk/1.5_r3/installing.jd
@@ -1,8 +1,8 @@
@jd:body
<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
+ document.location=toRoot+"studio/index.html"
</script>
<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
+<a href="{@docRoot}studio/index.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/1.6_r1/installing.jd b/docs/html/sdk/1.6_r1/installing.jd
index 2ea04e4..38c2a1a 100644
--- a/docs/html/sdk/1.6_r1/installing.jd
+++ b/docs/html/sdk/1.6_r1/installing.jd
@@ -1,8 +1,8 @@
@jd:body
<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
+ document.location=toRoot+"studio/index.html"
</script>
<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
+<a href="{@docRoot}studio/index.html">Installing the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/RELEASENOTES.jd b/docs/html/sdk/RELEASENOTES.jd
index d69697a..8f124a5 100644
--- a/docs/html/sdk/RELEASENOTES.jd
+++ b/docs/html/sdk/RELEASENOTES.jd
@@ -45,8 +45,8 @@
</ul>
<p>To get started with the SDK, review the Quick Start summary on the <a
-href="{@docRoot}sdk/index.html">Android SDK download page</a> or read <a
-href="{@docRoot}sdk/installing/index.html">Installing the SDK</a> for detailed
+href="{@docRoot}studio/index.html">Android SDK download page</a> or read <a
+href="{@docRoot}studio/install.html">Installing the SDK</a> for detailed
installation instructions. </p>
@@ -204,7 +204,7 @@
<p>For driver installation or
upgrade instructions, see <a
-href="{@docRoot}sdk/win-usb.html">USB Driver for Windows</a>.</p>
+href="{@docRoot}studio/run/win-usb.html">USB Driver for Windows</a>.</p>
</p>
<h3>Emulator Skins, Android 1.6 Platform</h3>
@@ -445,7 +445,7 @@
<p>For driver installation or
upgrade instructions, see <a
-href="{@docRoot}sdk/win-usb.html">USB Driver for Windows</a>.</p>
+href="{@docRoot}studio/run/win-usb.html">USB Driver for Windows</a>.</p>
</p>
<h3>Resolved Issues, Changes</h3>
diff --git a/docs/html/sdk/download.jd b/docs/html/sdk/download.jd
index 52432cf..5152ba3 100644
--- a/docs/html/sdk/download.jd
+++ b/docs/html/sdk/download.jd
@@ -34,7 +34,7 @@
SDK.</p>
<p class="note"><strong>Note:</strong> You must agree to this license agreement in order to
download one of the archived SDKs, because these SDK packages contain Google software (whereas, the
-<a href="http://developer.android.com/sdk/index.html">current SDK</a> packages do not require a
+<a href="http://developer.android.com/studio/index.html">current SDK</a> packages do not require a
license agreement, because they contain only the open sourced SDK tools).</p>
<iframe id="terms" style="border:1px solid #888;margin:0 0 1em;height:400px;width:100%;"
@@ -72,7 +72,7 @@
recommended. We no longer maintain documentation about how to install these archived SDKs nor
support the tools contained within.</p>
<p>We recommend that you instead download the latest <a
-href="http://developer.android.com/sdk/index.html">Android SDK starter package</a>, which includes
+href="http://developer.android.com/studio/index.html">Android SDK starter package</a>, which includes
the latest SDK tools and allows you to develop against any version of the Android platform, back to
Android 1.1.</p>
</div>
diff --git a/docs/html/sdk/older_releases.jd b/docs/html/sdk/older_releases.jd
index 94baa92..bb64feb 100644
--- a/docs/html/sdk/older_releases.jd
+++ b/docs/html/sdk/older_releases.jd
@@ -9,14 +9,14 @@
<div class="special">
<p>If you are just starting to develop applications for Android, please
-download the current <a href="{@docRoot}sdk/index.html">Android
+download the current <a href="{@docRoot}studio/index.html">Android
SDK</a>. With the current Android SDK, you can add any current and previous
version of the Android platform as a component and use it for
development and testing.</p>
<p>If you already have an Android SDK for platform version 1.6 or newer, then
you do not need to install a new SDK—especially not one from this page.
You should install older platforms as components of your existing SDK.
-See <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
+See <a href="{@docRoot}studio/intro/update.html">Exploring the SDK</a>.</p>
</div>
@@ -30,7 +30,7 @@
the Android platfrom as an individual component.</p>
<p>Please download the current <a
-href="http://developer.android.com/sdk/index.html">Android SDK</a>.</p>
+href="http://developer.android.com/studio/index.html">Android SDK</a>.</p>
<h3>Release 1.6 r1</h3>
diff --git a/docs/html/sdk/sdk_vars.cs b/docs/html/sdk/sdk_vars.cs
new file mode 100644
index 0000000..32fdb0a
--- /dev/null
+++ b/docs/html/sdk/sdk_vars.cs
@@ -0,0 +1,21 @@
+<?cs
+set:ndk.mac64_download='android-ndk-r11c-darwin-x86_64.zip' ?><?cs
+set:ndk.mac64_bytes='772428792' ?><?cs
+set:ndk.mac64_checksum='4ce8e7ed8dfe08c5fe58aedf7f46be2a97564696' ?><?cs
+
+set:ndk.linux64_download='android-ndk-r11c-linux-x86_64.zip' ?><?cs
+set:ndk.linux64_bytes='794135138' ?><?cs
+set:ndk.linux64_checksum='de5ce9bddeee16fb6af2b9117e9566352aa7e279' ?><?cs
+
+set:ndk.win64_download='android-ndk-r11c-windows-x86_64.zip' ?><?cs
+set:ndk.win64_bytes='771407642' ?><?cs
+set:ndk.win64_checksum='3d89deb97b3191c7e5555f1313ad35059479f071' ?><?cs
+set:ndk.win32_download='android-ndk-r11c-windows-x86.zip' ?><?cs
+set:ndk.win32_bytes='728899082' ?><?cs
+set:ndk.win32_checksum='ff939bde6cd374eecbd2c3b2ad218697f9a5038c'
+?>
+<?cs
+def:size_in_mb(bytes)
+ ?><?cs set:mb = bytes / 1024 / 1024
+ ?><?cs var:mb ?><?cs
+/def ?>
diff --git a/docs/html/sitemap.txt b/docs/html/sitemap.txt
index cd87d1c..d41950a 100644
--- a/docs/html/sitemap.txt
+++ b/docs/html/sitemap.txt
@@ -13,7 +13,7 @@
http://developer.android.com/guide/components/index.html
http://developer.android.com/reference/packages.html
http://developer.android.com/tools/index.html
-http://developer.android.com/sdk/index.html
+http://developer.android.com/studio/index.html
http://developer.android.com/google/index.html
http://developer.android.com/distribute/googleplay/publish/index.html
http://developer.android.com/distribute/googleplay/promote/index.html
@@ -79,10 +79,10 @@
http://developer.android.com/downloads/design/Roboto_Specimen_Book_20111129.pdf
http://developer.android.com/downloads/design/Android_Design_Color_Swatches_20120229.zip
http://developer.android.com/sdk/installing/bundle.html
-http://developer.android.com/sdk/installing/index.html
+http://developer.android.com/studio/install.html
http://developer.android.com/sdk/installing/installing-adt.html
-http://developer.android.com/sdk/installing/adding-packages.html
-http://developer.android.com/sdk/exploring.html
+http://developer.android.com/studio/intro/update.html
+http://developer.android.com/studio/intro/update.html
http://developer.android.com/tools/sdk/ndk/index.html
http://developer.android.com/tools/workflow/index.html
http://developer.android.com/tools/devices/index.html
@@ -4183,7 +4183,7 @@
http://developer.android.com/reference/org/json/JSONArray.html
http://developer.android.com/reference/org/json/JSONStringer.html
http://developer.android.com/reference/org/json/JSONTokener.html
-http://developer.android.com/sdk/win-usb.html
+http://developer.android.com/studio/run/win-usb.html
http://developer.android.com/reference/android/media/effect/EffectUpdateListener.html
http://developer.android.com/reference/javax/xml/validation/Schema.html
http://developer.android.com/reference/android/support/v4/os/ParcelableCompatCreatorCallbacks.html
@@ -4958,7 +4958,7 @@
http://developer.android.com/sdk/api_diff/9/changes/java.security.UnrecoverableKeyException.html
http://developer.android.com/sdk/api_diff/3/changes/jdiff_statistics.html
http://developer.android.com/reference/android/telephony/cdma/CdmaCellLocation.html
-http://developer.android.com/sdk/installing.html
+http://developer.android.com/studio/index.html
http://developer.android.com/tools/sdk/ndk/overview.html
http://developer.android.com/reference/dalvik/system/DexClassLoader.html
http://developer.android.com/sdk/api_diff/13/changes/jdiff_topleftframe.html
diff --git a/docs/html/topic/libraries/support-library/setup.jd b/docs/html/topic/libraries/support-library/setup.jd
index 8fbcee1..62f7148 100755
--- a/docs/html/topic/libraries/support-library/setup.jd
+++ b/docs/html/topic/libraries/support-library/setup.jd
@@ -216,7 +216,7 @@
<p>In this case, the build file setting tells Google Play that the default build variant of your
application can be installed on devices with Android 2.2 (API level 8) and higher. For more
information about build variants, see
- <a href="{@docRoot}sdk/installing/studio-build.html">Build System Overview</a>. </p>
+ <a href="{@docRoot}studio/build/index.html">Build System Overview</a>. </p>
<p class="note">
<strong>Note:</strong> If you are including the v4 support and v7 appcompat libraries in your
diff --git a/docs/html/topic/libraries/testing-support-library/index.jd b/docs/html/topic/libraries/testing-support-library/index.jd
index 6376e1d..ccbbe74 100644
--- a/docs/html/topic/libraries/testing-support-library/index.jd
+++ b/docs/html/topic/libraries/testing-support-library/index.jd
@@ -629,5 +629,5 @@
<p>
For more information about Android Studio and to download it, see
- <a href="{@docRoot}sdk/index.html">Download Android Studio and SDK Tools</a>.
+ <a href="{@docRoot}studio/index.html">Download Android Studio and SDK Tools</a>.
</p>
diff --git a/docs/html/training/auto/messaging/index.jd b/docs/html/training/auto/messaging/index.jd
index fa8a8c4..0c4c732 100644
--- a/docs/html/training/auto/messaging/index.jd
+++ b/docs/html/training/auto/messaging/index.jd
@@ -280,7 +280,7 @@
<p>
After you have updated the support libraries, import them into your Android Studio development
project by adding this dependency to your
- <a href="{@docRoot}sdk/installing/studio-build.html#configBuild">build.gradle</a> file:
+ <a href="{@docRoot}studio/build/index.html#configBuild">build.gradle</a> file:
</p>
<pre>
diff --git a/docs/html/training/auto/start/index.jd b/docs/html/training/auto/start/index.jd
index 202e2c0..b0e747d 100644
--- a/docs/html/training/auto/start/index.jd
+++ b/docs/html/training/auto/start/index.jd
@@ -63,7 +63,7 @@
<p>Before you begin building apps for Auto, you must:</p>
<ul>
-<li><strong><a href="{@docRoot}sdk/installing/create-project.html">Create or
+<li><strong><a href="{@docRoot}studio/projects/create-project.html">Create or
update your app project</a></strong> - Android 5.0 (API level 21) provides new
APIs for implementing audio playback and messaging that is compatible with Auto.
To access the new APIs, create a project or modify an existing project to target
diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd
index 57118ce..e66237a 100644
--- a/docs/html/training/basics/firstapp/creating-project.jd
+++ b/docs/html/training/basics/firstapp/creating-project.jd
@@ -37,10 +37,9 @@
shows how to create a new project either using Android Studio or using the
SDK tools from a command line.</p>
-<p class="note"><strong>Note:</strong> You should already have the Android SDK installed, and if
-you're using Android Studio, you should also have <a href="{@docRoot}sdk/installing/studio.html">
-Android Studio</a> installed. If you don't have these, follow the guide to <a
-href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a> before you start this
+<p class="note"><strong>Note:</strong> You should already have Android Studio or the Android SDK
+command-line tools installed. If not, <a
+href="{@docRoot}studio/index.html">download them</a> before you start this
lesson.</p>
@@ -139,7 +138,7 @@
<li><code>compiledSdkVersion</code> is the platform version against which you will compile
your app. By default, this is set to the latest version of Android available in your SDK.
(It should be Android 4.1 or greater; if you don't have such a version available, you must
- install one using the <a href="{@docRoot}sdk/installing/adding-packages.html">SDK Manager</a>.)
+ install one using the <a href="{@docRoot}studio/intro/update.html">SDK Manager</a>.)
You can still build your app to support older versions, but setting this to the latest
version allows you to enable new features and optimize your app for a great user experience
on the latest devices.</li>
@@ -154,7 +153,7 @@
<a href="{@docRoot}training/basics/supporting-devices/platforms.html">Supporting Different
Platform Versions</a>.</li>
</ul>
- <p>See <a href="{@docRoot}sdk/installing/studio-build.html">Building Your Project with Gradle</a>
+ <p>See <a href="{@docRoot}studio/build/index.html">Building Your Project with Gradle</a>
for more information about Gradle.</p></dd>
</dl>
diff --git a/docs/html/training/basics/firstapp/index.jd b/docs/html/training/basics/firstapp/index.jd
index 4e3689a..cb5073f 100644
--- a/docs/html/training/basics/firstapp/index.jd
+++ b/docs/html/training/basics/firstapp/index.jd
@@ -15,7 +15,7 @@
<h2>Dependencies</h2>
<ul>
- <li><a href="{@docRoot}sdk/index.html">Android Studio</a></li>
+ <li><a href="{@docRoot}studio/index.html">Android Studio</a></li>
</ul>
</div>
@@ -32,7 +32,7 @@
<p>Before you start this class, be sure you have your development environment set up. You need
to:</p>
<ol>
- <li>Download <a href="{@docRoot}sdk/index.html">Android Studio</a>.</li>
+ <li>Download <a href="{@docRoot}studio/index.html">Android Studio</a>.</li>
<li>Download the latest SDK tools and platforms using the
<a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</li>
</ol>
diff --git a/docs/html/training/basics/firstapp/starting-activity.jd b/docs/html/training/basics/firstapp/starting-activity.jd
index b67effa..0985e37 100644
--- a/docs/html/training/basics/firstapp/starting-activity.jd
+++ b/docs/html/training/basics/firstapp/starting-activity.jd
@@ -25,13 +25,6 @@
<li><a href="#DisplayMessage">Display the Message</a></li>
</ol>
-<h2>You should also read</h2>
-
-<ul>
- <li><a href="{@docRoot}sdk/installing/index.html">Installing the
-SDK</a></li>
-</ul>
-
</div>
</div>
@@ -406,7 +399,7 @@
<p class="note"><strong>Note:</strong> Your Android SDK should already include
the latest Android Support Library, which you installed during the
-<a href="{@docRoot}sdk/installing/adding-packages.html">Adding SDK Packages</a> step.
+<a href="{@docRoot}studio/intro/update.html">Adding SDK Packages</a> step.
When using the templates in Android Studio, the Support Library is automatically added to your app project
(you can see the library's JAR file listed under <em>Android Dependencies</em>). If you're not using
Android Studio, you need to manually add the library to your project—follow the guide for <a
diff --git a/docs/html/training/basics/supporting-devices/languages.jd b/docs/html/training/basics/supporting-devices/languages.jd
index 098b556..40484b1 100644
--- a/docs/html/training/basics/supporting-devices/languages.jd
+++ b/docs/html/training/basics/supporting-devices/languages.jd
@@ -19,6 +19,7 @@
<ul>
<li><a href="{@docRoot}distribute/tools/localization-checklist.html">Localization Checklist</a></li>
<li><a href="{@docRoot}guide/topics/resources/localization.html">Localization with Resources</a></li>
+ <li><a href="https://support.google.com/l10n/answer/6359997">App Translation Service</a></li>
</ul>
</div>
</div>
diff --git a/docs/html/training/custom-views/index.jd b/docs/html/training/custom-views/index.jd
index f732adb..447da94 100755
--- a/docs/html/training/custom-views/index.jd
+++ b/docs/html/training/custom-views/index.jd
@@ -48,7 +48,7 @@
<dl>
<dt><b><a href="create-view.html">Creating a View Class</a></b></dt>
<dd>Create a class that acts like a built-in view, with custom
- attributes and support from the <a href="http://developer.android.com/sdk/installing/studio-layout.html">Android Studio</a> layout editor.
+ attributes and support from the <a href="http://developer.android.com/studio/write/layout-editor.html">Android Studio</a> layout editor.
</dd>
<dt><b><a href="custom-drawing.html">Custom Drawing</a></b></dt>
diff --git a/docs/html/training/material/compatibility.jd b/docs/html/training/material/compatibility.jd
index 49ef7f7..9ea88b2 100644
--- a/docs/html/training/material/compatibility.jd
+++ b/docs/html/training/material/compatibility.jd
@@ -127,7 +127,7 @@
<p>To use these features in versions of Android earlier than 5.0 (API level 21), include the
Android v7 Support Library in your project as a <a
-href="{@docRoot}/sdk/installing/studio-build.html#dependencies">Gradle dependency</a>:</p>
+href="{@docRoot}/studio/build/index.html#dependencies">Gradle dependency</a>:</p>
<pre>
dependencies {
diff --git a/docs/html/training/material/drawables.jd b/docs/html/training/material/drawables.jd
index eb9d273..75911f1 100644
--- a/docs/html/training/material/drawables.jd
+++ b/docs/html/training/material/drawables.jd
@@ -70,7 +70,7 @@
<code>Palette</code> class, such as <code>Palette.getVibrantColor</code>.</p>
<p>To use the {@link android.support.v7.graphics.Palette} class in your project, add the following
-<a href="{@docRoot}sdk/installing/studio-build.html#dependencies">Gradle dependency</a> to your
+<a href="{@docRoot}studio/build/index.html#dependencies">Gradle dependency</a> to your
app's module:</p>
<pre>
diff --git a/docs/html/training/material/lists-cards.jd b/docs/html/training/material/lists-cards.jd
index e7bdfe0..ee4a56f 100644
--- a/docs/html/training/material/lists-cards.jd
+++ b/docs/html/training/material/lists-cards.jd
@@ -254,7 +254,7 @@
<p>The {@link android.support.v7.widget.RecyclerView} and {@link android.support.v7.widget.CardView}
widgets are part of the <a href="{@docRoot}tools/support-library/features.html#v7">v7 Support
Libraries</a>. To use these widgets in your project, add these
-<a href="{@docRoot}sdk/installing/studio-build.html#dependencies">Gradle dependencies</a> to your
+<a href="{@docRoot}studio/build/index.html#dependencies">Gradle dependencies</a> to your
app's module:</p>
<pre>
diff --git a/docs/html/training/multiple-apks/api.jd b/docs/html/training/multiple-apks/api.jd
index 504b4e3..6647a8c 100755
--- a/docs/html/training/multiple-apks/api.jd
+++ b/docs/html/training/multiple-apks/api.jd
@@ -149,17 +149,9 @@
likelihood of mistakes that could have been easily avoided.</p>
<p class="note"><strong>Note:</strong> While the implementation details of how to create and
-include library projects are beyond the scope of this lesson, you can get up to speed quickly on
-their creation at the following links:</p>
-<ul>
-<li><a
-href="{@docRoot}sdk/installing/create-project.html#SettingUpLibraryModule">Managing Projects
-from Android Studio</a></li>
-<li><a
-href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Managing Projects
-from the Command Line</a></li>
-</ul>
-
+include library projects are beyond the scope of this lesson, you can get up to speed
+by reading <a
+href="{@docRoot}studio/projects/android-library.html">Create an Android Library</a>.</p>
<p>If you’re converting an existing application to use multiple APK support,
scour your codebase for every localized string file, list of values, theme
diff --git a/docs/html/training/multiple-apks/multiple.jd b/docs/html/training/multiple-apks/multiple.jd
index 2501564..c0c2baa 100755
--- a/docs/html/training/multiple-apks/multiple.jd
+++ b/docs/html/training/multiple-apks/multiple.jd
@@ -178,16 +178,9 @@
likelihood of mistakes that could have been easily avoided.</p>
<p class="note"><strong>Note:</strong> While the implementation details of how to create and
-include library projects are beyond the scope of this lesson, you can get up to speed quickly on
-their creation at the following links:</p>
-<ul>
-<li><a
-href="{@docRoot}sdk/installing/create-project.html#SettingUpLibraryModule">Managing Projects
-from Android Studio</a></li>
-<li><a
-href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Managing Projects
-from the Command Line</a></li>
-</ul>
+include library projects are beyond the scope of this lesson, you can get up to speed
+by reading <a
+href="{@docRoot}studio/projects/android-library.html">Create an Android Library</a>.</p>
<p>If you’re converting an existing application to use multiple APK support,
scour your codebase for every localized string file, list of values, theme
diff --git a/docs/html/training/multiple-apks/screensize.jd b/docs/html/training/multiple-apks/screensize.jd
index a482f67..1668691 100755
--- a/docs/html/training/multiple-apks/screensize.jd
+++ b/docs/html/training/multiple-apks/screensize.jd
@@ -126,18 +126,9 @@
likelihood of mistakes that could have been easily avoided.</p>
<p class="note"><strong>Note:</strong> While the implementation details of how to create and
-include library projects are beyond the scope of this lesson, you can get up to speed quickly on
-their creation at the following links:</p>
-<ul>
-<li><a
-href="{@docRoot}sdk/installing/create-project.html#SettingUpLibraryModule">Managing Projects
-from Android Studio</a></li>
-<li><a
-href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Managing Projects
-from the Command Line</a></li>
-</ul>
-
-
+include library projects are beyond the scope of this lesson, you can get up to speed
+by reading <a
+href="{@docRoot}studio/projects/android-library.html">Create an Android Library</a>.</p>
<p>If you’re converting an existing application to use multiple APK support,
scour your codebase for every localized string file, list of values, theme
diff --git a/docs/html/training/multiple-apks/texture.jd b/docs/html/training/multiple-apks/texture.jd
index 3ffd64f..ff3c024 100755
--- a/docs/html/training/multiple-apks/texture.jd
+++ b/docs/html/training/multiple-apks/texture.jd
@@ -109,16 +109,9 @@
likelihood of mistakes that could have been easily avoided.</p>
<p class="note"><strong>Note:</strong> While the implementation details of how to create and
-include library projects are beyond the scope of this lesson, you can get up to speed quickly on
-their creation at the following links:</p>
-<ul>
-<li><a
-href="{@docRoot}sdk/installing/create-project.html#SettingUpLibraryModule">Managing Projects
-from Android Studio</a></li>
-<li><a
-href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Managing Projects
-from the Command Line</a></li>
-</ul>
+include library projects are beyond the scope of this lesson, you can get up to speed
+by reading <a
+href="{@docRoot}studio/projects/android-library.html">Create an Android Library</a>.</p>
<p>If you’re converting an existing application to use multiple APK support,
scour your codebase for every localized string file, list of values, theme
diff --git a/docs/html/training/testing/integration-testing/service-testing.jd b/docs/html/training/testing/integration-testing/service-testing.jd
index 7b420ac..60b95ca 100644
--- a/docs/html/training/testing/integration-testing/service-testing.jd
+++ b/docs/html/training/testing/integration-testing/service-testing.jd
@@ -128,7 +128,7 @@
<h2 id="run">Run Integration Tests for Services</h2>
<p>
-You can run integration tests from <a href="{@docRoot}sdk/index.html">Android Studio</a> or
+You can run integration tests from <a href="{@docRoot}studio/index.html">Android Studio</a> or
from the command-line. Make sure to specify
<a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
{@code AndroidJUnitRunner}</a> as the default instrumentation runner in your project.
diff --git a/docs/html/training/testing/ui-testing/espresso-testing.jd b/docs/html/training/testing/ui-testing/espresso-testing.jd
index 45a4ceb..7df67e7 100644
--- a/docs/html/training/testing/ui-testing/espresso-testing.jd
+++ b/docs/html/training/testing/ui-testing/espresso-testing.jd
@@ -582,7 +582,7 @@
<h2 id="run">Run Espresso Tests on a Device or Emulator</h2>
<p>
-You can run Espresso tests from <a href="{@docRoot}sdk/index.html">Android Studio</a> or
+You can run Espresso tests from <a href="{@docRoot}studio/index.html">Android Studio</a> or
from the command-line. Make sure to specify
<a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
{@code AndroidJUnitRunner}</a> as the default instrumentation runner in your project.
diff --git a/docs/html/training/testing/ui-testing/index.jd b/docs/html/training/testing/ui-testing/index.jd
index 1aa95a4..20ec99e 100644
--- a/docs/html/training/testing/ui-testing/index.jd
+++ b/docs/html/training/testing/ui-testing/index.jd
@@ -32,7 +32,7 @@
you to run your tests quickly and reliably in a repeatable manner.</p>
<p class="note"><strong>Note: </strong>It is strongly encouraged that you use
-<a href="{@docRoot}sdk/installing/studio.html">Android Studio</a> for
+<a href="{@docRoot}studio/index.html">Android Studio</a> for
building your test apps, because it provides project setup, library inclusion, and packaging
conveniences. This class assumes you are using Android Studio.</p>
diff --git a/docs/html/training/testing/ui-testing/uiautomator-testing.jd b/docs/html/training/testing/ui-testing/uiautomator-testing.jd
index 5dca40b..db9f14b 100644
--- a/docs/html/training/testing/ui-testing/uiautomator-testing.jd
+++ b/docs/html/training/testing/ui-testing/uiautomator-testing.jd
@@ -512,7 +512,7 @@
<h2 id="run">Run UI Automator Tests on a Device or Emulator</h2>
<p>
-You can run UI Automator tests from <a href="{@docRoot}sdk/index.html">Android Studio</a> or
+You can run UI Automator tests from <a href="{@docRoot}studio/index.html">Android Studio</a> or
from the command-line. Make sure to specify
<a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
{@code AndroidJUnitRunner}</a> as the default instrumentation runner in your project.
diff --git a/docs/html/training/tv/start/index.jd b/docs/html/training/tv/start/index.jd
index cbd9b49..fcdaa10 100644
--- a/docs/html/training/tv/start/index.jd
+++ b/docs/html/training/tv/start/index.jd
@@ -37,7 +37,7 @@
<p class="note">
<strong>Note:</strong> You are encouraged to use <a href=
- "{@docRoot}sdk/installing/studio.html">Android Studio</a> for building TV apps, because it
+ "{@docRoot}studio/index.html">Android Studio</a> for building TV apps, because it
provides project setup, library inclusion, and packaging conveniences. This training assumes you
are using Android Studio.
</p>
diff --git a/docs/html/training/tv/start/start.jd b/docs/html/training/tv/start/start.jd
index 492cec8..9766839 100755
--- a/docs/html/training/tv/start/start.jd
+++ b/docs/html/training/tv/start/start.jd
@@ -77,17 +77,17 @@
<p>Before you begin building apps for TV, you must:</p>
<ul>
- <li><strong><a href="{@docRoot}sdk/installing/adding-packages.html#GetTools">
+ <li><strong><a href="{@docRoot}studio/intro/update.html#GetTools">
Update your SDK tools to version 24.0.0 or higher</a></strong>
<br>
The updated SDK tools enable you to build and test apps for TV.
</li>
- <li><strong><a href="{@docRoot}sdk/installing/adding-packages.html#GetTools">
+ <li><strong><a href="{@docRoot}studio/intro/update.html#GetTools">
Update your SDK with Android 5.0 (API 21) or higher</a></strong>
<br>
The updated platform version provides new APIs for TV apps.
</li>
- <li><strong><a href="{@docRoot}sdk/installing/create-project.html">
+ <li><strong><a href="{@docRoot}studio/projects/create-project.html">
Create or update your app project</a></strong>
<br>
In order to access new APIs for TV devices, you must create a project or modify an existing
@@ -364,6 +364,6 @@
<p>
For more information about using emulators see, <a href="{@docRoot}tools/devices/emulator.html">
Using the Emulator</a>. For more information on deploying apps from Android Studio to virtual
- devices, see <a href="{@docRoot}sdk/installing/studio-debug.html">Debugging with Android
+ devices, see <a href="{@docRoot}studio/debug/index.html">Debugging with Android
Studio</a>.
</p>
diff --git a/docs/html/training/volley/index.jd b/docs/html/training/volley/index.jd
index 6ee7d4e..22f9272 100755
--- a/docs/html/training/volley/index.jd
+++ b/docs/html/training/volley/index.jd
@@ -78,9 +78,8 @@
</li>
<li>Import the downloaded source into your app project as an Android library module
-(as described in <a href="{@docRoot}sdk/installing/create-project.html#SettingUpLibraryModule">
-Managing Projects from Android Studio</a>, if you're using Android Studio) or make a
-<a href="{@docRoot}guide/faq/commontasks.html#addexternallibrary"><code>.jar</code> file</a>.</li>
+as described in <a
+href="{@docRoot}studio/projects/android-library.html">Create an Android Library</a>.</li>
</ol>
<h2>Lessons</h2>
diff --git a/docs/html/training/wearables/apps/always-on.jd b/docs/html/training/wearables/apps/always-on.jd
index 9f28b70..7f63ee4 100644
--- a/docs/html/training/wearables/apps/always-on.jd
+++ b/docs/html/training/wearables/apps/always-on.jd
@@ -62,7 +62,7 @@
<li>Update your SDK to include the Android 5.1 (API 22) or higher platform, which provides the
APIs to allow activities to go into ambient mode. For more information on how to update your SDK,
see
- <a href="{@docRoot}sdk/installing/adding-packages.html#GetTools">Adding SDK Packages</a>.
+ <a href="{@docRoot}studio/intro/update.html#GetTools">Adding SDK Packages</a>.
</li>
<li> Create a project or modify an existing project to target Android 5.1 or higher. This means
you must set the manifest
diff --git a/docs/html/training/wearables/apps/creating.jd b/docs/html/training/wearables/apps/creating.jd
index db91b67..1437423 100644
--- a/docs/html/training/wearables/apps/creating.jd
+++ b/docs/html/training/wearables/apps/creating.jd
@@ -49,7 +49,7 @@
</ul>
<p>To update your SDK with these components, see
-<a href="{@docRoot}sdk/installing/adding-packages.html#GetTools"> Get the latest SDK tools</a>.</p>
+<a href="{@docRoot}studio/intro/update.html#GetTools"> Get the latest SDK tools</a>.</p>
<p class="note"><strong>Note:</strong> If you plan to make your Wear apps available for China,
you must use the special release version 7.8.87 of the Google Play services client library to handle
@@ -139,7 +139,7 @@
<p>To begin development, create an app project that contains
wearable and handheld app modules. In Android Studio, click <b>File</b> >
<b>New Project</b> and follow the Project Wizard instructions, as described in
- <a href="{@docRoot}sdk/installing/create-project.html">Creating a
+ <a href="{@docRoot}studio/projects/create-project.html">Creating a
Project</a>. As you follow the wizard, enter the following information:</p>
<ol>
diff --git a/docs/html/training/wearables/apps/layouts.jd b/docs/html/training/wearables/apps/layouts.jd
index 6480e63..a5f3480 100755
--- a/docs/html/training/wearables/apps/layouts.jd
+++ b/docs/html/training/wearables/apps/layouts.jd
@@ -200,5 +200,5 @@
reference documentation</a> for the classes above.</p>
<p class="note"><strong>Note:</strong> We recommend using <a
-href="{@docRoot}sdk/index.html">Android Studio</a> for Android Wear development, as
+href="{@docRoot}studio/index.html">Android Studio</a> for Android Wear development, as
it provides project setup, library inclusion, and packaging conveniences.</p>
diff --git a/docs/html/training/wearables/apps/packaging.jd b/docs/html/training/wearables/apps/packaging.jd
index 9c42978..c342b46 100644
--- a/docs/html/training/wearables/apps/packaging.jd
+++ b/docs/html/training/wearables/apps/packaging.jd
@@ -54,7 +54,7 @@
handheld app with the wearable app embedded in it automatically into your project's root folder.
<p>Alternatively, you can sign both apps from the command line using the
- <a href="{@docRoot}sdk/installing/studio-build.html#gradleWrapper">Gradle wrapper</a>. Both apps
+ <a href="{@docRoot}studio/build/index.html#gradleWrapper">Gradle wrapper</a>. Both apps
must be signed to have the automatic pushing of the wearable app work.</p>
<p>Store your key file location and credentials in environment variables and run the Gradle
diff --git a/docs/html/training/wearables/watch-faces/index.jd b/docs/html/training/wearables/watch-faces/index.jd
index aac49d3..94719fd8 100755
--- a/docs/html/training/wearables/watch-faces/index.jd
+++ b/docs/html/training/wearables/watch-faces/index.jd
@@ -45,7 +45,7 @@
designs integrate with system UI elements and are power-efficient.</p>
<p class="note"><strong>Note:</strong> We recommend using <a
-href="{@docRoot}sdk/index.html">Android Studio</a> for Android Wear development, as
+href="{@docRoot}studio/index.html">Android Studio</a> for Android Wear development, as
it provides project setup, library inclusion, and packaging conveniences. This training assumes
you are using Android Studio.</p>
diff --git a/docs/html/training/wearables/watch-faces/service.jd b/docs/html/training/wearables/watch-faces/service.jd
index 4246f60..20eb0c77 100755
--- a/docs/html/training/wearables/watch-faces/service.jd
+++ b/docs/html/training/wearables/watch-faces/service.jd
@@ -64,7 +64,7 @@
</ol>
<p>Android Studio creates a project with the <code>wear</code> and <code>mobile</code> modules.
-For more information, see <a href="{@docRoot}sdk/installing/create-project.html">Creating a
+For more information, see <a href="{@docRoot}studio/projects/create-project.html">Creating a
Project</a>.</p>
<h3 id="Dependencies">Dependencies</h3>
@@ -88,7 +88,7 @@
documentation</a> for the Wearable Support Library.</p>
<p class="note"><strong>Note:</strong> We recommend using <a
-href="{@docRoot}sdk/index.html">Android Studio</a> for Android Wear development, as
+href="{@docRoot}studio/index.html">Android Studio</a> for Android Wear development, as
it provides project setup, library inclusion, and packaging conveniences.</p>
<h3 id="Permissions">Declare Permissions</h3>
@@ -243,7 +243,7 @@
defined by the <code>com.google.android.wearable.watchface.preview</code> metadata entry when
presenting users with all the watch faces installed on the device. To obtain this drawable,
run the watch face on your Android Wear device or in an emulator instance and <a
-href="{@docRoot}sdk/installing/studio-debug.html#screenCap">take a screenshot</a>. On Android Wear
+href="{@docRoot}studio/debug/am-screenshot.html">take a screenshot</a>. On Android Wear
devices with hdpi screens, the preview image is typically 320x320 pixels in size.</p>
<p>Watch faces that look substantially different on round devices can provide both round and