Merge "docs: Added warning to versioning.html." into mnc-docs
am: 7da3c10988
* commit '7da3c10988858cc6ff949e9270ee68b056721833':
docs: Added warning to versioning.html.
diff --git a/docs/html/images/cards/card-n-apis_2x.png b/docs/html/images/cards/card-n-apis_2x.png
new file mode 100644
index 0000000..296ea6c
--- /dev/null
+++ b/docs/html/images/cards/card-n-apis_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-changes_2x.png b/docs/html/images/cards/card-n-changes_2x.png
new file mode 100644
index 0000000..7d08e37
--- /dev/null
+++ b/docs/html/images/cards/card-n-changes_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-downloads_2x.png b/docs/html/images/cards/card-n-downloads_2x.png
new file mode 100644
index 0000000..febc661
--- /dev/null
+++ b/docs/html/images/cards/card-n-downloads_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-overview_2x.png b/docs/html/images/cards/card-n-overview_2x.png
new file mode 100644
index 0000000..2c7392a
--- /dev/null
+++ b/docs/html/images/cards/card-n-overview_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-samples_2x.png b/docs/html/images/cards/card-n-samples_2x.png
new file mode 100644
index 0000000..d6621eb
--- /dev/null
+++ b/docs/html/images/cards/card-n-samples_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-sdk_2x.png b/docs/html/images/cards/card-n-sdk_2x.png
new file mode 100644
index 0000000..05d2eb9
--- /dev/null
+++ b/docs/html/images/cards/card-n-sdk_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-support_2x.png b/docs/html/images/cards/card-n-support_2x.png
new file mode 100644
index 0000000..0aec6cf
--- /dev/null
+++ b/docs/html/images/cards/card-n-support_2x.png
Binary files differ
diff --git a/docs/html/images/home/n-preview-hero.png b/docs/html/images/home/n-preview-hero.png
new file mode 100644
index 0000000..c0ec407
--- /dev/null
+++ b/docs/html/images/home/n-preview-hero.png
Binary files differ
diff --git a/docs/html/images/home/n-preview-hero_2x.png b/docs/html/images/home/n-preview-hero_2x.png
new file mode 100644
index 0000000..325ac6d
--- /dev/null
+++ b/docs/html/images/home/n-preview-hero_2x.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 1777e72..e46add9 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -16,39 +16,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multiwindow UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
@@ -59,7 +57,7 @@
<li class="dac-action">
<a class="dac-action-link" href="{@docRoot}sdk/index.html">
<i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
- Get the SDK
+ Get Android Studio
</a>
</li>
<li class="dac-action">
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index cd2d771..3a17f05 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -16,8 +16,8 @@
"index/secondary/carousel": {
"title": "",
"resources": [
- "http://www.youtube.com/watch?v=Pms0pcyPbAM",
"http://www.youtube.com/watch?v=9m6MoBM-sFI",
+ "http://www.youtube.com/watch?v=Pms0pcyPbAM",
"http://www.youtube.com/watch?v=e7t3svG9PTk",
"http://www.youtube.com/watch?v=J3IvOfvH1ys"
]
@@ -135,6 +135,18 @@
"https://www.youtube.com/watch?v=5Be2mJzP-Uw&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX"
]
},
+ "preview/landing/resources": {
+ "title": "",
+ "resources": [
+ "preview/overview.html",
+ "preview/api-overview.html",
+ "preview/behavior-changes.html",
+ "preview/download.html",
+ "preview/samples.html",
+ "preview/setup-sdk.html",
+ "preview/support.html"
+ ]
+ },
"google/landing/services": {
"title": "",
"resources": [
diff --git a/docs/html/jd_tag_helpers.js b/docs/html/jd_tag_helpers.js
index 7538e4d..1c26c59 100644
--- a/docs/html/jd_tag_helpers.js
+++ b/docs/html/jd_tag_helpers.js
@@ -15,6 +15,7 @@
SAMPLES_RESOURCES,
TOOLS_RESOURCES,
TRAINING_RESOURCES,
+ PREVIEW_RESOURCES,
YOUTUBE_RESOURCES,
BLOGGER_RESOURCES
);
@@ -72,6 +73,7 @@
'samples': SAMPLES_RESOURCES,
'tools': TOOLS_RESOURCES,
'training': TRAINING_RESOURCES,
+ 'preview': PREVIEW_RESOURCES,
'youtube': YOUTUBE_RESOURCES,
'blog': BLOGGER_RESOURCES
};
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
new file mode 100644
index 0000000..df18330
--- /dev/null
+++ b/docs/html/preview/api-overview.jd
@@ -0,0 +1,11 @@
+page.title=Android N APIs & Features
+meta.tags="preview", "androidn"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-overview_2x.png
+@jd:body
+
+<p>
+This page is under construction. For now, please see
+<a href="https://docs.google.com/document/d/1TA8Vzoa7KQ99bj1GVD81ps3Ux4wY0Ctkz7dC7bNnslU/edit">
+this page</a> for information.
+</p>
diff --git a/docs/html/preview/behavior-changes.jd b/docs/html/preview/behavior-changes.jd
new file mode 100644
index 0000000..52c1089
--- /dev/null
+++ b/docs/html/preview/behavior-changes.jd
@@ -0,0 +1,12 @@
+page.title=Behavior Changes
+page.keywords=preview,sdk,compatibility
+meta.tags="preview", "compatibility"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-changes_2x.png
+@jd:body
+
+<p>
+This page is under construction. For now,
+<a href="https://docs.google.com/document/d/1TA8Vzoa7KQ99bj1GVD81ps3Ux4wY0Ctkz7dC7bNnslU/edit">this
+doc</a> contains information on upcoming behavior changes.
+</p>
\ No newline at end of file
diff --git a/docs/html/preview/download.jd b/docs/html/preview/download.jd
new file mode 100644
index 0000000..73f3d43
--- /dev/null
+++ b/docs/html/preview/download.jd
@@ -0,0 +1,375 @@
+page.title=Image Downloads and OTA Updates
+page.image=images/cards/card-download_16-9_2x.png
+meta.tags="preview", "system image"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-downloads_2x.png
+
+@jd:body
+
+<div style="position:relative; min-height:600px">
+
+ <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
+
+ <p class="sdk-terms-intro">Before downloading and installing components of
+ the Android Preview SDK, you must agree to the following terms and
+ conditions.</p>
+
+ <h2 class="norule">Terms and Conditions</h2>
+
+ <div class="sdk-terms" onfocus="this.blur()" style="width:678px">
+This is the Android SDK Preview License Agreement (the “License Agreement”).
+
+1. Introduction
+
+1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
+
+1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+2. Accepting the License Agreement
+
+2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
+
+2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
+
+2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
+
+2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
+
+3. Preview License from Google
+
+3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
+
+3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
+
+3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
+
+4. Use of the Preview by You
+
+4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
+
+5. Your Developer Credentials
+
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+6. Privacy and Information
+
+6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
+
+7. Third Party Applications
+
+7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
+
+8. Using Google APIs
+
+8.1 Google APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+9. Terminating the License Agreement
+
+9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
+
+9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
+
+9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
+(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
+(B) Google issues a final release version of the Android SDK.
+
+9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
+
+10. DISCLAIMERS
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+11. LIMITATION OF LIABILITY
+
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+12. Indemnification
+
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
+
+13. Changes to the License Agreement
+
+13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
+
+14. General Legal Terms
+
+14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
+
+14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+ </div><!-- sdk terms -->
+
+
+
+ <div id="sdk-terms-form">
+ <p>
+ <input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
+ <label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
+ </p>
+ <p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
+ </div>
+
+
+ </div><!-- end TOS -->
+
+
+ <div id="landing">
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#sdk">Preview SDK</a></li>
+ <li><a href="#docs">Developer Documentation</a></li>
+ <li><a href="#images">Hardware System Images</a></li>
+ </ol>
+ </div>
+</div>
+
+
+<p>
+ The Android N Preview SDK includes development tools, Android system images,
+ and library files to help you test your app and the new APIs coming in the
+ next release of the platform. This document describes how to get the
+ downloadable components of the preview for testing your app.
+</p>
+
+
+<h2 id="sdk">Preview SDK</h2>
+
+<p>
+ The Preview SDK is available for download through the
+ <a href="{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>.
+ For more information on downloading and configuring the SDK, see
+ <a href="{@docRoot}preview/setup-sdk.html#downloadSdk">Set Up the SDK</a>.
+</p>
+
+
+<h2 id="docs">Developer Documentation</h2>
+
+<p>
+ This download package provides detailed API reference
+ information and an API difference report for the preview.
+</p>
+
+<table>
+ <tr>
+ <th scope="col">Description</th>
+ <th scope="col">Download / Checksums</th>
+ </tr>
+ <tr id="docs-dl">
+ <td>Android N Preview 1<br>Developer Docs</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >n-preview-1-developer-docs.zip</a><br>
+ MD5: xxxx<br>
+ SHA-1: xxxx
+ </td>
+ </tr>
+<table>
+
+
+<h2 id="images">Hardware System Images</h2>
+
+<p>
+ These system images allow you to install a preview version of the platform on
+ a physical device for testing. By configuring a device with one of these
+ images, you can install and test your app to see how it performs on the next
+ version of the platform. The process of installing a system image on a device
+ <em>removes all data from the device</em>, so you should back up your data
+ before installing a system image.
+</p>
+
+<p class="warning">
+ <b>Warning:</b> The following Android system images are previews and are
+ subject to change. Your use of these system images is governed by the Android
+ SDK Preview License Agreement. The Android preview system images are not
+ stable releases, and may contain errors and defects that can result in damage
+ to your computer systems, devices, and data. The preview Android system
+ images are not subject to the same testing as the factory OS and can cause
+ your phone and installed services and applications to stop working.
+</p>
+
+<table>
+ <tr>
+ <th scope="col">Device</th>
+ <th scope="col">Download / Checksums</th>
+ </tr>
+
+ <tr id="hammerhead">
+ <td>Nexus 5X <br>"bullhead"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >bullhead-Nxxxx-preview-xxxxxxx.tgz</a><br>
+ MD5: xxxxxxx<br>
+ SHA-1: xxxxxxx
+ </td>
+ </tr>
+
+ <tr id="shamu">
+ <td>Nexus 6P <br>"angler"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >angler-Nxxxx-preview-xxxxxxx.tgz</a><br>
+ MD5: xxxxxxx<br>
+ SHA-1: xxxxxxx
+ </td>
+ </tr>
+
+ <tr id="volantis">
+ <td>Nexus 9 <br>"volantis"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >volantis-Nxxxx-preview-xxxxxxx.tgz</a><br>
+ MD5: xxxxxxx<br>
+ SHA-1: xxxxxxx
+ </td>
+ </tr>
+
+ <tr id="fugu">
+ <td>Nexus Player <br>"fugu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >fugu-Nxxxx-preview-xxxxxxx.tgz</a><br>
+ MD5: xxxxxxx<br>
+ SHA-1: xxxxxxx
+ </td>
+ </tr>
+
+</table>
+
+<h3 id="install-image">Install an Image to a Device</h3>
+
+<p>
+ In order to use a device image for testing, you must install it on a
+ compatible device. Follow the instructions below to install a system image:
+</p>
+
+<ol>
+ <li>Download and uncompress one of the system image packages listed here.</li>
+ <li>Backup any data you want to preserve from the device.</li>
+ <li>Follow the instructions at
+ <a href="https://developers.google.com/android/nexus/images#instructions">
+ developers.google.com/android</a> to flash the image onto your device.</li>
+</ol>
+
+<h3 id="update-image">Updating a Device with the Preview</h3>
+
+<p>
+ Once you have installed a preview system image on a development device, the
+ device is upgraded automatically with the next preview release through
+ over-the-air (OTA) updates. When the update is available, the device displays
+ a notification that an update is available and allows you to install it. You
+ can also manually install the next preview image by repeating the procedure
+ in the previous section.
+</p>
+
+<h3 id="revertDevice">Revert a Device to Factory Specifications</h3>
+
+<p>
+ If you want to uninstall the preview and revert the device to factory
+ specifications, go to
+ <a href="http://developers.google.com/android/nexus/images">developers.google.com/android</a>
+ and download the image you want to flash to for your device. Follow the
+ instructions on that page to flash the image to your device.
+</p>
+
+ </div><!-- landing -->
+
+</div><!-- relative wrapper -->
+
+
+
+<script>
+ var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/preview/";
+ function onDownload(link) {
+
+ $("#downloadForRealz").html("Download " + $(link).text());
+ $("#downloadForRealz").attr('href', urlRoot + $(link).text());
+
+ $("#tos").fadeIn('fast');
+ $("#landing").fadeOut('fast');
+
+ return true;
+ }
+
+
+ function onAgreeChecked() {
+ /* verify that the TOS is agreed */
+ if ($("input#agree").is(":checked")) {
+ /* reveal the download button */
+ $("a#downloadForRealz").removeClass('disabled');
+ } else {
+ $("a#downloadForRealz").addClass('disabled');
+ }
+ }
+
+ function onDownloadForRealz(link) {
+ if ($("input#agree").is(':checked')) {
+ /*
+ $("#tos").fadeOut('fast');
+ $("#landing").fadeIn('fast');
+ */
+
+ ga('send', 'event', 'M Preview', 'System Image', $("#downloadForRealz").html());
+
+ /*
+ location.hash = "";
+ */
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ $(window).hashchange( function(){
+ if (location.hash == "") {
+ location.reload();
+ }
+ });
+
+</script>
diff --git a/docs/html/preview/features/background-optimization.jd b/docs/html/preview/features/background-optimization.jd
new file mode 100644
index 0000000..1422db5
--- /dev/null
+++ b/docs/html/preview/features/background-optimization.jd
@@ -0,0 +1,426 @@
+page.title=Background Optimizations
+page.metaDescription=New restrictions to implicit broadcasts.
+page.keywords="android N", "implicit broadcasts", "job scheduler"
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>
+ In this document
+ </h2>
+
+ <ol>
+ <li>
+ <a href="#connectivity-action">Restrictions on CONNECTIVITY_ACTION</a>
+ </li>
+
+ <li>
+ <a href="#sched-jobs">Scheduling Network Jobs on Unmetered
+ Connections</a>
+ </li>
+
+ <li>
+ <a href="#monitor-conn">Monitoring Network Connectivity While the App
+ is Running</a>
+ </li>
+
+ <li>
+ <a href="#persistant-monitor-conn">Persistent Monitoring of Network
+ Connectivity</a>
+ </li>
+
+ <li>
+ <a href="#media-broadcasts">Restrictions on NEW_PICTURE and
+ NEW_VIDEO</a>
+ </li>
+
+ <li>
+ <a href="#new-jobinfo">New JobInfo methods</a>
+ </li>
+
+ <li>
+ <a href="#new-jobparam">New JobParameter Methods</a>
+ </li>
+
+ <li>
+ <a href="#further-optimization">Further Optimizing Your App</a>
+ </li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ Background processes can be memory and battery intensive. For example,
+ Implicit broadcasts frequently start background apps that have registered to
+ listen for them. This can have a substantial impact on device performance and
+ user experience.
+</p>
+
+<p>
+ To alleviate this issue, the N Developer Preview applies the following
+ restrictions:
+</p>
+
+<ul>
+ <li>Apps targeting the N Developer Preview will not receive {@link
+ android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts if they
+ register to receive them in their manifest. Apps running in the foreground
+ can still listen for {@code CONNECTIVITY_CHANGE} on their main thread with a
+ registered {@link android.content.BroadcastReceiver}.
+ </li>
+
+ <li>Apps will not be able to to send or receive {@code NEW_PICTURE} or {@code
+ NEW_VIDEO} broadcasts.
+ </li>
+</ul>
+
+<p>
+ The Android framework provides several solutions to mitigate the need for
+ these implicit broadcasts. For example, {@link android.app.job.JobScheduler}
+ and <a href=
+ "https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
+ GcmNetworkManager</a> provide robust mechanisms to schedule network
+ operations when specified conditions, such as a connection to an unmetered
+ network, are met. You can also use {@link android.app.job.JobScheduler} to
+ react to changes to content providers. {@link android.app.job.JobInfo}
+ objects, built by the {@link android.app.job.JobInfo.Builder JobInfo.Builder}
+ class, encapsulate the parameters that {@link android.app.job.JobScheduler}
+ uses to schedule your job. When the conditions of the job are met, the system
+ executes this job on your app's {@link android.app.job.JobService}.
+</p>
+
+<p>
+ In this document, we will learn how to use alternative methods, such as
+ {@link android.app.job.JobScheduler}, to adapt your app to these new
+ restrictions.
+</p>
+
+<h2 id="connectivity-action">
+ Restrictions on CONNECTIVITY_ACTION
+</h2>
+
+<p>
+ Apps targeting the N Developer Preview do not receive {@link
+ android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts, even if they
+ register to receive them in their manifest. This could pose a problem for
+ apps that want to listen for network changes or perform bulk network
+ activities when the device connects to an unmetered network. Several
+ solutions to get around this restriction already exist in the Android
+ framework, but choosing the right one depends on what you want your app to
+ accomplish.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> A {@link android.content.BroadcastReceiver} registered with
+ {@link android.content.Context#registerReceiver Context.registerReceiver()}
+ continues to receive these broadcasts on the app’s main activity thread.
+</p>
+
+<h3 id="sched-jobs">
+ Scheduling Network Jobs on Unmetered Connections
+</h3>
+
+<p>
+ When using the {@link android.app.job.JobInfo.Builder JobInfo.Builder} class
+ to build your {@link android.app.job.JobInfo} object, apply the {@link
+ android.app.job.JobInfo.Builder#setRequiredNetworkType
+ setRequiredNetworkType()} method and pass {@link android.app.job.JobInfo
+ JobInfo.NETWORK_TYPE_UNMETERED} as a job parameter. The following code sample
+ schedules a service when the device connects to an unmetered network and is
+ charging:
+</p>
+
+<pre>
+public static final int MY_BACKGROUND_JOB = 0;
+...
+public static void scheduleJob(Context context) {
+ JobScheduler js =
+ (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ JobInfo job = new JobInfo.Builder(
+ MY_BACKGROUND_JOB,
+ new ComponentName(context, JobService.class))
+ .setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED)
+ .setRequiresCharging(true)
+ .build();
+ js.schedule(job);
+}
+</pre>
+
+<p>
+ When the conditions for your job are met, your app receives a callback to run
+ the {@link android.app.job.JobService#onStartJob onStartJob()} method in the
+ specified {@code JobService.class}. To see more examples of {@link
+ android.app.job.JobScheduler} implementation, see the <a href=
+ "{@docRoot}samples/JobScheduler/index.html">JobScheduler sample app</a>.
+</p>
+
+<p>
+Applications that use GMSCore services, and target Android 5.0 (API level 21)
+or lower, should use <a href=
+"https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
+GcmNetworkManager</a> and specify {@code Task.NETWORK_STATE_UNMETERED}.
+</p>
+
+<h3 id="monitor-conn">
+ Monitoring Network Connectivity While the App is Running
+</h3>
+
+<p>
+ Apps running in the foreground can still listen for {@code
+ CONNECTIVITY_CHANGE} with a registered {@link
+ android.content.BroadcastReceiver}. However, the {@link
+ android.net.ConnectivityManager} API provides a more robust method to request
+ a callback during specified network conditions.
+</p>
+
+<p>
+ {@link android.net.NetworkRequest} objects define the parameters of the
+ network callback in terms of {@link android.net.NetworkCapabilities}. You
+ create {@link android.net.NetworkRequest} objects with the {@link
+ android.net.NetworkRequest.Builder NetworkRequest.Builder} class. {@link
+ android.net.ConnectivityManager#registerNetworkCallback(android.net.NetworkRequest,
+ android.net.ConnectivityManager.NetworkCallback) registerNetworkCallback()}
+ then passes the {@link android.net.NetworkRequest} object to the system. When
+ the network conditions are met, the app receives a callback to execute the
+ {@link android.net.ConnectivityManager.NetworkCallback#onAvailable
+ onAvailable()} method defined in its {@link
+ android.net.ConnectivityManager.NetworkCallback} class.
+</p>
+
+<p>
+ The app continues to receive callbacks until either the app exits or it calls
+ {@link android.net.ConnectivityManager#unregisterNetworkCallback
+ unregisterNetworkCallback()}.
+</p>
+
+<h3 id="persistant-monitor-conn">
+ Persistent Monitoring of Network Connectivity
+</h3>
+
+<p>
+ The {@link android.net.ConnectivityManager} API also provides a method to
+ persistently monitor network connectivity. Due to its impact on performance,
+ however, it should be used with caution.
+</p>
+
+<p>
+ An app may use {@link
+ android.net.ConnectivityManager#registerNetworkCallback(android.net.NetworkRequest,
+ android.app.PendingIntent) registerNetworkCallback()} to register a {@link
+ android.app.PendingIntent} rather than a {@link
+ android.net.ConnectivityManager.NetworkCallback}. The request may outlive the
+ calling app and require it to start up in order to process a callback.
+</p>
+
+<p>
+ Before considering this option, think twice about whether this solution is
+ actually necessary, and consider the impact to performance and user
+ experience when doing so. Only apps that have a real need to start up on a
+ network change should implement this solution. Otherwise, every effort should
+ be taken to <a href="#connectivity-action">implement the alternatives</a>.
+</p>
+
+<h2 id="media-broadcasts">
+ Restrictions on NEW_PICTURE and NEW_VIDEO
+</h2>
+
+<p>
+ In the N Developer Preview, apps are not able to send or receive {@code
+ NEW_PICTURE} or {@code NEW_VIDEO} broadcasts. This restriction helps
+ alleviate the performance and user experience impacts when several apps must
+ wake up in order to process them. The N Developer Preview extends {@link
+ android.app.job.JobInfo} and {@link android.app.job.JobParameters} to provide
+ an alternative solution.
+</p>
+
+<h3 id="new-jobinfo">
+ New JobInfo methods
+</h3>
+
+<p>
+ To help trigger jobs on content URI changes, the N Developer Preview extends
+ the {@link android.app.job.JobInfo} API with the following methods:
+</p>
+
+<dl>
+ <dt>
+ {@code JobInfo.TriggerContentUri()}
+ </dt>
+
+ <dd>
+ Encapsulates parameters required to trigger a job on content URI changes.
+ </dd>
+
+ <dt>
+ {@code JobInfo.Builder.addTriggerContentUri()}
+ </dt>
+
+ <dd>
+ Passes a {@code TriggerContentUri} object to {@link
+ android.app.job.JobInfo}. The encapsulated content URI is monitored with a
+ {@link android.database.ContentObserver}. If there are multiple {@code
+ TriggerContentUri} objects associated with a job, the system provides a
+ callback even if it reports a change in only one of the content URIs.
+ </dd>
+
+ <dd>
+ Add the {@code TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS} flag to
+ trigger the job if any descendants of the given URI change. This flag
+ corresponds to the {@code notifyForDescendants} parameter passed to {@link
+ android.content.ContentResolver#registerContentObserver
+ registerContentObserver()}.
+ </dd>
+</dl>
+
+<p class="note">
+ <strong>Note:</strong> {@code TriggerContentUri()} cannot be used in
+ combination with {@link android.app.job.JobInfo.Builder#setPeriodic
+ setPeriodic()} or {@link android.app.job.JobInfo.Builder#setPersisted
+ setPersisted()}. To continually monitor for content changes, schedule a new
+ {@link android.app.job.JobInfo} before the app’s {@link
+ android.app.job.JobService} finishes handling the most recent callback.
+</p>
+
+<p>
+ The following sample code schedules a job to trigger when the system reports
+ a change to the content URI, {@code MEDIA_URI}:
+</p>
+
+<pre>
+public static final int MY_BACKGROUND_JOB = 0;
+...
+public static void scheduleJob(Context context) {
+ JobScheduler js =
+ (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ JobInfo.Builder builder = new JobInfo.Builder(
+ MY_BACKGROUND_JOB,
+ new ComponentName(context, MediaContentJob.class));
+ builder.addTriggerContentUri(
+ new JobInfo.TriggerContentUri(MEDIA_URI,
+ JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS));
+ js.schedule(builder.build());
+}
+</pre>
+<p>
+ When the system reports a change in the specified content URI(s), your app
+ receives a callback and a {@link android.app.job.JobParameters} object is
+ passed to the {@link android.app.job.JobService#onStartJob onStartJob()}
+ method in {@code MediaContentJob.class}.
+</p>
+
+<h3 id="new-jobparam">
+ New JobParameter Methods
+</h3>
+
+<p>
+ The N Developer Preview also extends {@link android.app.job.JobParameters} to
+ allow your app to receive useful information about what content authorities
+ and URIs triggered the job:
+</p>
+
+<dl>
+ <dt>
+ {@code Uri[] getTriggeredContentUris()}
+ </dt>
+
+ <dd>
+ Returns an array of URIs that have triggered the job. This will be {@code
+ null} if either no URIs have triggered the job (for example, the job was
+ triggered due to a deadline or some other reason), or the number of changed
+ URIs is greater than 50.
+ </dd>
+
+ <dt>
+ {@code String[] getTriggeredContentAuthorities()}
+ </dt>
+
+ <dd>
+ Returns a string array of content authorities that have triggered the job.
+ If the returned array is not {@code null}, use {@code getTriggeredContentUris()}
+ to retrieve the details of which URIs have changed.
+ </dd>
+</dl>
+
+<p>
+ The following sample code overrides the {@link
+ android.app.job.JobService#onStartJob JobService.onStartJob()} method and
+ records the content authorities and URIs that have triggered the job:
+</p>
+
+<pre>
+@Override
+public boolean onStartJob(JobParameters params) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Media content has changed:\n");
+ if (params.getTriggeredContentAuthorities() != null) {
+ sb.append("Authorities: ");
+ boolean first = true;
+ for (String auth :
+ params.getTriggeredContentAuthorities()) {
+ if (first) {
+ first = false;
+ } else {
+ sb.append(", ");
+ }
+ sb.append(auth);
+ }
+ if (params.getTriggeredContentUris() != null) {
+ for (Uri uri : params.getTriggeredContentUris()) {
+ sb.append("\n");
+ sb.append(uri);
+ }
+ }
+ } else {
+ sb.append("(No content)");
+ }
+ Log.i(TAG, sb.toString());
+ return true;
+}
+</pre>
+
+<h2 id="further-optimization">
+ Further Optimizing Your App
+</h2>
+
+<p>
+ Optimizing your apps to run on low-memory devices, or in low-memory
+ conditions, can improve performance and user experience. Eliminating the use
+ of implicit broadcasts and background services is a great way to make sure
+ your app runs well on such devices. Although the N Developer Preview takes
+ steps to limit the use of certain implicit broadcasts, consider optimizing
+ your app to run without the use of implicit broadcasts and background
+ services, entirely.</p>
+
+<p>
+ To help you test how your app behaves without those background processes, The
+ N Developer Preview introduces some additional <a href=
+ "{@docRoot}tools/help/adb.html">Android Debug Bridge (ADB)</a> commands:
+</p>
+
+<ul>
+ <li>To simulate conditions where implicit broadcasts and background services
+ are unavailable, enter the following command:
+ </li>
+
+ <li style="list-style: none; display: inline">
+<pre class="no-pretty-print">
+{@code $ adb shell cmd appops set RUN_IN_BACKGROUND ignore}
+</pre>
+ </li>
+
+ <li>To re-enable implicit broadcasts and background services, enter the
+ following command:
+ </li>
+
+ <li style="list-style: none; display: inline">
+<pre class="no-pretty-print">
+{@code $ adb shell cmd appops set RUN_IN_BACKGROUND allow}
+</pre>
+ </li>
+</ul>
+
+<p>
+ The Android framework is constantly evolving to help apps run great on a wide
+ variety of devices. To learn more and join the discussion, <a href=
+ "{@docRoot}">read this blog post!</a>
+</p>
diff --git a/docs/html/preview/features/data-saver.jd b/docs/html/preview/features/data-saver.jd
new file mode 100644
index 0000000..17e78eb
--- /dev/null
+++ b/docs/html/preview/features/data-saver.jd
@@ -0,0 +1,146 @@
+page.title=Data Saver
+metaDescription=User-enabled data usage optimization.
+page.keywords="android N", "data usage", "metered network"
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>
+ In this document
+ </h2>
+
+ <ol>
+ <li>
+ <a href="#status">Checking User Data Saver Preferences</a>
+ </li>
+
+ <li>
+ <a href="#monitor-changes">Monitoring Changes to Data Saver
+ Preferences</a>
+ </li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ Over the life of a smartphone, the cost of a cellular data plan can easily
+ exceed the cost of the device itself. In the N Developer Preview, users can
+ enable Data Saver in order to use less data, whether roaming, near the end of
+ the billing cycle, or on a small prepaid data pack.
+</p>
+
+<p>
+ When a user enables Data Saver in <strong>Settings</strong> and the device is
+ on a metered network, the system blocks background data usage and signals
+ apps to use less data in the foreground wherever possible. Users can
+ whitelist specific apps to allow background metered data usage even when Data
+ Saver is turned on.
+</p>
+
+<p>
+ The N Developer Preview extends the {@link android.net.ConnectivityManager}
+ API to provide apps a way to <a href="#status">retrieve the user’s Data Saver
+ preferences</a> and <a href="#monitor-changes">monitor preference
+ changes</a>. It is considered good practice for apps to check whether the
+ user has enabled Data Saver and make an effort to limit foreground and
+ background data usage.
+</p>
+
+<h1 id="status">
+ Checking the User's Data Saver Preferences
+</h1>
+
+<p>
+ In the N Developer Preview, apps can use the {@link
+ android.net.ConnectivityManager} API to determine what data usage
+ restrictions are being applied. The {@code getRestrictBackgroundStatus()}
+ method returns one of the following values:
+</p>
+
+<dl>
+ <dt>
+ {@code RESTRICT_BACKGROUND_STATUS_DISABLED}
+ </dt>
+
+ <dd>
+ Data Saver is disabled.
+ </dd>
+
+ <dt>
+ {@code RESTRICT_BACKGROUND_STATUS_ENABLED}
+ </dt>
+
+ <dd>
+ The user has enabled Data Saver for this app. Apps should make an effort to limit data
+ usage in the foreground and gracefully handle restrictions to background
+ data usage.
+ </dd>
+
+ <dt>
+ {@code RESTRICT_BACKGROUND_STATUS_WHITELISTED}
+ </dt>
+
+ <dd>
+ The user has enabled Data Saver but the app is whitelisted. Apps should
+ still make an effort to limit foreground and background data usage.
+ </dd>
+</dl>
+
+<p>
+ It is considered good practice to limit data usage whenever the device is
+ connected to a metered network, even if Data Saver is disabled or the app
+ is whitelisted. The following sample code uses {@link
+ android.net.ConnectivityManager#isActiveNetworkMetered
+ ConnectivityManager.isActiveNetworkMetered()} and {@code
+ ConnectivityManager.getRestrictBackgroundStatus()} to determine how much data
+ the app should use:
+</p>
+
+<pre>
+ConnectivityManager connMgr = (ConnectivityManager)
+ getSystemService(Context.CONNECTIVITY_SERVICE);
+// Checks if the device is on a metered network
+if (connMgr.isActiveNetworkMetered()) {
+ // Checks user’s Data Saver settings.
+ switch (connMgr.getRestrictBackgroundStatus) {
+ case RESTRICT_BACKGROUND_STATUS_ENABLED:
+ // Background data usage is blocked for this app. Wherever possible,
+ // the app should also use less data in the foreground.
+
+ case RESTRICT_BACKGROUND_STATUS_WHITELISTED:
+ // The app is whitelisted. Wherever possible,
+ // the app should use less data in the foreground and background.
+
+ case RESTRICT_BACKGROUND_STATUS_DISABLED:
+ // Data Saver is disabled. Since the device is connected to a
+ // metered network, the app should use less data wherever possible.
+ }
+} else {
+ // The device is not on a metered network.
+ // Use data as required to perform syncs, downloads, and updates.
+}
+</pre>
+
+<h1 id="monitor-changes">
+ Monitoring Changes to Data Saver Preferences
+</h1>
+
+<p>
+ Apps can monitor changes to Data Saver preferences by creating a {@link
+ android.content.BroadcastReceiver} to listen for {@code
+ ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED} ({@code
+ "android.net.conn.RESTRICT_BACKGROUND_CHANGED"}) and dynamically registering
+ the receiver with {@link android.content.Context#registerReceiver
+ Context.registerReceiver()}. When an app receives this broadcast, it should
+ <a href="#status">check if the new Data Saver preferences affect its
+ permissions</a> by calling {@code
+ ConnectivityManager.getRestrictBackgroundStatus()}.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> The system only sends this broadcast to apps that
+ dynamically register for them with {@link
+ android.content.Context#registerReceiver Context.registerReceiver()}. Apps
+ that register to receive this broadcast in their manifest will not receive
+ them.
+</p>
diff --git a/docs/html/preview/features/direct-boot.jd b/docs/html/preview/features/direct-boot.jd
new file mode 100644
index 0000000..8d4b561
--- /dev/null
+++ b/docs/html/preview/features/direct-boot.jd
@@ -0,0 +1,176 @@
+page.title=Direct Boot
+page.keywords=preview,sdk,direct boot
+page.tags=androidn
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#run">Requesting Access to Run During Direct Boot</a></li>
+ <li><a href="#access">Accessing Device Encrypted Storage</a></li>
+ <li><a href="#notification">Getting Notified of User Unlock</a></li>
+ <li><a href="#migrating">Migrating Existing Data</a></li>
+ <li><a href="#testing">Testing Your Encryption Aware App</a></li>
+ </ol>
+</div>
+</div>
+
+<p>The system now runs in a secure, Direct Boot mode when the device has been
+powered on but the user has not unlocked the device. To support this, the
+system provides two storage locations for data:</p>
+
+<ul>
+<li><i>Credential encrypted storage</i>, which is the default storage location
+and available only after the user has unlocked the device.</li>
+<li><i>Device encrypted storage</i>, which is a storage location available both
+during Direct Boot mode and after the user has unlocked the device.</li>
+</ul>
+
+<p>By default apps will not run during Direct Boot mode, because apps won't
+have access to credential encrypted storage.</p>
+
+<p>If your app needs to take action during Direct Boot mode, you can register
+app components that should be run during this mode. Some common use cases
+for applications needing to run during Direct Boot mode include:</p>
+<ul>
+<li>Applications that have scheduled notifications, such as alarm clock
+apps.</li>
+<li>Applications that provide important user notifications, like SMS apps.</li>
+<li>Applications providing accessibility services, like Talkback.</li>
+</ul>
+
+<p>If your app needs to access data while running in Direct Boot mode, use
+device encrypted storage. Device encrypted storage contains data
+encrypted with a key that is only available after a device has performed a
+successful verified boot.</p>
+
+<p>For data that should be encrypted with a key associated with user
+credentials, such as a PIN or password, use credential encrypted storage.
+Credential encrypted storage is only available after the user has successfully
+unlocked the device, up until when the user restarts the device again. If the
+user enables the lock screen after unlocking the device, this will not lock
+credential encrypted storage.</p>
+
+<h2 id="run">Requesting Access to Run During Direct Boot</h2>
+
+<p>Applications must register their components with the system before they
+can run during the limited Direct Boot mode, or access device encrypted
+storage. Applications register with the system by marking components as
+<i>encryption aware</i>. To mark your component as encryption aware, set the
+<code>android:encryptionAware</code> attribute to true in your manifest.<p>
+
+<p>When a component is marked as encryption aware, the component receives a
+new <code>LOCKED_BOOT_COMPLETED</code> broadcast message from the
+system when the device has been restarted. At this point device encrypted
+storage is available, and your component can run whatever tasks need to be
+done during Direct Boot mode, such as triggering a scheduled alarm.</p>
+
+<p>The following code snippet is an example of how to register a
+<code>BroadcastReceiver</code> as encryption aware, and add an intent filter
+for <code>LOCKED_BOOT_COMPLETED</code>, in the application manifest:</p>
+
+<pre>
+<receiever
+ android:encryptionAware="true" >
+ ...
+ <intent-filter>
+ <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
+ </intent-filter>
+</receiver>
+</pre>
+
+<p>Once the user has unlocked the device, components can access both the
+device encrypted storage as well as credential encrypted storage.</p>
+
+<h2 id="access">Accessing Device Encrypted Storage</h2>
+
+<p>To access device encrypted storage, create a second <code>Context</code>
+instance by calling <code>Context.createDeviceEncryptedStorageContext()</code>.
+All storage API calls made using this context access the device encrypted
+storage. The following example accesses the device encrypted storage and opens
+an existing app data file:</p>
+
+<pre>
+Context directBootContext = Context.createDeviceEncryptedStorageContext();
+// Access appDataFilename that lives in device encrypted storage
+FileInputStream inStream = directBootContext.openFileInput(appDataFilename);
+// Use inStream to read content...
+</pre>
+
+<p class="note"><strong>Note:</strong> Use device encrypted storage only for
+information that must be accessible during the Direct Boot mode.
+Don't use device encrypted storage as a general-purpose encrypted store.
+For private user information, or encrypted data that isn't needed during
+Direct Boot mode, use credential encrypted storage.</p>
+
+<h2 id="notification">Getting Notified of User Unlock</h2>
+
+<p>Once the user unlocks the device after restart, your app can switch to
+accessing credential encrypted storage and use regular system services that
+depend on user credentials, like Google Play Services.</p>
+
+<p>To get notified when the user unlocks the device after a reboot,
+register a <code>BroadcastReceiver</code> from a running component to listen
+for the <code>ACTION_USER_UNLOCKED</code> message. Or, you can receive the
+existing <code>BOOT_COMPLETED</code> message, which now indicates the
+device has booted and the user has unlocked the device.</p>
+
+<p>You can directly query if the user has unlocked the device by calling
+<code>UserManager.isUserUnlocked()</code>.</p>
+
+<h2 id="migrating">Migrating Existing Data</h2>
+
+<p>If a user updates their device to use Direct Boot mode, you might have
+existing data that needs to get migrated to device encrypted storage. Use
+<code>Context.migrateSharedPreferencesFrom()</code> and
+<code>Context.migrateDatabaseFrom()</code> to migrate preference and database
+data between credential encrypted storage and device encrypted storage.</p>
+
+<p>Use your best judgment when deciding what data to migrate from credential
+encrypted storage to device encrypted storage. You should not be migrating
+private user information, such as passwords or authorization tokens, to
+device encrypted storage. In some scenarios, you might need to manage
+separate sets of data in the two encrypted stores.</p>
+
+<h2 id="testing">Testing Your Encryption Aware App</h2>
+
+<p>Test your encryption aware application using the new Direct Boot mode.
+On supported devices with Android N Developer Preview installed, enable Direct
+Boot by doing one of the following:</p>
+
+<ul>
+<li>On the device, enable <b>Developer options</b> if you haven't already by
+going to <b>Settings > About phone</b>, and tap <b>Build number</b> seven
+times. Once developer options is available, go to <b>Settings >
+Developer options</b> and select <b>Convert to file encryption</b>.
+Note that enabling Direct Boot will wipe user data.</li>
+<li>Use the following adb shell commands to wipe user data and enable Direct
+Boot mode:
+<pre class="no-pretty-print">
+$ adb reboot-bootloader
+$ fastboot --wipe-and-use-fbe
+</pre>
+</li>
+</ul>
+
+<p>An emulated Direct Boot mode is also available, in case you need to switch
+modes on your test devices. Emulated mode should only be used during
+development and may cause data loss. To enable emulated Direct Boot mode,
+set a lock pattern on the device, choose "No thanks" if prompted for a
+secure start-up screen when setting a lock pattern, and then use the
+following adb shell command:</p>
+
+<pre class="no-pretty-print">
+$ adb shell sm set-emulate-fbe true
+</pre>
+
+<p>To turn off emulated Direct Boot mode, use the following command:</p>
+
+<pre class="no-pretty-print">
+$ adb shell sm set-emulate-fbe false
+</pre>
+
+<p>Note that using these commands will automatically cause the device to
+reboot.</p>
diff --git a/docs/html/preview/features/icu4j-framework.jd b/docs/html/preview/features/icu4j-framework.jd
new file mode 100644
index 0000000..d586c1c
--- /dev/null
+++ b/docs/html/preview/features/icu4j-framework.jd
@@ -0,0 +1,175 @@
+page.title=ICU4J Support in Framework
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>In this document:</h2>
+<ol>
+<li><a href="#compatibility">Compatibility Across Android Releases</a></li>
+ <li><a href="#relation">Relationship to ICU4J</a></li>
+ <li><a href="#migration">Migrating to android.icu APIs from ICU4J </a></li>
+ <li><a href="#licence">Licensing</a></li>
+</ol>
+
+<h2>See Also</h2>
+<ol>
+ <li>
+ <a class="external-link" href=
+ "http://userguide.icu-project.org">Documentation for ICU4J</a>
+ </li>
+
+ <li>
+ <a class="external-link" href=
+ "http://site.icu-project.org/#TOC-What-is-ICU-">Latest standards supported
+ by ICU4J</a>
+ </li>
+</ol>
+</div>
+</div>
+
+<p>
+ ICU4J is an open-source, widely used set of Java libraries providing Unicode
+ and globalization support for software applications. The N Developer Preview
+ exposes a subset of ICU4J APIs in the Android Framework for app developers to
+ use under the {@code android.icu} package. The ICU4J Android Framework uses
+ localization data present on the device and can result in a substantial APK
+ size reduction over apps that include their own copy of ICU4J.
+</p>
+
+<p>
+ This document begins by providing some basic information on the minimum
+ Android API levels required to support these libraries. It then explains what
+ you need to know about the Android-specific implementation of ICU4J. Finally,
+ it tells you how to incorporate android.icu APIs into your app.
+</p>
+
+<h2 id="compatibility">Compatibility Across Android Releases</h2>
+
+<p>
+ The ICU4J Android Framework APIs are provided with the N Developer Preview.
+ If you need to support Android versions prior to the N Developer Preview you
+ should use the techniques described in <a href=
+ "{@docRoot}guide/practices/compatibility.html#Versions">Device
+ Compatibility</a>.
+</p>
+
+<h2 id="relation">Relationship to ICU4J</h2>
+
+<p>
+ The N Developer Preview provides a subset of the full ICU4J APIs under the
+ <code>android.icu</code> package. For example, the N Preview does not expose
+ some deprecated APIs or those that the ICU team have not yet declared as
+ stable. As the ICU team deprecates APIs in future, Android will also mark
+ them as deprecated but will continue to include them.
+</p>
+
+<p class="table-caption"><strong>Table 1.</strong> ICU and CLDR versions used in the N Developer Preview.
+<table>
+<tr>
+<th>Android API level</th>
+<th>ICU version</th>
+<th>CLDR version</th>
+</tr>
+<tr>
+<td>N Developer Preview</td>
+<td>56</td>
+<td>28</td>
+</tr>
+</table>
+
+<p class="note">
+ <b>Note</b>: When using the ICU4J Android Framework APIs you may notice
+ differences between Android releases. For example, the exact text returned
+ from formatters may vary between API levels as they do for existing
+ <code>java.util</code> and <code>java.text</code> classes on Android. These
+ differences are the result of improvements to translations between Android
+ versions.
+</p>
+
+<p>Here are a few important things to note:</p>
+
+<ul>
+<li>The ICU4J Android Framework APIs do not include all the ICU4J APIs.</li>
+<li>Android does not expose the ICU4C APIs for developers using the NDK.</li>
+<li>The ICU4J Android Framework APIs do not replace Android’s support for
+<a href="{@docRoot}guide/topics/resources/localization.html">Localizing with
+Resources</a>.</li>
+</ul>
+
+<h2 id="migration">Migrating to android.icu APIs from ICU4J</h2>
+
+<p>
+ If you are already using ICU4J APIs in your app, and the
+ <code>android.icu</code> APIs meet your requirements, then migrating to
+ <code>android.icu</code> framework requires you to change your Java imports
+ from <code>com.ibm.icu</code> to <code>android.icu.</code> You may then
+ remove your own copy of ICU4J files from the APK.
+</p>
+
+<p class="note">
+ <b>Note</b>: The ICU4J Android Framework exposes the classes in the
+ <code>android.icu</code>
+ package instead of <code>com.ibm.icu</code>. This is to avoid conflicts with
+ a copy of ICU4J that may be included in your app’s .apk file.
+</p>
+
+<h3 id="migrate-from-android">
+ Migrating to android.icu APIs from other Android SDK APIs
+</h3>
+
+<p>
+ Some classes in the <code>java</code> and<code>android</code> packages have
+ equivalents to those found in ICU4J. The ICU4J version often provides more
+ complete support for standards or a wider range of languages.
+</p>
+<p>Here are some examples to get you started:</p>
+<table>
+<tr>
+<th>Class</th>
+<th>Alternatives</th>
+</tr>
+<tr>
+<td><code>java.lang.Character</code> </td>
+<td><code>android.icu.lang.UCharacter</code> </td>
+</tr>
+<tr>
+<td><code>java.text.BreakIterator</code> </td>
+<td><code>android.icu.text.BreakIterator</code> </td>
+</tr>
+<tr>
+<td><code>java.text.DecimalFormat</code> </td>
+<td><code>android.icu.text.DecimalFormat</code> </td>
+</tr>
+<tr>
+<td><code>java.util.Calendar</code></td>
+<td>
+<code>android.icu.util.Calendar</code></td>
+</tr>
+<tr>
+<td><code>android.text.BidiFormatter</code>
+ </td>
+<td><code>android.icu.text.Bidi</code>
+ </td>
+</tr>
+<tr>
+<td><code>android.text.format.DateFormat</code>
+ </td>
+<td><code>android.icu.text.DateFormat</code>
+ </td>
+</tr>
+<tr>
+<td><code>android.text.format.DateUtils</code> </td>
+<td><code>android.icu.text.DateFormat</code>
+<code>android.icu.text.RelativeDateTimeFormatter</code>
+</td>
+</tr>
+</table>
+
+<h2 id="licence">Licensing</h2>
+
+<p>
+ ICU4J is released under a nonrestrictive <a class="external-link" href=
+ "http://source.icu-project.org/repos/icu/icu/trunk/license.html">open source
+ license</a>.
+</p>
diff --git a/docs/html/preview/features/multi-window.jd b/docs/html/preview/features/multi-window.jd
new file mode 100644
index 0000000..e2c1f47
--- /dev/null
+++ b/docs/html/preview/features/multi-window.jd
@@ -0,0 +1,505 @@
+page.title=Multi-Window Support
+page.metaDescription=New support in the N Developer Preview for showing more than one app at a time.
+page.keywords="multi-window", "android N", "split screen", "free-form"
+
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#overview">Overview</a></li>
+ <li><a href="#lifecycle">Multi-Window Lifecycle</a></li>
+ <li><a href="#configuring">Configuring Your App for Multi-Window
+ Mode</a></li>
+ <li><a href="#running">Running Your App in Multi-Window Mode</a></li>
+ <li><a href="#testing">Testing Your App's Multi-Window Support</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ The N Developer Preview adds support for displaying more than one app at the
+ same time. On handheld devices, two apps can run side-by-side or
+ one-above-the-other in <em>split-screen</em> mode. On TV devices, apps can
+ use <em>picture-in-picture</em> mode to continue video playback while users
+ are interacting with another app.
+</p>
+
+<p>
+ If you build your app with the N Preview SDK, you can configure how your app
+ handles multi-window display. For example, you can specify your activity's
+ minimum allowable dimensions, preventing users from making the activity
+ window smaller than that size. You can also disable multi-window display for
+ your app, ensuring that the system only shows your app in full-screen
+ mode.
+</p>
+
+<h2 id="overview">Overview</h2>
+
+<p>
+ The N Developer Preview allows several apps to share the screen at once. For
+ example, a user could split the screen, viewing a web page on the left side
+ while composing an email on the right side. The user experience depends on
+ the device:
+</p>
+
+<ul>
+ <li>Handheld devices running the N Developer Preview offer split-screen
+ mode. In this mode, the system fills the screen with two apps, showing them
+ either side-by-side or one-above-the-other. The user can drag the dividing
+ line separating the two to make one app larger and the other smaller.
+ </li>
+
+ <li>On Nexus Player running the N Developer Preview, apps can put themselves
+ in picture-in-picture mode, allowing them to continue showing content
+ while the user browses or interacts with other apps. For more information,
+ see <a href="picture-in-picture.html">Picture-in-picture</a>.
+ </li>
+
+ <li>Manufacturers of larger devices can choose to enable freeform
+ mode, in which the user can freely resize each activity. If the
+ manufacturer enables this feature, the device offers freeform mode in addition
+ to split-screen mode.
+ </li>
+</ul>
+
+<img src="{@docRoot}preview/images/mw-splitscreen.png" alt="" width="641"
+ id="img-split-screen" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Two apps running side-by-side in split-screen mode.
+</p>
+
+<p>
+ The user can switch into multi-window mode in the following ways:
+</p>
+
+<ul>
+ <li>If the user opens the <a href="{@docRoot}guide/components/recents.html">Overview
+ screen</a> and performs a long press on an
+ activity title, they can drag that activity to a highlighted portion of the
+ screen to put the activity in multi-window mode.
+ </li>
+
+ <li>If the user performs a long press on the Overview button, the device puts
+ the current activity in multi-window mode, and opens the Overview screen to
+ let the user choose another activity to share the screen.
+ <!-- ***TODO: screenshot*** -->
+ </li>
+</ul>
+
+<h2 id="lifecycle">Multi-Window Lifecycle</h2>
+
+<p>
+ Multi-window mode does not change the <a href=
+ "{@docRoot}training/basics/activity-lifecycle/index.html">activity
+ lifecycle</a>.
+</p>
+
+<p>
+ In multi-window mode, only the activity the user has most recently interacted
+ with is active at a given time. This activity is considered <em>topmost</em>.
+ All other activities are in the paused state, even if they are visible.
+ However, the system gives these paused-but-visible activities higher priority
+ than activities that are not visible. If the user interacts with one of the
+ paused activities, that activity is resumed, and the previously topmost
+ activity is paused.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> In multi-window mode, an app can be in the paused
+ state and still be visible to the user. An app might need to continue its
+ activities even while paused. For example, a video-playing app that is in
+ paused mode but is visible should continue showing its video.
+</p>
+
+<p>
+ 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
+ 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=
+ "{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
+ Changes</a>, your activity can handle the configuration change itself, or it
+ can allow the system to destroy the activity and recreate it with the new
+ dimensions.
+</p>
+
+<p>
+ If the user is resizes a window and makes it larger in either dimension,
+ the system fills in the expanded
+ area with the color specified by the {@link android.R.attr#windowBackground
+ windowBackground} attribute, or by the default
+ <code>windowBackgroundFallback</code> style attribute. When the user finishes
+ resizing the window, the activity is redrawn with its new dimensions, as
+ described in <a href=
+ "{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
+ Changes</a>.
+</p>
+
+<h2 id="configuring">Configuring Your App for Multi-Window Mode</h2>
+
+<p>
+ If your app targets the N Developer Preview, you can configure how and
+ whether your app's activities support multi-window display. You can set
+ attributes in your manifest to control both size and layout.
+ A root activity's attribute settings apply to all activities
+ within its task stack.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> If you build a multi-orientation app with a version of the
+ SDK earlier than the N Developer Preview, and the user uses the app in
+ multi-window mode, the system forcibly resizes the app. The system presents a
+ dialog box warning the user that the app may behave unexpectedly. The system
+ does <em>not</em> resize fixed-orientation apps; if
+ the user attempts to open a fixed-orientation app under multi-window mode,
+ the app takes over the whole screen.
+</p>
+
+<h4 id="resizeableActivity">android:resizeableActivity</h4>
+<p>
+ Set this attribute in your manifest's <code><activity></code> or
+ <code><application></code> node to enable or disable multi-window
+ display:
+</p>
+
+<pre>
+android:resizableActivity=["true" | "false"]
+</pre>
+
+<p>
+ If this attribute is set to true, the activity can be launched in
+ split-screen and freeform modes. If the attribute is set to false, the
+ activity does not support multi-window mode. If this value is false, and the
+ user attempts to launch the activity in multi-window mode, the activity takes
+ over the full screen.
+</p>
+
+<p>
+ If your app targets the N Developer Preview, but you do not specify a value
+ for this attribute, the attribute's value defaults to true.
+</p>
+
+<h4 id="supportsPictureInPicture">android:supportsPictureInPicture</h4>
+
+<p>
+ Set this attribute in your manifest's <code><activity></code> node to
+ indicate whether the activity supports picture-in-picture display.
+</p>
+
+<pre>
+android:supportsPictureInPicture=["true" | "false"]
+</pre>
+
+<h3 id="layout">Layout attributes</h3>
+
+<p>
+ With the N Developer Preview, the <code><layout></code> manifest element
+ supports several attributes that affect how an activity behaves in
+ multi-window mode:
+</p>
+
+<dl>
+ <dt>
+ <code>android:defaultWidth</code>
+ </dt>
+
+ <dd>
+ Default width of the activity when launched in freeform mode.
+ </dd>
+
+ <dt>
+ <code>android:defaultHeight</code>
+ </dt>
+
+ <dd>
+ Default height of the activity when launched in freeform mode.
+ </dd>
+
+ <dt>
+ <code>android:gravity</code>
+ </dt>
+
+ <dd>
+ Initial placement of the activity when launched in freeform mode. See the
+ {@link android.view.Gravity} reference for suitable values.
+ </dd>
+
+ <dt>
+ <code>android:minimalSize</code>
+ </dt>
+
+ <dd>
+ Minimum height and minimum width for the activity in both split-screen
+ and freeform modes. The system does not permit the user to resize the
+ activity below the specified size in either dimension.
+ </dd>
+</dl>
+
+<p>
+ For example, the following code shows how to specify an activity's default
+ size and location, and its minimum size, when the activity is displayed in
+ freeform mode:
+</p>
+
+<pre>
+<activity android:name=".MyActivity">
+ <layout android:defaultHeight="500dp"
+ android:defaultWidth="600dp"
+ android:gravity="top|end"
+ android:minimalSize="450dp" />
+</activity>
+</pre>
+
+<h2 id="running">Running Your App in Multi-Window Mode</h2>
+
+<p>
+ The N Developer Preview offers new functionality to support apps that can run
+ in multi-window mode.
+</p>
+
+<h3 id="disabled-features">Disabled features in multi-window mode</h3>
+
+<p>
+ Certain features are disabled or ignored when a device is in multi-window
+ mode, because they don’t make sense for an activity which may be sharing the
+ device screen with other activities or apps. Such features include:
+
+<ul>
+ <li>Some <a href="{@docRoot}training/system-ui/index.html">System UI</a>
+ customization options are disabled; for example, apps cannot hide the status
+ bar if they are not running in full-screen mode.
+ </li>
+
+ <li>The system ignores changes to the <code><a href=
+ "{@docRoot}guide/topics/manifest/activity-element.html#screen"
+ >android:screenOrientation</a></code> attribute.
+ </li>
+</ul>
+
+<h3 id="change-notification">Multi-window change notification and querying</h3>
+
+<p>
+ The following new methods have been added to the {@link android.app.Activity}
+ class to support multi-window display. For details on each method, see the
+ <!--TODO: Add link to preview download page-->
+ N Preview SDK Reference.
+</p>
+
+<dl>
+ <dt>
+ <code>Activity.inMultiWindow()</code>
+ </dt>
+
+ <dd>
+ Call to find out if the activity is in multi-window mode.
+ </dd>
+
+ <dt>
+ <code>Activity.inPictureInPicture()</code>
+ </dt>
+
+ <dd>
+ Call to find out if the activity is in picture-in-picture mode.
+
+ <p class="note">
+ <strong>Note:</strong> Picture-in-Picture mode is a special case of
+ multi-window mode. If <code>myActivity.inPictureInPicture()</code>
+ returns true, then <code>myActivity.inMultiWindow()</code> also returns
+ true.
+ </p>
+ </dd>
+
+ <dt>
+ <code>Activity.onMultiWindowChanged()</code>
+ </dt>
+
+ <dd>
+ The system calls this method whenever the activity goes into or out of
+ multi-window mode. The system passes the method a value of true if the
+ activity is entering multi-window mode, and false if the activity is
+ leaving multi-window mode.
+ </dd>
+
+ <dt>
+ <code>Activity.onPictureInPictureChanged()</code>
+ </dt>
+
+ <dd>
+ The system calls this method whenever the activity goes into or out of
+ picture-in-picture mode. The system passes the method a value of true if
+ the activity is entering picture-in-picture mode, and false if the activity
+ is leaving picture-in-picture mode.
+ </dd>
+</dl>
+
+<p>
+ There are also {@link android.app.Fragment} versions of each of these
+ methods, for example <code>Fragment.inMultiWindow()</code>.
+</p>
+
+<h3 id="entering-pip">Entering Picture-in-Picture Mode</h3>
+
+<p>
+ To put an activity in picture-in-picture mode, call the new method
+ <code>Activity.enterPictureInPicture()</code>. This method has no effect if
+ the device does not support picture-in-picture mode. For more information,
+ see <!-- TODO: Link to new N-Preview PIP doc-->
+ Picture-in-Picture Mode.
+</p>
+
+<h3 id="launch">Launch New Activities in Multi-Window Mode</h3>
+
+<p>
+ When you launch a new activity, you can hint to the system that the new
+ activity should be displayed adjacent to the current one, if possible. To do
+ this, use the flag
+ <code>Intent.FLAG_ACTIVITY_LAUNCH_TO_ADJACENT</code>. Passing
+ this flag requests the following behavior:
+</p>
+
+<ul>
+ <li>If the device is in split-screen mode, the system attempts to create the
+ new activity next to the activity that launched it, so the two activities
+ share the screen. The system is not guaranteed to be able to do this, but it
+ makes the activities adjacent if possible.
+ </li>
+
+ <li>If the device is not in split-screen mode, this flag has no effect.
+ </li>
+</ul>
+
+<p>
+ If a device is in freeform mode and you are launching a new activity, you can
+ specify the new activity's dimensions and screen location by calling
+ <code>ActivityOptions.setLaunchBounds()</code>. This method has no effect if
+ the device is not in multi-window mode.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> If you launch an activity within a task stack, the
+ activity replaces the activity on the screen, inheriting all of its
+ multi-window properties. If you want to launch the new activity as a separate
+ window in multi-window mode, you must launch it in a new task stack.
+</p>
+
+<h2 id="testing">Testing Your App's Multi-Window Support</h2>
+
+<p>
+ Whether or not you update your app for the N Developer Preview, you should
+ verify how it behaves in multi-window mode in case a user tries to launch it
+ in multiwindow mode on a device running the N Developer Preview.
+</p>
+
+<h3 id="configuring">Configuring a Test Device</h3>
+
+<p>
+ If you install the N Developer Preview on a device, split-screen mode is
+ automatically supported.
+</p>
+
+<h3 id="test-non-n">If your app was not built with the N Preview SDK</h3>
+
+<p>
+ If you did not build your app with the N Preview SDK and the user attempts to use
+ the app in multi-window mode, the system forcibly resizes the app unless the app
+ declares a fixed orientation.
+</p>
+
+<p>
+ If your app does not declare a fixed orientation, you should launch your app
+ on a device running the N Developer Preview and attempt to put the app in
+ split-screen mode. Verify that the user experience is
+ acceptable when the app is forcibly resized.
+</p>
+
+<p>
+ If the app declares a fixed orientation, you should attempt to put the app in
+ multi-window mode. Verify that when you do so, the app remains
+ in full-screen mode.
+</p>
+
+<h3 id="test-mw">If you support multi-window mode</h3>
+
+<p>
+ If you built your app with the N Preview SDK and have not disabled
+ multi-window support, verify the following behavior under both split-screen
+ and freeform modes.
+</p>
+
+<ul>
+ <li>Launch the app in full-screen mode, then switch to multi-window mode by
+ long-pressing the Overview button. Verify that the app switches properly.
+ </li>
+
+ <li>Launch the app directly in multi-window mode, and verify that the app
+ launches properly. You can launch an app in multi-window mode by pressing the
+ Overview button, then long-pressing the title bar of your app and dragging it
+ to one of the highlighted areas on the screen.
+ </li>
+
+ <li>Resize your app in split-screen mode by dragging the divider line.
+ Verify that the app resizes without crashing, and that necessary UI elements
+ are visible.
+ </li>
+
+ <li>If you have specified minimum dimensions for your app, attempt to resize
+ the app below those dimensions. Verify that you cannot resize the app to be
+ smaller than the specified minimum.
+ </li>
+
+ <li>Through all tests, verify that your app's performance is acceptable. For
+ example, verify that there is not too long a lag to update the UI after the
+ app is resized.
+ </li>
+</ul>
+
+<h4 id="test-checklist">Testing checklist</h4>
+
+<p>
+ To verify your app's performance in multi-window mode, try the following
+ operations. You should try these operations in both split-screen and
+ multi-window mode, except where otherwise noted.
+</p>
+
+<ul>
+ <li>Enter and leave multi-window mode.
+ </li>
+
+ <li>Switch from your app to another app, and verify that the app behaves
+ properly while it is visible but not active. For example, if your app is
+ playing video, verify that the video continues to play while the user is
+ interacting with another app.
+ </li>
+
+ <li>In split-screen mode, try moving the dividing bar to make your app both
+ larger and smaller. Try these operations in both side-by-side and
+ one-above-the-other configurations. Verify that the app does not crash,
+ essential functionality is visible, and the resize operation doesn't take too
+ long.
+ </li>
+
+ <li>Perform several resize operations in rapid succession. Verify that your
+ app doesn't crash or leak memory. For information about checking your app's
+ memory usage, see <a href="{@docRoot}tools/debugging/debugging-memory.html">
+ Investigating Your RAM Usage</a>.
+ </li>
+
+ <li>Use your app normally in a number of different window configurations, and
+ verify that the app behaves properly. Verify that text is readable, and that
+ UI elements aren't too small to interact with.
+ </li>
+</ul>
+
+<h3 id="test-disabled-mw">If you have disabled multi-window support</h3>
+
+<p>
+ If you disabled multi-window support by setting
+ <code>android:resizableActivity="false"</code>, you should launch your app on
+ a device running the N Developer Preview and attempt to put the app in
+ freeform and split-screen modes. Verify that when you do so, the app remains
+ in full-screen mode.
+</p>
diff --git a/docs/html/preview/features/multilingual-support.jd b/docs/html/preview/features/multilingual-support.jd
new file mode 100644
index 0000000..e2082b6
--- /dev/null
+++ b/docs/html/preview/features/multilingual-support.jd
@@ -0,0 +1,213 @@
+page.title=Language and Locale
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>In this document:</h2>
+<ol>
+ <li><a href="#preN">Challenges in Resolving Language Resources</a></li>
+ <li><a href="#postN">Improvements to Resource-Resolution Strategy</a></li>
+ <li><a href="#design">Designing your App to Support Additional
+ Locales</a></li>
+
+</ol>
+
+</div>
+</div>
+
+<p>Android N Developer Preview provides enhanced support for multilingual users,
+allowing them to select multiple locales in settings. The N Developer Preview
+provides this capability by greatly expanding the number of locales supported
+and changing the way the system resolves resources. The new method of resolving
+resources is more robust and designed to be compatible with existing APKs, but
+you should take extra care to spot any unexpected behavior. For example, you
+should test to make sure that your app defaults to the expected language. Also,
+if it supports multiple languages, you should ensure that this support works as
+intended. Last, you should try to ensure that your app gracefully handles
+languages that you didn't explicitly design it to support.</p>
+
+<p>This document starts by explaining the resource resolution strategy prior to
+the N Developer Preview. Next, it describes the N Developer Preview's improved
+resource-resolution strategy. Last, it explains how to take advantage of
+the expanded number of locales to support more multilingual users.</p>
+
+<h2 id="preN">Challenges in Resolving Language Resources</h2>
+
+<p>Prior to the Android N Developer Preview, Android could not always successfully
+ match app and system locales. For example, suppose that your app's default language
+ is US English, but that it also has Spanish strings localized in {@code es_ES}
+ resource files.</p>
+<p>When your Java code referred to strings, it would resolve string languages as
+follows:</p>
+<ul>
+<li>If a device were set to {@code es_MX} (Spanish-Mexico), Android would load
+strings from {@code es_ES} resource files.</li>
+<li>If the device were set to {@code en_AU}, Android would fall back on {@code
+en_US}. The system would also default to {@code en_US} if the user chose a
+language that the app didn't support at all, like French.</li>
+</ul>
+
+
+<p>These resolution problems arose because the system stripped the country code
+ off of the locale if it could not find an exact match. For example:</p>
+<p class="table-caption" id="t-resource-res">
+<strong>Table 1.</strong> Resource resolution without an exact locale match.
+</p>
+<table>
+<tbody>
+<tr>
+<th>User Settings</th>
+<th>App Resources</th>
+<th>Resource Resolution</th>
+</tr>
+<tr>
+<td>fr_CH</td>
+<td>
+default (en)<br>
+de_DE <br>
+es_ES <br>
+fr_FR <br>
+it_IT <br>
+</td>
+ <td>
+Try fr_CH => Fail <br>
+Try fr => Fail <br>
+Use default (en)
+</td>
+ </tr>
+ </tbody>
+</table>
+
+
+<p>In this example, the system displays English strings without
+knowing whether the user can understand English. This behavior is pretty common
+today. The Android N Developer Preview should substantially reduce the frequency
+of outcomes like this one.</p>
+
+<h2 id="postN">Improvements to Resource-Resolution Strategy</h2>
+<p>The Android N Developer Preview brings more robust resource resolution, and
+finds better fallbacks automatically. However, to speed up resolution and improve
+ maintainability, you should store resources in the most common parent dialect.
+ For example, if you were storing Spanish resources in the {@code es-US} directory
+ before, move them into the {@code es-419} directory, which contains Latin American Spanish.
+ Similarly, if you have resource strings in a folder named {@code en-GB}, rename
+ the folder to {@code en-001} (international English), because the most common
+ parent for <code>en-GB</code> strings is {@code en-001}.
+ The following examples explain why these practices improve performance and
+reliability of resource resolution.</p>
+
+<h3>Resource resolution examples</h3>
+
+<p>With the N Developer Preview, the case described in <a href="#t1">Table 1</a> is resolved
+differently:</p>
+<p class="table-caption" id="t-improved-res">
+<strong>Table 2.</strong> An improved resolution strategy for when there is no
+exact locale match.</p>
+<table>
+<tr>
+<th>User Settings</th>
+<th>App Resources</th>
+<th>Resource Resolution</th>
+</tr>
+<tr>
+<td><ol>
+<li> fr_CH </li>
+</ol>
+</td>
+<td>
+default (en) <br>
+de_DE <br>
+es_ES <br>
+fr_FR <br>
+it_IT <br>
+</td>
+<td>
+Try fr_CH => Fail <br>
+Try fr => Fail <br>
+Try children of fr => fr_FR <br>
+Use fr_FR
+</td>
+</tr>
+
+</table>
+
+
+<p>Now the user gets French resources instead of English. This example also shows
+ why you should store French strings in {@code fr} rather than {@code fr_FR}
+ for Android N. Here the course of action is to match the closest parent dialect,
+ making resolution faster and more predictable.</p>
+
+<p>In addition to this improved resolution logic, Android now offers more
+ user languages to choose from. Let’s try the above example again with Italian
+ specified as an additional user language, but without app support for French. </p>
+
+<p class="table-caption" id="t-2d-choice">
+<strong>Table 3.</strong> Resource resolution when the app only matches the
+user's second-preferred locale setting.</p>
+<table>
+<tr>
+<th>User Settings</th>
+<th>App Resources</th>
+<th>Resource Resolution</th>
+
+</tr>
+<tr>
+<td><ol>
+<li> fr_CH </li>
+<li> it_CH </li>
+</ol>
+</td>
+<td>
+default (en) <br>
+de_DE <br>
+es_ES <br>
+it_IT <br>
+</td>
+<td>
+Try fr_CH => Fail <br>
+Try fr => Fail <br>
+Try children of fr => Fail <br>
+Try it_CH => Fail <br>
+Try it => Fail <br>
+Try children of it => it_IT <br>
+Use it_IT
+</td>
+
+</tr>
+
+</table>
+<p>The user still gets a language they understand, even though the app doesn’t
+support French.</p>
+
+
+<h2 id="design">Designing your App to Support Additional Locales</h2>
+<h3>LocaleList API</h3>
+
+<p>The Android N Developer Preview adds a new API {@code LocaleList.GetDefault()}
+that lets apps directly query the list of languages a user has specified. This API
+allows you to create more sophisticated
+ app behavior and better-optimized display of content. For example, Search
+ can show results in multiple languages based on user’s settings. Browser apps
+ can avoid offering to translate pages in a language the user already knows,
+ and keyboard apps can auto-enable all appropriate layouts. </p>
+
+<h3>Formatters</h3>
+
+<p>Up through Android 6.0 (API level 23), Android supported only one or two locales
+ for many common languages
+(en, es, ar, fr, ru). Because there were only a few variants of each language,
+apps could get away with storing some numbers and dates as hard coded strings
+in resource files. However, with Android's broadened set of supported locales,
+there can be
+significant differences in formats for dates, times, currencies, and similar
+information even within a single locale. Hard-coding your formats can produce a
+confusing experience for end users. Therefore, when developing for Android N
+make sure to use formatters instead of hard coding numbers and date strings.</p>
+
+<p>A prime example is Arabic, whose support the Android N expands from
+one {@code ar_EG} to 27 Arabic locales. These locales can share most resources,
+but some prefer ASCII digits, while others prefer native digits. For example,
+when you want to create a sentence with a digit variable, such as
+"Choose a 4 digit pin", use formatters as shown below:</p>
+
+<pre> format(locale, "Choose a %d-digit PIN", 4)</pre>
diff --git a/docs/html/preview/features/notification-updates.jd b/docs/html/preview/features/notification-updates.jd
new file mode 100644
index 0000000..fbe8448
--- /dev/null
+++ b/docs/html/preview/features/notification-updates.jd
@@ -0,0 +1,313 @@
+page.title=Bundled Notifications
+page.tags=notifications
+helpoutsWidget=true
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- table of contents -->
+<h2>This document includes</h2>
+<ol>
+ <li><a href="#direct">Direct Reply</a></li>
+ <li><a href="#bundle">Bundled Notifications</a></li>
+ <li><a href="#custom">Custom Views</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>Android N Developer Preview introduces several new APIs that allow apps to post
+notifications that are highly visible and interactive.</p>
+
+<p>The Android N Developer Preview extends the existing {@link android.support.v4.app.RemoteInput}
+notification API to support inline replies on handsets. This feature allows users
+ to quickly respond from the notification shade without visiting your app.</p>
+
+<p>
+ The N Developer Preview also allows you to bundle similar notifications to
+ appear as a single notification. To make this possible, the N Developer
+ Preview uses the existing {@link
+ android.support.v4.app.NotificationCompat.Builder#setGroup
+ NotificationCompat.Builder.setGroup()} method. Users can expand each of the
+ notifications, and perform actions such as reply and dismiss on each of the
+ notifications, individually from the notification shade.
+</p>
+
+<p>Last, the N Developer Preview also adds two new custom view style APIs that
+allow you to leverage system decorations in your app’s customized notification
+views.</p>
+
+<p>This document highlights some of the key changes that you should take into
+ account when using the new notification features in your apps.</p>
+
+<h2 id="direct">Direct Reply</h2>
+
+<p>With the Direct Reply feature in the N Developer Preview, users can quickly
+respond to text messages or update task lists directly within the notification
+interface. On a handheld, the inline reply action appears as an additional button
+ attached to the notification. When a user replies via keyboard, the system attaches
+ the text response to the intent
+ you had specified for the notification action and sends the intent to your
+ handheld app.
+
+
+<img id="fig-reply-button" src="{@docRoot}preview/images/inline-reply.png">
+<p class="img-caption">
+ <strong>Figure 1.</strong> N Developer Preview adds <strong>Reply</strong>
+ action button.
+</p>
+
+<h3>Adding inline reply actions</h3>
+
+<p>To create a notification action that supports direct reply:
+</p>
+
+<ol>
+<li>Create an instance of {@link android.support.v4.app.RemoteInput.Builder}
+ that you can add to your notification
+action. This class's constructor accepts a string that the system uses as the key
+ for the text input. Later, your handheld app uses that key to retrieve the text
+ of the input.
+
+<pre>
+// Key for the string that's delivered in the action's intent
+private static final String KEY_TEXT_REPLY = "key_text_reply";
+String replyLabel = getResources().getString(R.string.reply_label);
+RemoteInput remoteInput = new RemoteInput.Builder(KEY_TEXT_REPLY)
+ .setLabel(replyLabel)
+ .build();
+</pre>
+</li>
+<li>Attach the {@link android.support.v4.app.RemoteInput}
+ object to an action using <code>addRemoteInput()</code>.
+
+<pre>
+// Create the reply action and add the remote input
+Notification.Action action =
+ new Notification.Action.Builder(R.drawable.ic_reply_icon,
+ getString(R.string.label), replyPendingIntent)
+ .addRemoteInput(remoteInput)
+ .build();
+</pre>
+</li>
+
+<li>Apply the action to a notification and issue the notification.
+
+<pre>
+// Build the notification and add the action
+Notification notification =
+ new Notification.Builder(mContext)
+ .setSmallIcon(R.drawable.ic_message)
+ .setContentTitle(getString(R.string.title))
+ .setContentText(getString(R.string.content))
+ .addAction(action))
+ .build();
+
+// Issue the notification
+NotificationManager notificationManager =
+ NotificationManager.from(mContext);
+notificationManager.notify(notificationId, notification);
+
+</pre>
+</li>
+
+</ol>
+
+
+<p> The system prompts the user to input a response when they trigger the
+notification action. </p>
+
+<img id="fig-user-input" src="{@docRoot}preview/images/inline-type-reply.png">
+<p class="img-caption">
+ <strong>Figure 2.</strong> The user inputs text from the notification shade.
+</p>
+
+<h3>Retrieving user input from the inline reply</h3>
+
+<p>To receive user input from the notification interface to the activity you
+declared in the reply action's intent:</p>
+<ol>
+<li> Call {@link android.support.v4.app.RemoteInput#getResultsFromIntent
+ getResultsFromIntent()} by passing the notification action’s intent as
+ the input parameter. This method returns a {@link android.os.Bundle} that
+ contains the text response.
+</li>
+
+<pre>
+Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
+</pre>
+
+<li>Query the bundle using the result key (provided to the {@link
+ android.support.v4.app.RemoteInput.Builder} constructor).
+</li>
+</ol>
+
+<p>The following code snippet illustrates how a method retrieves the input text
+from a bundle:</p>
+
+<pre>
+// Obtain the intent that started this activity by calling
+// Activity.getIntent() and pass it into this method to
+// get the associated string.
+
+private CharSequence getMessageText(Intent intent) {
+ Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
+ if (remoteInput != null) {
+ return remoteInput.getCharSequence(KEY_TEXT_REPLY);
+ }
+ return null;
+ }
+</pre>
+
+<p>Apps can apply logic to decide what actions to take on the retrieved
+text.
+For interactive apps (like chats), provide more context in the notification itself
+ (for example, multiple lines of chat history, including the user’s own messages)
+ so that the user can respond appropriately.
+When the user responds via {@link android.support.v4.app.RemoteInput},
+ include the text in the reply history with the {@code setRemoteInputHistory()}
+ method.
+
+
+<img id="fig-chat-history" src=
+"{@docRoot}preview/images/inline-reply-sent.png">
+<p class="img-caption">
+ <strong>Figure 3.</strong> Screenshot of chat history in the notification
+ shade.
+</p>
+
+<h2 id="bundle">Bundled Notifications</h2>
+
+<p>The Android N Developer preview provides developers with a new way to represent
+ a queue of notifications: <em>bundled notifications</em>. This is similar to the
+ <a href="{@docRoot}/training/wearables/notifications/stacks.html">Notification
+ Stacks</a> feature in Android Wear. For example, if your app creates notifications
+ for received messages, when more than one message is received, bundle the
+ notifications together as a single group.You can
+ use the existing {@link android.support.v4.app.NotificationCompat.Builder#setGroup}
+Builder.setGroup()}
+ method to bundle similar notifications. </p>
+
+<p>A notification group imposes a hierarchy on the notifications comprising it.
+ At the top of that hierarchy is a parent notification that serves as a summary of
+ the group. The subsequent lines list the contents of the child
+ notifications. The user can expand the bundle to view its notifications. The user
+ can then select a notification within its bundle and perform one of its
+ actions, like "reply" or "dismiss".
+ </p>
+
+<img id="fig-bundles" src="{@docRoot}preview/images/bundles.png">
+<p class="img-caption">
+ <strong>Figure 4.</strong> The user can expand a bundle to see its
+ notifications, then expand one of those notifications to use one of its
+ actions.
+</p>
+
+<p>To learn how to add notifications to a group, see
+<a href="{@docRoot}training/wearables/notifications/stacks.html#AddGroup">Add
+Each Notification to a Group</a>.</p>
+
+
+<h3 id="best-practices">Best practices for bundled notifications</h3>
+<p>This section provides guidelines about when to use notification groups instead
+of the {@link android.app.Notification.InboxStyle} notifications that have been available
+ in the earlier versions of the Android platform. </p>
+<h3>When to use bundled notifications</h3>
+
+<p>You should use notification groups only if all of the following conditions are
+true for your use case:</p>
+
+<ul>
+ <li>The child notifications are complete notifications and can be displayed
+ individually without the need for a group summary.</li>
+ <li>There is a benefit to surfacing the child notifications individually. For
+ example:
+ </li>
+ <ul>
+ <li>They are actionable, with actions specific to each child.</li>
+ <li>There is more information to the child that the user wants to read.</li>
+ </ul>
+</ul>
+
+<p>Examples of good use cases for notification groups include: a messaging app
+displaying a list of incoming messages, or an email app displaying a list of
+received emails.</p>
+
+<p>Examples of where a single notification (InboxStyle or BigTextStyle) is preferable
+ include: Individual messages from a single person, or a list representation of
+ single-line text items.</p>
+
+<h3 id ="post">Displaying bundled notifications</h3>
+<p>When a group only has a single child notification, the app should in general
+not post a notification group, but instead post that notification individually.
+Only if it accumulates more than one child should it display the notifications
+ in a group.</p>
+
+<p>Similarly, when a user swipes away children of an expanded
+notification group, the app should remove the group as soon as there is only a
+single child left. It should then convert the child into a normal, single
+ notification.</p>
+
+<h3>Peeking notifications</h3>
+
+<p>While the system usually displays child notifications as a group, you can set
+ them to temporarily appear as
+ <a href="{@docRoot}guide/topics/ui/notifiers/notifications.html#Heads-up">
+ heads-up notifications</a>. This feature is especially useful because it allows
+ immediate access to the most recent child and the actions associated with it.
+</p>
+
+
+<h3>Backwards compatibility</h3>
+
+<p>On handhelds, notification groups are available beginning from Android N Developer
+preview. However, on tablets, the notification groups API has been available since
+Android Android 5.0 (API level 21). </p>
+
+<p>All Android Wear devices have this feature, regardless of API level.
+ The only action a Wear developer must take is to verify that the app behavior
+ corresponds to the <a href="#best-practices">guidelines</a> described above.</p>
+
+<p>In order to support backward compatibility, an app should still have
+an inbox style or an equivalent notification representative for the whole information
+ content of the group including the children on Android 5.0 and above.
+For convenience, an app can usually reuse the notification group summary and define
+ it as an inbox-style notification, with each line corresponding to one child
+ notification.
+ </p>
+
+<h2 id="custom"> Custom Views</h2>
+<p>Starting from the N Developer Preview, you can customize notification views and
+still obtain system decorations like notification headers, actions, and expandable
+layouts.</p>
+
+<p>To enable this capability, Android N adds the following custom view style APIs:</p>
+<dl>
+<dt>
+{@code DecoratedCustomViewStyle()}</dt>
+<dd> Styles notifications other than media
+notifications.</dd>
+<dt>
+{@code DecoratedMediaCustomViewStyle()}</dt>
+<dd> Styles media notifications.</dd>
+</dl>
+
+<p>To use this new API, call the {@code setStyle()} method, passing to it
+the desired custom view style.</p>
+
+<p>This snippet shows how to construct a custom notification object with the
+{@code DecoratedCustomViewStyle()} method.</p>
+
+<pre>
+Notification noti = new Notification.Builder()
+ .setSmallIcon(R.drawable.ic_stat_player)
+ .setLargeIcon(albumArtBitmap))
+ .setCustomContentView(contentView);
+ .setStyle(new Notification.DecoratedCustomViewStyle())
+ .build();
+
+</pre>
diff --git a/docs/html/preview/features/picture-in-picture.jd b/docs/html/preview/features/picture-in-picture.jd
new file mode 100644
index 0000000..9a96de2
--- /dev/null
+++ b/docs/html/preview/features/picture-in-picture.jd
@@ -0,0 +1,175 @@
+page.title=Picture-in-picture
+page.keywords=preview,sdk,PIP,Picture-in-picture
+page.tags=androidn
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#declaring">Declaring Your Activity Supports
+ Picture-in-picture</a></li>
+ <li><a href="#pip_button">Switching Your Activity to Picture-in-picture</a>
+ </li>
+ <li><a href="#handling_ui">Handling UI During Picture-in-picture</a>
+ </li>
+ <li><a href="#continuing_playback">Continuing Video Playback While in
+Picture-in-picture</a></li>
+ <li><a href="#best">Best Practices</a></li>
+ </ol>
+</div>
+</div>
+
+<p>In the Android N Developer Preview, Android TV users can now watch a video
+in a pinned window in a corner of the screen when navigating within
+applications. This new Picture-in-picture (PIP) mode lets apps run a video
+activity in the pinned window while another activity continues in the
+background. The PIP window lets users multi-task while using your app, making
+browsing and exploring your app easier and more engaging.</p>
+
+<p>Your app can decide when to trigger PIP mode. Here are some examples on
+when to enter PIP mode:</p>
+
+<ul>
+<li>When the user is navigating back from a video, the video activity can be
+placed in PIP mode instead of being closed.</li>
+<li>When the user is watching the end of an episode of content, the video can
+be placed in PIP mode while the main screen displays promotional or summary
+information about the next episode in the series.</li>
+<li>When the user wants to queue up additional content to watch while watching
+the currently playing content, the video can be placed in PIP mode and a
+content selection activity can be shown in the main screen.</li>
+</ul>
+
+<p>The PIP window is 240 x 135 dp and is shown at the top-most layer in one of
+the four corners of the screen, chosen by the system. The user can bring up a
+PIP menu that lets them toggle the PIP window to full screen, or close the PIP
+window, by holding down the <b>Home</b> button on the remote. If another
+video starts playing on the main screen, or the user leaves the app, the PIP
+window is automatically closed.</p>
+
+<p>PIP leverages the multi-window APIs available in the N Developer Preview to
+provide the pinned video overlay window. To add PIP to your app, you need to
+register your activities that support PIP, switch your activity to PIP mode as
+needed, and make sure UI elements are hidden and video playback continues when
+the activity is in PIP mode.</p>
+
+<h2 id="declaring">Declaring Your Activity Supports Picture-in-picture</h2>
+
+<p>By default, the system will not automatically support PIP for applications.
+If you want support PIP in your application, you need to register your video
+activity in your manifest by setting
+<code>android:supportsPictureInPicture</code> and
+<code>android:resizeableActivity</code> to <code>true</code>. Also, specify
+that your activity handles layout configuration changes so that your activity
+won't relaunch when layout changes occur during PIP mode transitions.</p>
+
+<pre>
+<activity android:name="VideoActivity"
+ android:resizeableActivity="true"
+ android:supportsPictureInPicture="true"
+ android:configChanges=
+ "screenSize|smallestScreenSize|screenLayout|orientation"
+ ...
+</pre>
+
+<p>When registering your activity, keep in mind that in PIP mode, your
+activity is shown in a small overlay window on a TV screen. Video playback
+activities with minimal UI provide the best user experience. Non-video
+activities with detailed UI may not provide a good user experience in PIP
+mode.</p>
+
+<h2 id="pip_button">Switching Your Activity to Picture-in-picture</h2>
+
+When you need to switch your activity into PIP mode, call
+<code>Activity.enterPictureInPicture()</code>. The following example switches
+to PIP mode when the user selects a dedicated PIP button on a media control
+bar:</p>
+
+<pre>
+@Override
+public void onActionClicked(Action action) {
+ if (action.getId() == R.id.lb_control_picture_in_picture) {
+ getActivity().enterPictureInPicture();
+ return;
+ }
+ ...
+</pre>
+
+<p>Adding a PIP button to your media control bar lets your user easily switch
+to PIP mode while controlling video playback.</p>
+
+<img src="{@docRoot}preview/images/pip-button.png" />
+<p class="img-caption"><strong>Figure 1.</strong> A Picture-in-picture
+button on a media control bar.</p>
+
+<p>A new <code>PlaybackControlsRow.PictureInPictureAction</code> class is
+provided to use the PIP icon and handle control bar PIP actions.</p>
+
+<h2 id="handling_ui">Handling UI During Picture-in-picture</h2>
+
+<p>When your activity enters PIP mode, your activity should only show video
+playback. You should remove UI elements before your activity enters PIP,
+and restore these elements when your activity becomes full-screen again.
+Override <code>Activity.onPictureInPictureChanged()</code> or
+<code>Fragment.onPictureInPictureChanged()</code> and enable or
+disable your UI elements as needed, for example:</p>
+
+<pre>
+@Override
+public void onPictureInPictureChanged(boolean inPictureInPicture) {
+ if (inPictureInPicture) {
+ // Hide the controls in picture-in-picture mode.
+ ...
+ } else {
+ // Restore the playback UI based on the playback status.
+ ...
+ }
+}
+</pre>
+
+<h2 id="continuing_playback">Continuing Video Playback While in
+Picture-in-picture</h2>
+
+<p>When your activity switches to PIP, the system considers the activity in a
+paused state, and calls your activity's <code>onPause()</code> method. Video
+playback should not be paused and should continue playing if the activity is
+paused due to PIP mode. Check for PIP in your activity's
+<code>onPause()</code> method and handle playback appropriately, for
+example:</p>
+
+<pre>
+@Override
+public void onPause() {
+ // If called due to PIP, do not pause playback
+ if (inPictureInPicture()) {
+ // Continue playback
+ ...
+ }
+ // If paused but not in PIP, pause playback if necessary
+ ...
+}
+</pre>
+
+<p>When your activity switches out of PIP mode back to full screen mode, the
+system resumes your activity and calls your <code>onResume()</code> method.</p>
+
+<h2 id="best">Best Practices</h2>
+
+<p>PIP is intended for activities that play full-screen video. When switching
+your activity into PIP mode, avoid showing anything except video content.
+Track when your activity enters PIP mode and hide UI elements, as described
+in <a href="#handling_ui">Handling UI During Picture-in-picture Mode</a>.</p>
+
+<p>Since the PIP window is shown as a floating window in the corner of the
+screen, you should avoid showing critical information in the main screen
+in any area that can be obscured by the PIP window.</p>
+
+<p>When an activity is in PIP mode, by default it doesn't get input focus. To
+receive input events while in PIP mode, use
+<code>MediaSession.setMediaButtonReceiver()</code>.</p>
+
+<p>For more information on multi-window APIs, see
+<a href="{@docRoot}preview/features/multi-window.html">Android N
+Developer Preview Multi-Window Support</a>.</p>
diff --git a/docs/html/preview/features/scoped-folder-access.jd b/docs/html/preview/features/scoped-folder-access.jd
new file mode 100644
index 0000000..f625978
--- /dev/null
+++ b/docs/html/preview/features/scoped-folder-access.jd
@@ -0,0 +1,125 @@
+page.title=Scoped Directory Access
+page.keywords=preview,sdk,scoped directory access
+page.tags=androidn
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#accessing">Accessing an External Storage Directory</a></li>
+ <li><a href="#removable">Accessing a Directory on Removable Media</a></li>
+ <li><a href="#best">Best Practices</a></li>
+ </ol>
+</div>
+</div>
+
+<p>Apps such as photo apps usually just need access to specific directories in
+external storage, such as the <code>Pictures</code> directory. Existing
+approaches to accessing external storage aren't designed to easily provide
+targeted directory access for these types of apps. For example:</p>
+
+<ul>
+<li>Requesting {@link android.Manifest.permission#READ_EXTERNAL_STORAGE}
+or {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} in your manifest
+allows access to all public directories on external storage, which might be
+more access than what your app needs.</li>
+<li>Using the
+<a href="{@docRoot}guide/topics/providers/document-provider.html">Storage
+Access Framework</a> usually makes your user pick directories
+via a system UI, which is unnecessary if your app always accesses the same
+external directory.</li>
+</ul>
+
+<p>The Android N Developer Preview provides a new simplified API to access
+common external storage directories. </p>
+
+<h2 id="accessing">Accessing an External Storage Directory</h2>
+
+<p>Use the <code>StorageManager</code> class to get the appropriate
+<code>StorageVolume</code> instance. Then, create an intent by calling the
+<code>StorageVolume.createAccessIntent()</code> method of that instance.
+Use this intent to access external storage directories. To get a list of
+all available volumes, including removable media volumes, use
+<code>StorageManager.getVolumesList()</code>.</p>
+
+<p>The following code snippet is an example of how to open the
+<code>Pictures</code> directory in the primary shared storage:</p>
+
+<pre>
+StorageManager sm = (StorageManager)getSystemService(Context.STORAGE_SERVICE);
+StorageVolume volume = sm.getPrimaryVolume();
+Intent intent = volume.createAccessIntent(Environment.DIRECTORY_PICTURES);
+startActivityForResult(intent, request_code);
+</pre>
+
+<p>The system attempts to grant access to the external directory, and if
+necessary confirms access with the user using a simplified UI:</p>
+
+<img src="{@docRoot}preview/images/scoped-folder-access-framed.png"
+srcset="{@docRoot}preview/images/scoped-folder-access-framed.png 1x,
+{@docRoot}preview/images/scoped-folder-access-framed_2x.png 2x" />
+<p class="img-caption"><strong>Figure 1.</strong> An application requesting
+access to the Pictures directory.</p>
+
+<p>If the user grants access, the system calls your
+<code>onActivityResult()</code> override with a result code of
+<code>Activity.RESULT_OK</code>, and intent data that contains the URI. Use
+the provided URI to access directory information, similar to using URIs
+returned by the
+<a href="{@docRoot}guide/topics/providers/document-provider.html">Storage
+Access Framework</a>.</p>
+
+<p>If the user doesn't grant access, the system calls your
+<code>onActivityResult()</code> override with a result code of
+<code>Activity.RESULT_CANCELED</code>, and null intent data.</p>
+
+<p class="note"><b>Note</b>: Getting access to a specific external directory
+also gains access to subdirectories within that directory.</p>
+
+<h2 id="removable">Accessing a Directory on Removable Media</h2>
+
+<p>To use Scoped Directory Access to access directories on removable media,
+first add a {@link android.content.BroadcastReceiver} that listens for the
+{@link android.os.Environment#MEDIA_MOUNTED} notification, for example:</p>
+
+<pre>
+<receiver
+ android:name=".MediaMountedReceiver"
+ android:enabled="true"
+ android:exported="true" >
+ <intent-filter>
+ <action android:name="android.intent.action.MEDIA_MOUNTED" />
+ <data android:scheme="file" />
+ </intent-filter>
+</receiver>
+</pre>
+
+<p>When the user mounts removable media, like an SD card, the system sends a
+{@link android.os.Environment#MEDIA_MOUNTED} notification. This notification
+provides a <code>StorageVolume</code> object in the intent data that you can
+use to access directories on the removable media. The following example
+accesses the <code>Pictures</code> directory on removable media:</p>
+
+<pre>
+// BroadcastReceiver has already cached the MEDIA_MOUNTED
+// notification Intent in mediaMountedIntent
+StorageVolume volume = (StorageVolume)
+ mediaMountedIntent.getParcelableExtra(StorageVolume.EXTRA_STORAGE_VOLUME);
+volume.createAccessIntent(Environment.DIRECTORY_PICTURES);
+startActivityForResult(intent, request_code);
+</pre>
+
+<h2 id="best">Best Practices</h2>
+
+<p>Where possible, persist the external directory access URI so you don't have
+to repeatedly ask the user for access. Once the user has granted access, call
+<code>getContentResolver().takePersistableUriPermssion()</code> with the
+directory access URI. The system will persist the URI and subsequent access
+requests will return <code>RESULT_OK</code> and not show confirmation UI to the
+user.</p>
+
+<p>If the user denies access to an external directory, do not immediately
+request access again. Repeatedly insisting on access results in a poor user
+experience.</p>
diff --git a/docs/html/preview/features/tv-recording-api.jd b/docs/html/preview/features/tv-recording-api.jd
new file mode 100644
index 0000000..83baf94
--- /dev/null
+++ b/docs/html/preview/features/tv-recording-api.jd
@@ -0,0 +1,120 @@
+page.title=TV Recording
+page.keywords=preview,sdk,tv,recording
+page.tags=androidn
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#supporting">Indicating Support for Recording</a></li>
+ <li><a href="#recording">Recording a Session</a></li>
+ <li><a href="#errors">Handling Recording Errors</a></li>
+ <li><a href="#sessions">Managing Recorded Sessions</a></li>
+ <li><a href="#best">Best Practices</a></li>
+ </ol>
+</div>
+</div>
+
+<p>TV input services let the user pause and resume channel playback via
+time-shifting APIs. The Android N Developer Preview expands on time-shifting
+by letting the user save multiple recorded sessions.</p>
+
+<p>Users can schedule recordings in advance, or start a recording as they watch
+a program. Once the system has saved a recording, the user can browse, manage,
+and play back the recording using the system TV app.</p>
+
+<p>If you want to provide recording functionality for your TV input service,
+you must indicate to the system that your app supports recording, implement
+the ability to record programs, handle and communicate any errors that occur
+during recording, and manage your recorded sessions.</p>
+
+<h2 id="supporting">Indicating Support for Recording</h2>
+
+<p>To tell the system that your TV input service supports recording, follow
+these steps:</p>
+
+<ol>
+<li>In your <code>TvInputService.onCreate()</code> method, create a new
+<code>TvInputInfo</code> object using the <code>TvInputInfo.Builder</code>
+class.</li>
+<li>When creating the new <code>TvInputInfo</code> object, call
+<code>setCanRecord(true)</code> before calling <code>build()</code> to
+indicate your service supports recording.</li>
+<li>Register your <code>TvInputInfo</code> object with the system by calling
+<code>TvInputService.updateTvInputInfo()</code>.</li>
+</ol>
+
+<h2 id="recording">Recording a Session</h2>
+
+<p>After your TV input service registers that it supports recording
+functionality, the system calls your
+<code>TvInputService.onCreateRecordingSession()</code> when it needs to access
+your app's recording implementation. Implement your own
+<code>TvInputService.RecordingSession</code> subclass and return it
+when the <code>onCreateRecordingSession()</code> callback
+fires. This subclass is responsible for switching to the correct channel data,
+recording the requested data, and communicating recording status and errors to
+the system.</p>
+
+<p>When the system calls <code>RecordingSession.onTune()</code>, passing in a
+channel URI, tune to the channel that the URI specifies. Notify the system that
+your app has tuned to the desired channel by calling <code>notifyTuned()</code>,
+or, if your app could not tune to the proper channel, call
+<code>notifyError()</code>.</p>
+
+<p>The system next invokes the <code>RecordingSession.onStartRecording()</code>
+callback. Your app must start recording immediately. When the system invokes
+this callback, it may provide a URI that contains information about the program
+that is about to be recorded. When the recording is done, you need to copy this
+data to the <code>RecordedPrograms</code> data table.</p>
+
+<p>Finally, the system calls <code>RecordingSession.onStopRecording()</code>.
+At this point, your app must stop recording immediately. You also need to
+create an entry in the <code>RecordedPrograms</code> table. This entry should
+include the recorded session data URI in the
+<code>RecordedPrograms.COLUMN_RECORDING_DATA_URI</code> column, and any program
+information that the system provided in the initial call to
+<code>onStartRecording()</code>.</p>
+
+<p>For more details on how to access the <code>RecordedPrograms</code> table
+see <a href="#sessions">Managing Recorded Sessions</a>.</p>
+
+<h2 id="errors">Handling Recording Errors</h2>
+
+<p>If an error occurs during recording, rendering the recorded data unusable,
+notify the system by calling <code>RecordingSession.notifyError()</code>.
+Similarly, you can call <code>notifyError()</code> after a recording session is
+created to let the system know that your app can no longer record sessions.</p>
+
+<p>If an error occurs during recording, but you'd like to provide a usable
+partial recording to users for playback, call
+<code>RecordingSession.notifyRecordingStopped()</code> to enable the system to
+use the partial session.</p>
+
+<h2 id="sessions">Managing Recorded Sessions</h2>
+
+<p>The system maintains information for all recorded sessions from all
+recording-capable channel apps in the <code>TvContract.RecordedPrograms</code>
+content provider table. This information is accessible via the
+<code>RecordedPrograms.Uri</code> content URI. Use content provider APIs to
+read, add, and delete entries from this table.</p>
+
+<p>For more information on working with content provider data see
+<a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+Content Provider Basics</a> .</p>
+
+<h2 id="best">Best Practices</h2>
+
+<p>TV devices may have limited storage, so use your best judgment when
+allocating storage to save recorded sessions. Use
+<code>RecordingCallback.onError(RECORDING_ERROR_INSUFFICIENT_SPACE)</code> when
+there isn't enough space to save a recorded session.</p>
+
+<p>When the user initiates recording, you should start recording data as soon
+as possible. To facilitate this, complete any up-front time-consuming tasks,
+like accessing and allocating storage space, when the system invokes the
+<code>onCreateRecordingSession()</code> callback. Doing so lets you start
+recording immediately when the <code>onStartRecording()</code> callback
+fires.</p>
diff --git a/docs/html/preview/guide.jd b/docs/html/preview/guide.jd
new file mode 100644
index 0000000..e768ba0
--- /dev/null
+++ b/docs/html/preview/guide.jd
@@ -0,0 +1,188 @@
+page.title=Testing Guide
+page.image=images/cards/card-n-guide_2x.png
+meta.tags="preview", "testing"
+page.tags="preview", "developer preview"
+
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#runtime-permissions">Testing Permissions</a></li>
+ <li><a href="#doze-standby">Testing Doze and App Standby</a></li>
+ <li><a href="#ids">Auto Backup and Device Identifiers</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ The Android M Developer Preview gives you an opportunity to ensure your apps work with the next
+ version of the platform. This preview includes a number of APIs and behavior changes that can
+ impact your app, as described in the <a href="{@docRoot}preview/api-overview.html">API
+ Overview</a> and <a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a>. In testing
+ your app with the preview, there are some specific system changes that you should focus on to
+ ensure that users have a good experience.
+</p>
+
+<p>
+ This guide describes the what and how to test preview features with your app. You should
+ prioritize testing of these specific preview features, due to their high potential impact on your
+ app's behavior:
+</p>
+
+<ul>
+ <li><a href="#runtime-permissions">Permissions</a>
+ </li>
+ <li><a href="#doze-standby">Doze and App Standby</a>
+ </li>
+ <li><a href="#ids">Auto Backup and Device Identifiers</a></li>
+</ul>
+
+<p>
+ For more information about how to set up devices or virtual devices with a preview system image
+ for testing, see <a href="{@docRoot}preview/setup-sdk.html">Set up the Preview SDK</a>.
+</p>
+
+
+<h2 id="runtime-permissions">Testing Permissions</h2>
+
+<p>
+ The new <a href="{@docRoot}preview/features/runtime-permissions.html">Permissions</a> model
+ changes the way that permissions are allocated to your app by the user. Instead of granting all
+ permissions during the install procedure, your app must ask the user for individual permissions
+ at runtime. For users this behavior provides more granular control over each app’s activities, as
+ well as better context for understanding why the app is requesting a specific permission. Users
+ can grant or revoke the permissions granted to an app individually at any time. This feature of
+ the preview is most likely to have an impact on your app's behavior and may prevent some of your
+ app features from working, or they may work in a degraded state.
+</p>
+
+<p class="caution">
+ This change affects all apps running on the new platform, even those not targeting the new
+ platform version. The platform provides a limited compatibility behavior for legacy apps, but you
+ should begin planning your app’s migration to the new permissions model now, with a goal of
+ publishing an updated version of your app at the official platform launch.
+</p>
+
+
+<h3 id="permission-test-tips">Test tips</h3>
+
+<p>
+ Use the following test tips to help you plan and execute testing of your app with the new
+ permissions behavior.
+</p>
+
+<ul>
+ <li>Identify your app’s current permissions and the related code paths.</li>
+ <li>Test user flows across permission-protected services and data.</li>
+ <li>Test with various combinations of granted/revoked permission.</li>
+ <li>Use the {@code adb} tool to manage permssions from the command line:
+ <ul>
+ <li>List permissions and status by group:
+ <pre>adb shell pm list permissions -d -g</pre>
+ </li>
+ <li>Grant or revoke one or more permissions using the following syntax:<br>
+ <pre>adb shell pm [grant|revoke] <permission.name> ...</pre>
+ </li>
+ </ul>
+ </li>
+ <li>Analyze your app for services that use permissions.</li>
+</ul>
+
+<h3 id="permission-test-strategy">Test strategy</h3>
+
+<p>
+ The permissions change affects the structure and design of your app, as well as
+ the user experience and flows you provide to users. You should assess your app’s current
+ permissions use and start planning for the new flows you want to offer. The official release of
+ the platform provides compatibility behavior, but you should plan on updating your app and not
+ rely on these behaviors.
+</p>
+
+<p>
+ Identify the permissions that your app actually needs and uses, and then find the various code
+ paths that use the permission-protected services. You can do this through a combination of
+ testing on the new platform and code analysis. In testing, you should focus on opting in to
+ runtime permissions by changing the app’s {@code targetSdkVersion} to the preview version. For
+ more information, see <a href="{@docRoot}preview/setup-sdk.html#">Set up the Preview SDK</a>.
+</p>
+
+<p>
+ Test with various combinations of permissions revoked and added, to highlight the user flows that
+ depend on permissions. Where a dependency is not obvious or logical you should consider
+ refactoring or compartmentalizing that flow to eliminate the dependency or make it clear why the
+ permission is needed.
+</p>
+
+<p>
+ For more information on the behavior of runtime permissions, testing, and best practices, see the
+ <a href="{@docRoot}preview/features/runtime-permissions.html">Permissions</a> developer
+ preview page.
+</p>
+
+
+<h2 id="doze-standby">Testing Doze and App Standby</h2>
+
+<p>
+ The power saving features of Doze and App Standby limit the amount of background processing that
+ your app can perform when a device is in an idle state or while your app is not in focus. The
+ restrictions the system may impose on apps include limited or no network access,
+ suspended background tasks, suspended Notifications, ignored wake requests, and alarms. To ensure
+ that your app behaves properly with these power saving optimizations, you should test your app by
+ simulating these low power states.
+</p>
+
+<h4 id="doze">Testing your app with Doze</h4>
+
+<p>To test Doze with your app:</p>
+
+<ol>
+<li>Configure a hardware device or virtual device with a M Preview system image.</li>
+<li>Connect the device to your development machine and install your app.</li>
+<li>Run your app and leave it active.</li>
+<li>Simulate the device going into Doze mode by running the following commands:
+
+<pre>
+$ adb shell dumpsys battery unplug
+$ adb shell dumpsys deviceidle step
+$ adb shell dumpsys deviceidle -h
+</pre>
+
+ </li>
+ <li>Observe the behavior of your app when the device is re-activated. Make sure it
+ recovers gracefully when the device exits Doze.</li>
+</ol>
+
+
+<h4 id="standby">Testing apps with App Standby</h4>
+
+<p>To test the App Standby mode with your app:</p>
+
+<ol>
+ <li>Configure a hardware device or virtual device with a M Preview system image.</li>
+ <li>Connect the device to your development machine and install your app.</li>
+ <li>Run your app and leave it active.</li>
+ <li>Simulate the app going into standby mode by running the following commands:
+
+<pre>
+$ adb shell am broadcast -a android.os.action.DISCHARGING
+$ adb shell am set-idle <packageName> true
+</pre>
+
+ </li>
+ <li>Simulate waking your app using the following command:
+ <pre>$ adb shell am set-idle <packageName> false</pre>
+ </li>
+ <li>Observe the behavior of your app when it is woken. Make sure it recovers gracefully
+ from standby mode. In particular, you should check if your app's Notifications and background
+ jobs continue to function as expected.</li>
+</ol>
+
+<h2 id="ids">Auto Backup for Apps and Device-Specific Identifiers</h2>
+
+<p>If your app is persisting any device-specific identifiers, such as Google
+Cloud Messaging registration ID, in internal storage,
+make sure to follow best practices to exclude the storage
+location from auto-backup, as described in <a href="{@docRoot}preview/backup/index.html">Auto
+Backup for Apps</a>. </p>
diff --git a/docs/html/preview/images/bundles.png b/docs/html/preview/images/bundles.png
new file mode 100644
index 0000000..57d6bee
--- /dev/null
+++ b/docs/html/preview/images/bundles.png
Binary files differ
diff --git a/docs/html/preview/images/inline-reply-sent.png b/docs/html/preview/images/inline-reply-sent.png
new file mode 100644
index 0000000..623e89e
--- /dev/null
+++ b/docs/html/preview/images/inline-reply-sent.png
Binary files differ
diff --git a/docs/html/preview/images/inline-reply.png b/docs/html/preview/images/inline-reply.png
new file mode 100644
index 0000000..cdf5d30
--- /dev/null
+++ b/docs/html/preview/images/inline-reply.png
Binary files differ
diff --git a/docs/html/preview/images/inline-type-reply.png b/docs/html/preview/images/inline-type-reply.png
new file mode 100644
index 0000000..6870bc2
--- /dev/null
+++ b/docs/html/preview/images/inline-type-reply.png
Binary files differ
diff --git a/docs/html/preview/images/m-preview-timeline-crop.png b/docs/html/preview/images/m-preview-timeline-crop.png
new file mode 100644
index 0000000..724a6af
--- /dev/null
+++ b/docs/html/preview/images/m-preview-timeline-crop.png
Binary files differ
diff --git a/docs/html/preview/images/m-preview-timeline.png b/docs/html/preview/images/m-preview-timeline.png
new file mode 100644
index 0000000..e9a339e
--- /dev/null
+++ b/docs/html/preview/images/m-preview-timeline.png
Binary files differ
diff --git a/docs/html/preview/images/mw-splitscreen.png b/docs/html/preview/images/mw-splitscreen.png
new file mode 100644
index 0000000..cbbd4a8
--- /dev/null
+++ b/docs/html/preview/images/mw-splitscreen.png
Binary files differ
diff --git a/docs/html/preview/images/pip-active.png b/docs/html/preview/images/pip-active.png
new file mode 100644
index 0000000..1e4bb63
--- /dev/null
+++ b/docs/html/preview/images/pip-active.png
Binary files differ
diff --git a/docs/html/preview/images/pip-button.png b/docs/html/preview/images/pip-button.png
new file mode 100644
index 0000000..b876b12
--- /dev/null
+++ b/docs/html/preview/images/pip-button.png
Binary files differ
diff --git a/docs/html/preview/images/scoped-folder-access-framed.png b/docs/html/preview/images/scoped-folder-access-framed.png
new file mode 100644
index 0000000..0169e41
--- /dev/null
+++ b/docs/html/preview/images/scoped-folder-access-framed.png
Binary files differ
diff --git a/docs/html/preview/images/scoped-folder-access-framed_2x.png b/docs/html/preview/images/scoped-folder-access-framed_2x.png
new file mode 100644
index 0000000..fd59ef1
--- /dev/null
+++ b/docs/html/preview/images/scoped-folder-access-framed_2x.png
Binary files differ
diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd
new file mode 100644
index 0000000..ebcfd8a
--- /dev/null
+++ b/docs/html/preview/index.jd
@@ -0,0 +1,74 @@
+page.title=Android N Developer Preview
+page.tags="preview","developer"
+meta.tags="preview", "android"
+fullpage=true
+forcelocalnav=true
+header.hide=1
+footer.hide=1
+@jd:body
+
+<section class="dac-expand dac-hero dac-light" style="background-color:#B2DFDB">
+ <div class="wrap" style="max-width:1100px;margin-top:0">
+ <div class="cols dac-hero-content" style="padding-bottom:1em;">
+
+ <div class="col-7of16 col-push-9of16">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for Android N!
+ <strong>Test your apps</strong> on a variety of Nexus devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multiwindow UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+
+ <a class="dac-hero-cta" href="{@docRoot}preview/overview.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Get started
+ </a><!--<br>
+ <a class="dac-hero-cta" href="{@docRoot}preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:1.5em;padding-right:2em;">
+ <img class="dac-hero-image" src="{@docRoot}images/home/n-preview-hero.png"
+ srcset="{@docRoot}images/home/n-preview-hero.png 1x,
+ {@docRoot}images/home/n-preview-hero_2x.png 2x">
+ </div>
+ </div>
+ <div class="dac-section dac-small">
+ <div class="resource-widget resource-flow-layout col-16"
+ data-query="collection:preview/landing/resources"
+ data-cardSizes="6x2"
+ data-maxResults="6"></div>
+ </div>
+ </div>
+</section>
+
+<section class="dac-section dac-gray"><div class="wrap">
+ <h1 class="dac-section-title">Resources</h1>
+ <div class="dac-section-subtitle">
+ Essential information to help you get your apps ready for Android M.
+ </div>
+
+ <div class="resource-widget resource-flow-layout col-16"
+ data-query="collection:preview/landing/more"
+ data-cardSizes="6x6"
+ data-maxResults="16"></div>
+
+ <ul class="dac-section-links">
+ <li class="dac-section-link">
+ <a href="https://code.google.com/p/android-developer-preview/">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Report Issues
+ </a>
+ </li>
+ <li class="dac-section-link"><a href="http://developer.android.com/preview/dev-community">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Join G+ Community
+ </a>
+ </li>
+ </ul>
+ </div>
+</section>
+
diff --git a/docs/html/preview/license.jd b/docs/html/preview/license.jd
new file mode 100644
index 0000000..e3d1fbb
--- /dev/null
+++ b/docs/html/preview/license.jd
@@ -0,0 +1,145 @@
+page.title=License Agreement
+
+@jd:body
+
+<p>
+To get started with the Android SDK Preview, you must agree to the following terms and conditions.
+As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk. The Android SDK Preview is not a stable release, and may contain errors and defects that can result in serious damage to your computer systems, devices and data.
+</p>
+
+<p>
+This is the Android SDK Preview License Agreement (the “License Agreement”).
+</p>
+<div class="sdk-terms" style="height:auto;border:0;padding:0;width:700px">
+1. Introduction
+
+1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
+
+1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 “Android-compatible” means any Android implemation that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
+
+1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+2. Accepting the License Agreement
+
+2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
+
+2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
+
+2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
+
+2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
+
+3. Preview License from Google
+
+3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the Preview solely to develop applications for compatible implementations of Android.
+
+3.2 You may not use this Preview to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this Preview is not used for that purpose.
+
+3.3 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.4 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
+
+3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
+
+3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.9 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
+
+4. Use of the Preview by You
+
+4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
+
+5. Your Developer Credentials
+
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+6. Privacy and Information
+
+6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
+
+7. Third Party Applications
+
+7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
+
+8. Using Google APIs
+
+8.1 Google APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+9. Terminating the License Agreement
+
+9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
+
+9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
+
+9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
+(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
+(B) Google issues a final release version of the Android SDK.
+
+9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
+
+10. DISCLAIMERS
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+11. LIMITATION OF LIABILITY
+
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+12. Indemnification
+
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
+
+13. Changes to the License Agreement
+
+13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
+
+14. General Legal Terms
+
+14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
+
+14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+
+
+</div>
\ No newline at end of file
diff --git a/docs/html/preview/overview.jd b/docs/html/preview/overview.jd
new file mode 100644
index 0000000..87f08b1
--- /dev/null
+++ b/docs/html/preview/overview.jd
@@ -0,0 +1,295 @@
+page.title=Program Overview
+page.metaDescription=Welcome to the Android M Developer Preview, a program that gives you everything you need to test and optimize your apps for the next version of Android.
+page.image=images/cards/card-n-overview_2x.png
+meta.tags="preview", "developer", "android"
+page.tags="preview", "developer", "android"
+
+@jd:body
+
+<p>
+ Welcome to the <strong>Android N Developer Preview</strong>, a program that gives you
+ everything you need to test and optimize your apps for the next version of
+ Android. It's free, and you can get started right away just by downloading
+ the Preview tools.
+</p>
+
+<div style="background-color:#eceff1;padding:1em;">
+<div class="wrap">
+ <div class="cols">
+ <div class="col-4of12">
+ <h5>
+ Hardware and emulator system images
+ </h5>
+
+ <p>
+ Run and test your apps on Nexus 5X, 6P, 9, and Player (for TV), as well
+ as emulator.
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Latest platform code
+ </h5>
+
+ <p>
+ We’ll provide multiple updates during the Preview, so you’ll be testing
+ against the latest platform changes.
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Updates delivered by OTA
+ </h5>
+
+ <p>
+ You can get updates over-the-air, once you’ve flashed a
+ device to the initial preview.
+ </p>
+ </div>
+ </div>
+
+ <div class="cols">
+
+
+ <div class="col-4of12">
+ <h5>
+ New behaviors and capabilities
+ </h5>
+
+ <p>
+ Start work early to support new platform behaviors such as
+ the new runtime permissions model and power-saving features.
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Priority window for developer-reported issues
+ </h5>
+
+ <p>
+ During the first several weeks we’ll give priority to developer-reported
+ issues, so test and give feedback as soon as possible.
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Feedback and support
+ </h5>
+
+ <p>
+ Report issues and give us feedback using our <a href=
+ "https://code.google.com/p/android-developer-preview/">issue tracker</a>.
+ Connect with other developers in the <strong>Developer Community</strong>.
+
+ </p>
+ </div>
+ </div>
+</div>
+</div>
+
+<!--
+<p>
+ With the Preview, you'll get an early start on testing your apps,
+ with enough time to make adjustments before the public platform release later
+ in the year. We'll provide several updates to the Preview tools in the weeks
+ ahead, so you can keep in sync with the latest changes as the platform moves
+ toward launch.
+</p>
+
+<p>
+ You can help us improve the platform by <a href=
+ "https://code.google.com/p/android-developer-preview/">reporting issues</a>
+ through our feedback channels. This is especially
+ critical in the first month of the preview, when we’ll be giving priority to
+ developer-reported issues and feedback.
+</p> -->
+
+
+<h2 id="timeline">
+ Timeline and updates
+</h2>
+<p>
+ The Preview runs from March 9 until the final Android N public release planned for Q3
+ 2016.
+</p>
+
+<p>
+ As you test and develop on Android N, we strongly recommend <strong>keeping
+ your development environment up-to-date</strong> as Preview updates are released.
+ To make the process easier, we'll deliver <strong>updates over-the-air
+ (OTA)</strong> to devices already flashed to a Preview build, as well as
+ providing system images that you can download and flash manually.
+</p>
+
+<p>
+ We’ll notify you when Preview updates are available via the <a href=
+ "http://android-developers.blogspot.com/">Android Developers Blog</a>, as
+ well as this site and the <strong>Android N Developer Community</strong>.
+</p>
+
+<h2 id="preview_tools">
+ What’s in the Preview?
+</h2>
+
+<p>
+ The Preview includes everything you need to test your existing
+ apps on a variety of screen sizes, network technologies, CPU/GPU chipsets,
+ and hardware architectures.
+</p>
+
+<h4>
+ SDK tools
+</h4>
+
+<p>
+ You can download these components through the SDK Manager in <a href=
+ "{@docRoot}sdk/installing/adding-packages.html">Android Studio</a>:
+</p>
+
+<ul>
+ <li><strong>Official Preview SDK and tools</strong>
+ </li>
+
+ <li>N Preview <strong>emulator system image</strong> (32-bit &
+ 64-bit)
+ </li>
+
+ <li>N Preview <strong>emulator system Image for Android TV</strong>
+ (32-bit)
+ </li>
+</ul>
+
+<h4>
+ Hardware system images
+</h4>
+
+<p>
+ You can download these hardware system images for Nexus devices from the
+ <a href="download.html">Downloads page</a>:
+</p>
+
+<ul>
+ <li>
+ <strong>Nexus 5X</strong> (GSM/LTE) "bullhead" device system image
+ </li>
+
+ <li>
+ <strong>Nexus 6P</strong> (GSM/LTE) “angler” device system image
+ </li>
+
+ <li>
+ <strong>Nexus 9</strong> (Wi-Fi) “volantis” device system image
+ </li>
+
+ <li>
+ <strong>Nexus Player</strong> (Android TV) “fugu” device system image
+ </li>
+</ul>
+
+<h4>
+ Documentation and sample code
+</h4>
+
+<p>
+ These documentation resources help you learn about the Preview:
+</p>
+
+<ul>
+ <li>
+ <a href="setup-sdk.html">Set Up the SDK</a> has step-by-step instructions
+ for getting started.
+ </li>
+
+ <li>
+ <a href="{@docRoot}preview/testing/guide.html">Testing Guide</a> and <a href=
+ "behavior-changes.html">Behavior Changes</a> point you to key areas to test.
+ </li>
+
+ <li>Documentation of new APIs, including an <a href="api-overview.html">API Overview</a>,
+ downloadable <a href="{@docRoot}preview/download.html#docs">API Reference</a>, and detailed developer guides on
+ key features such as
+ <a href="{@docRoot}preview/features/runtime-permissions.html">permissions</a>,
+ <a href="{@docRoot}preview/backup/index.html">app backup</a>, and others.
+ </li>
+
+ <li>
+ <a href="{@docRoot}preview/samples.html">Sample code</a> that demonstrates how to support
+ permissions and other new features.
+ </li>
+
+ <li>
+ <a href="{@docRoot}preview/support.html#release-notes">Release notes</a> for the current version
+ of the Preview, including change notes and diff reports.
+ </li>
+</ul>
+
+<h4>
+ Support resources
+</h4>
+
+<p>
+ Use these support resources as you test and develop on the Preview:
+</p>
+
+<ul>
+ <li><a href="https://code.google.com/p/android-developer-preview/">Preview Issue Tracker</a>
+ is your <strong>primary feedback
+ channel.</strong> You can report bugs, performance issues, and general
+ feedback through the issue tracker. You can also check for <a
+ href="https://code.google.com/p/android-developer-preview/wiki/KnownIssues">known issues</a>
+ and find workaround steps.
+ </li>
+
+ <li><strong>Android N Developer Community</strong> is a Google+ community where you can
+ <strong>connect with other developers</strong> working with Android M. You can share
+ observations or ideas or find answers to questions about Android M.
+ </li>
+</ul>
+
+
+<h2 id="get_started">
+ How to get started
+</h2>
+
+<p>
+ To get started testing your app with the Preview:
+</p>
+
+<ol>
+ <li>Review the <a href="{@docRoot}preview/api-overview.html">API Overview</a>
+ and <a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a> to get an
+ idea of what's new and how it affects your apps. In particular, learn about
+ the new <a href="{@docRoot}preview/features/runtime-permissions.html">runtime
+ permissions</a> model, power-saving features, and auto backup.
+ </li>
+
+ <li>Set up your environment by following the instructions for
+ <a href="{@docRoot}preview/setup-sdk.html">Setting up the Preview SDK</a>
+ and configuring test devices.
+ </li>
+
+ <li>Follow the <a href="https://developers.google.com/android/nexus/images">
+ flashing instructions</a> to flash the latest M developer preview system image
+ for Nexus 5, 6, 9, and Player. Once you've flashed your development device,
+ Preview updates will be delivered through over-the-air (OTA) updates.</a>
+ </li>
+
+ <li>Review the <a href="{@docRoot}reference/packages.html">API
+ Reference</a> and <a href="{@docRoot}preview/samples.html">N Preview
+ samples</a> to gain more insight into new API features and how to use them in
+ your app.
+ </li>
+
+ <li>Join the <strong>Android M
+ Developer Community</strong> to get the latest news and connect with other
+ developers working with the new platform.
+ </li>
+</ol>
+
+<p>
+ Thank you for your participation in the Android N Developer Preview program!
+</p>
diff --git a/docs/html/preview/permission-changes.jd b/docs/html/preview/permission-changes.jd
new file mode 100644
index 0000000..768987d
--- /dev/null
+++ b/docs/html/preview/permission-changes.jd
@@ -0,0 +1,45 @@
+page.title=Permissions
+page.metaDescription=Updates to permissions in the N Developer Preview.
+page.keywords="android N", "permissions"
+
+@jd:body
+
+<!-- Commenting TOC out until/unless page gets longer
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#GET_ACCOUNTS">GET_ACCOUNTS deprecated</a></li>
+ <li><a href="#storage">New storage option:
+ ACTION_OPEN_EXTERNAL_DIRECTORY</a></li>
+ </ol>
+ </div>
+</div>
+-->
+
+<p>
+ The N Developer Preview includes the following changes to permissions.
+</p>
+
+<h2 id="GET_ACCOUNTS">GET_ACCOUNTS deprecated</h2>
+<p>
+ The <code>GET_ACCOUNTS</code> permission is now deprecated. The system ignores
+ this permission for apps that target the N Developer Preview.
+</p>
+
+<h2 id="storage">New storage option: ACTION_OPEN_EXTERNAL_DIRECTORY</h2>
+
+<p>
+ Apps can now use the intent <code>ACTION_OPEN_EXTERNAL_DIRECTORY</code> to
+ request that the system create a directory for the app's use. The system
+ prompts the user to grant approval. If the user approves, the app can read
+ and write files and directories in that one directory (and its descendants).
+ The app does not need {@link android.Manifest.permission_group#STORAGE
+ STORAGE} permissions to access this external directory.
+</p>
+
+<p>
+ For more information about this intent, see the <code>Intent</code>
+ documentation in the <!--TODO: Add link to preview download page-->N Preview
+ SDK Reference.
+</p>
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
new file mode 100644
index 0000000..efc9aa4
--- /dev/null
+++ b/docs/html/preview/preview_toc.cs
@@ -0,0 +1,132 @@
+<ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/overview.html"
+ es-lang="Información general del programa"
+ ja-lang="プログラム概要"
+ ko-lang="프로그램 개요"
+ pt-br-lang="Visão geral do programa"
+ ru-lang="Обзор программы"
+ zh-cn-lang="计划概览"
+ zh-tw-lang="程式總覽">
+ Program Overview</a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/setup-sdk.html"
+ es-lang="Configurar el SDK de la versión preliminar"
+ ja-lang="Preview SDK のセットアップ"
+ ko-lang="미리 보기 SDK 설정하기"
+ pt-br-lang="Configuração do Preview SDK"
+ ru-lang="Настройка пакета SDK Preview"
+ zh-cn-lang="设置预览版 SDK"
+ zh-tw-lang="設定預覽版 SDK">
+ SDK Setup</a></div>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/behavior-changes.html"
+ es-lang="Cambios en los comportamientos"
+ ja-lang="動作の変更点"
+ ko-lang="동작 변경"
+ pt-br-lang="Mudanças de comportamento"
+ ru-lang="Изменения в работе"
+ zh-cn-lang="行为变更"
+ zh-tw-lang="行為變更">Behavior Changes
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>preview/features/background-optimization.html"
+ >Background Optimizations</a></li>
+ <li><a href="<?cs var:toroot ?>preview/features/notification-updates.html"
+ >Bundled Notifications</a></li>
+ <li><a href="<?cs var:toroot ?>preview/features/multilingual-support.html"
+ >Language and Locale</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/api-overview.html"
+ es-lang="Información general de la API"
+ ja-lang="API の概要"
+ ko-lang="API 개요"
+ pt-br-lang="Visão geral da API"
+ ru-lang="Обзор API-интерфейсов"
+ zh-cn-lang="API 概览"
+ zh-tw-lang="API 總覽">New APIs and Features
+ </a></div>
+ <ul>
+
+ <li><a href="<?cs var:toroot ?>preview/features/multi-window.html"
+ >Multi-Window Support</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/data-saver.html"
+ >Data Saver</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/tv-recording-api.html"
+ >TV Recording</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/icu4j-framework.html"
+ >ICU4J Support in Framework</a></li>
+
+ </ul>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/samples.html"
+ es-lang="Ejemplos"
+ ja-lang="サンプル"
+ ko-lang="샘플"
+ pt-br-lang="Exemplos"
+ ru-lang="Примеры"
+ zh-cn-lang="示例"
+ zh-tw-lang="範例">
+ Samples</a></div>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/download.html"
+ >Image Downloads and OTA Updates</a></div>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/support.html">
+ Support and Release Notes</a></div>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/license.html"
+ es-lang="Contrato de licencia"
+ ja-lang="使用許諾契約"
+ ko-lang="라이선스 계약"
+ pt-br-lang="Contrato de licença"
+ ru-lang="Лицензионное соглашение"
+ zh-cn-lang="许可协议"
+ zh-tw-lang="授權協議">
+ License Agreement</a></div>
+ </li>
+
+</ul>
diff --git a/docs/html/preview/samples.jd b/docs/html/preview/samples.jd
new file mode 100644
index 0000000..7f0e934
--- /dev/null
+++ b/docs/html/preview/samples.jd
@@ -0,0 +1,82 @@
+page.title=Samples
+page.tags="preview", "samples", "android"
+page.image=images/cards/samples-new_2x.png
+@jd:body
+
+<p>
+ The following code samples are provided for the N Developer Preview. To
+ download the samples in Android Studio, select the <b>File > Import
+ Samples</b> menu option.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> These downloadable projects are designed
+ for use with Gradle and Android Studio.
+</p>
+
+
+<h3 id="mw">Multi-Window Playground</h3>
+<p>
+ This sample demonstrates how to take advantage of multiple window
+ user interfaces with your app.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-MultiwindowPlayground">
+ Get it on GitHub</a>
+</p>
+
+
+<h3 id="notifications">Notifications</h3>
+<p>
+ This sample is updated to demonstrates how to take advantage of new
+ notifications features available in the N Developer Preview.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-Notifications">
+ Get it on GitHub</a>
+</p>
+
+
+<h3 id="jobsched">JobScheduler</h3>
+<p>
+ This sample demonstrates how to use the JobScheduler API to schedule
+ background tasks when certain conditions apply, such as network or charging
+ state.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-JobScheduler">
+ Get it on GitHub</a>
+</p>
+
+
+<h3 id="fbe">File Based Encryption</h3>
+<p>
+ This sample demonstrates how to store and access data in a device encrypted
+ storage which is always available while the device is booted.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-FileBasedEncryption">
+ Get it on GitHub</a>
+</p>
+
+
+<h3 id="sda">Scoped Directory Access</h3>
+<p>
+ This sample demonstrates how to read and write data from specific
+ directories, while requiring fewer permissions.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-ScopedDirectoryAccess">
+ Get it on GitHub</a>
+</p>
+
+
+<h3 id="AutomaticBackup">Drag and Drop</h3>
+<p>
+ This sample demonstrates how to use drag and drop user interface feature
+ between windows, when using a multi-window view.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-DragAndDrop">
+ Get it on GitHub</a>
+</p>
\ No newline at end of file
diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd
new file mode 100644
index 0000000..ea5eaf6
--- /dev/null
+++ b/docs/html/preview/setup-sdk.jd
@@ -0,0 +1,268 @@
+page.title=Set Up the SDK
+meta.keywords="preview", "android"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-sdk_2x.png
+
+@jd:body
+
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#get-as13">Get Android Studio 2.1</a></li>
+ <li><a href="#get-sdk">Get the Preview SDK</a></li>
+ <li><a href="#java8">Get the Java 8 JDK</a></li>
+ <li><a href="#create-update">Create or Update a Project</a></li>
+ <li><a href="#setup-test">Set Up for Testing</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ You must have a development enviroment to make use of the Android N Developer
+ Preview. This document describes how to setup and configure a development
+ environment so you can use and test the Preview SDK.
+</p>
+
+<p>
+ This document assumes that you are familiar with Android app development,
+ such as using the Android SDK Manager and creating projects. If you are new
+ to Android, see
+ <a href="{@docRoot}training/basics/firstapp/index.html">Building Your First
+ App</a> training lesson first.
+</p>
+
+
+<h2 id="get-as13">Get Android Studio 2.1</h2>
+
+<p>
+ The Developer Preview is best used with Android Studio 2.1, which is also in
+ preview status. If you have an existing version of Android Studio you are
+ using for development, you should install a separate instance of Android
+ Studio for use with the Preview. This section describes how to install
+ an instance of Android Studio and update to version 2.1.
+</p>
+
+<p class="caution">
+ <strong>Caution:</strong> The canary preview of Android Studio 2.1 is still
+ in active development. If you are using your primary development machine to
+ test the developer preview, you should create a second installation of
+ Android Studio to use for testing the Developer Preview.
+</p>
+
+<p>To install Android Studio and update to version 2.1:</p>
+
+<ol>
+ <li>Download, install, and launch the current version of
+ <a href="{@docRoot}tools/studio/index.html">Android Studio</a>.
+ </li>
+
+ <li>In Android Studio, open the <em>Settings</em> dialog and in the left
+ panel, choose <strong>Appearance & Behavior > System Settings >
+ Updates</strong>.
+ <ul>
+ <li>On Windows and Linux, open <em>Settings</em> by choosing
+ <strong>File > Settings</strong>.
+ </li>
+ <li>On Mac OS, open <em>Settings</em> by choosing
+ <strong>Android Studio > Preferences</strong>.
+ </li>
+ </ul>
+ </li>
+
+ <li>On the <em>Updates</em> panel, make sure the <strong>Automatically
+ check updates for</strong> option is selected and choose the
+ <strong>Canary Channel</strong> option.
+ </li>
+
+ <li>On the <em>Updates</em> panel, click <strong>Check Now</strong>
+ to check for the latest canary build. Allow the software to download
+ and install the canary version when prompted.
+ </li>
+</ol>
+
+
+<h2 id="java8">Get the Java 8 JDK</h2>
+
+<p>
+ You must use the Java 8 Development Kit with the N Developer Preview. If you
+ do not have this version of the JDK installed, download and install it before
+ working with the Preview SDK.
+</p>
+
+<p>To set the JDK version in Android Studio:</p>
+
+<ul>
+ <li>Make sure you have installed the Java 8 JDK, and make a note of its
+ directory location on your development computer.</li>
+ <li>With a development project open in Android Studio, open the
+ <em>Project Structure</em> dialog by choosing <strong>File >
+ Project Structure</strong>.
+ </li>
+ <li>In the left panel of the dialog, click <strong>SDK Location</strong>.
+ </li>
+ <li>In the <strong>JDK Location</strong> field, enter the location of the
+ Java 8 JDK, and click <strong>OK</strong>.
+ </li>
+</ul>
+
+
+<h2 id="get-sdk">Get the Preview SDK</h2>
+
+<p>To add the Preview SDK to your Android Studio 2.1 development
+ environment:</p>
+
+<ol>
+ <li>Launch Android Studio 2.1.
+ </li>
+
+ <li>In Android Studio, open the <em>Settings</em> dialog and in the left
+ panel, choose <strong>Appearance & Behavior > System Settings >
+ Updates</strong>.
+ <ul>
+ <li>On Windows and Linux, open <em>Settings</em> by choosing
+ <strong>File > Settings</strong>.
+ </li>
+ <li>On Mac OS, open <em>Settings</em> by choosing
+ <strong>Android Studio > Preferences</strong>.
+ </li>
+ </ul>
+ </li>
+
+ <li>On the <em>Updates</em> panel, make sure the <strong>Automatically
+ check updates for Android SDK</strong> option is selected and choose the
+ <strong>Preview Channel</strong> option.
+ </li>
+
+ <li>In the <em>Settings</em> dialog left panel, choose
+ <strong>Appearance & Behavior > System Settings >
+ Android SDK</strong>.
+ </li>
+
+ <li>Click the <strong>SDK Platforms</strong> button, and then select
+ <strong>Android N Preview</strong>.
+ </li>
+
+ <li>Click the <strong>SDK Tools</strong> button, and select the latest
+ Android <strong>SDK Tools</strong>, <strong>Platform-tools</strong>, and
+ <strong>Build-tools</strong> versions.
+ </li>
+
+ <li>Click <strong>OK</strong> and then accept the licensing
+ agreements for the packages to be installed.
+ </li>
+</ol>
+
+<p>After completing these steps, the preview components are available in your
+ development environment. </p>
+
+
+<h2 id="create-update">Create or Update a Project</h2>
+
+<p>
+ In order to use the preview APIs, you must create or update a development
+ project to use the preview components.
+</p>
+
+
+<h3 id="create">Create a new project</h3>
+
+<p>
+ Use the Android Studio new project wizard to create a project. For detailed
+ information on how to create a project with this too, see
+ <a href="{@docRoot}sdk/installing/create-project.html">Creating a Project</a>.
+</p>
+
+<p>To create a new project using the Preview SDK:</p>
+
+<ol>
+ <li>Start the New Project wizard and follow the steps until you reach the
+ <em>Target Android Devices</em> page.
+ </li>
+ <li>On this page, select <strong>Phone and Tablet</strong> option.</li>
+ <li>Under <strong>Phone and Tablet</strong> option, in the <strong>Minimum
+ SDK</strong> option list, select <strong>Android N Preview</strong>.</li>
+</ol>
+
+
+<h3 id="update">Update an existing project</h3>
+
+<p>
+ For existing projects, you must modify the project configuration to use the
+ Preview APIs. In your development environment, open the
+ <code>build.gradle</code> file for your module and set these values as
+ follows:
+</p>
+
+<pre>
+android {
+ compileSdkVersion <strong>'android-N'</strong>
+ ...
+
+ defaultConfig {
+ ...
+ minSdkVersion <strong>'N'</strong>
+ targetSdkVersion <strong>'N'</strong>
+ ...
+ }
+ ...
+}</pre>
+
+
+
+<h2 id="setup-test">Set Up for Testing</h2>
+
+<p>
+ Testing an app with the preview requires that you have a device or virtual
+ device configured with the preview version of the platform. If you have a
+ compatible device, you can install the preview platform for testing.
+ Otherwise, you can configure a virtual device for testing.
+</p>
+
+<h3 id="setup-device">Set up a physical device</h3>
+
+<p>
+ If you have a Nexus 5X, Nexus 6P, Nexus 9, or Nexus Player, you can install a
+ preview system image on these devices for testing your app. You can set up a
+ virtual device with the preview version of the platform from within Android
+ Studio using the Android Virtual Device Manager tool.
+</p>
+
+<p class="caution">
+ <strong>Important:</strong> Installing a preview image on a device
+ <em>removes all data from it</em>, so you should backup any data before
+ installing a preview image.
+</p>
+
+<h3 id="setupAVD">Set up a virtual device</h3>
+
+<p>
+ You can set up virtual device with the preview version of the platform from
+ within Android Studio using the Android Virtual Device Manager tool.
+</p>
+
+<p>To create an AVD with the AVD Manager:</p>
+
+<ol>
+ <li>Install the Preview SDK in your development environment, as described
+ in <a href="{@docRoot}preview/setup-sdk.html">Setting Up the Preview
+ SDK.</a></li>
+ <li>Follow the steps in
+ <a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD
+ Manager</a>. Use the following settings:
+ <ul>
+ <li><strong>Device:</strong>
+ Nexus 5X, Nexus 6P, Nexus 9, or Android TV</li>
+ <li><strong>Target:</strong>
+ Android N (Preview) - API Level N</li>
+ <li><strong>ABI:</strong>
+ x86</li>
+ </ul>
+ </li>
+</ol>
+
+<p>
+ For more information about creating virtual devices for testing, see <a href=
+ "{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.
+</p>
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
new file mode 100644
index 0000000..66d3877
--- /dev/null
+++ b/docs/html/preview/support.jd
@@ -0,0 +1,137 @@
+page.title=Support and Release Notes
+meta.keywords="preview", "android"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-support_2x.png
+
+@jd:body
+
+
+<p>
+ Two primary support channels are available to you when developing and testing
+ with the Android N Developer Preview. If you've encountered bugs or have
+ feedback about the N Developer Preview, you can <a href=
+ "https://code.google.com/p/android-developer-preview/">create an issue</a>
+ <strong>***NEED LINK***</strong> on
+ our issue tracker. We'll triage the issue for further review and provide
+ updates as needed.
+</p>
+
+<p>
+ To discuss issues or ideas with other developers working with the N Developer
+ Preview, join the <a href="http://example.com">N Developer
+ Preview Google+ community</a>. <strong>***NEED LINK***</strong>
+</p>
+
+
+
+<h2 id="preview1-notes">
+ Developer Preview 1
+</h2>
+
+<div class="wrap">
+ <div class="cols">
+ <div class="col-6of12">
+ <p>
+ <em>
+ Date: March 2016<br>
+ Build: <strong>TBA</strong><br>
+ Hardware support: <strong>TBA</strong><br>
+ Emulator support: <strong>TBA</strong><br>
+ Google Play services: <strong>TBA</strong><br>
+ </em>
+ </p>
+ </div>
+ </div>
+</div>
+
+<p>
+ Initial release.
+</p>
+
+<h3 id="ki-p1">
+ Known issues
+</h3>
+
+<h4 id="ki-g-p1">General issues:</h4>
+
+<ul>
+ <li>Dialer does not currently support Direct Boot.
+ </li>
+
+ <li>Some new or modified strings in the system UI are not translated to all
+ languages.
+ </li>
+
+ <li>
+ <strong>Settings</strong> controls and toggles may be slow or appear to be
+ unresponsive.
+ </li>
+
+ <li>Android for Work:
+ <ul>
+ <li>After migrating to (or creation on) N Developer Preview, work
+ profiles can't create keys in keystore until the pattern/PIN/password is
+ changed or a Work Challenge is set up.
+ </li>
+
+ <li>In Direct Boot mode, when passcode restrictions are applied to the
+ device, the work profile may be unlocked even though the device is
+ locked.
+ </li>
+ </ul>
+ </li>
+</ul>
+
+<!--
+
+<h4 id="">[Platform Name] issues:</h4>
+
+<ul>
+ <li>TBA: Issues for that platform</li>
+ </li>
+</ul>
+
+<h4 id="">[Platform Name] issues:</h4>
+
+<ul>
+ <li>TBA: Issues for that platform</li>
+ </li>
+</ul>
+
+<h4 id="">[Platform Name] issues:</h4>
+
+<ul>
+ <li>TBA: Issues for that platform</li>
+ </li>
+</ul>
+
+-->
+
+<p>
+ For a complete list of reported issues, please refer to the <a href=
+ "https://code.google.com/p/android/issues/list">open issues list</a> on the
+ Developer Preview <a href=
+ "https://code.google.com/p/android-developer-preview/">issue tracker</a>.
+ <strong>***NEED LINKS***</strong>
+</p>
+
+<h3 id="preview1-get">
+ Get the N Developer Preview
+</h3>
+
+<p>
+ You can download the N Developer Preview platform and emulator images from
+ the SDK Manager. <strong>***Is this true?***</strong>
+</p>
+
+<p>
+ For instructions on how to download and flash your device to the Developer
+ Preview, see the links and instructions on the <a href=
+ "{@docRoot}preview/download.html">Downloads</a> page.
+</p>
+
+<p>
+ For instructions on how to start developing and testing with the N
+ Developer Preview, read
+ <a href="{@docRoot}preview/setup-sdk.html">Set up the SDK</a>.
+</p>