Merge "docs: Wear preview docs: Get Started, Download/Test, Program Overview" into mnc-io-docs am: e8d7012fba

am: 97158b85ec

* commit '97158b85ec07c22b0aca39ffaf0c8172751c0a65':
  docs: Wear preview docs: Get Started, Download/Test, Program Overview

Change-Id: I549ab462afb03184118a00aa3bcfdb45284b4288
This commit is contained in:
Bert McMeen
2016-05-13 21:35:03 +00:00
committed by android-build-merger
3 changed files with 757 additions and 346 deletions

View File

@@ -1,10 +1,9 @@
page.title=Preview Downloads page.title=Download and Test with a Device
meta.tags="wear-preview", "system image", "download" meta.keywords="wear-preview"
page.tags="wear" page.tags="wear-preview"
page.image=images/cards/card-n-downloads_2x.png page.image=images/cards/card-n-sdk_2x.png
@jd:body @jd:body
<div style="position:relative; min-height:600px"> <div style="position:relative; min-height:600px">
<div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;"> <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
@@ -167,245 +166,393 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
<div id="qv-wrapper"> <div id="qv-wrapper">
<div id="qv"> <div id="qv">
<h2>In this document</h2>
<ol> <ol>
<li><a href="#device-preview">Set up a hardware device</a> <li>
<ol> <a href="#set_up_a_watch">Set Up a Watch</a>
<li><a href="#flash">Flash a device</a></li> </li>
<li><a href="#revertDevice">Uninstalling the Preview</a></li>
</ol> <li>
<a href="#set_up_an_emulator">Set Up an Emulator</a>
</li> </li>
<li><a href="#setupAVD">Set up an emulator</a></li>
</ol> </ol>
</div> </div>
</div> </div>
<p> <p>
To run and test your app with the Wear Developer Preview, you need to set up You can run and test your app with the Android Wear 2.0 Developer Preview
a runtime environment. You can do that in either of these ways: in either of these ways:
</p> </p>
<ul> <ul>
<li>Install a Wear Preview system image on a supported hardware device,</li> <li>Install Android Wear 2.0 on a supported watch, or
<li>Set up an Android emulator running the Wear Developer Preview</li> </li>
<li>Set up an emulator that is running Android Wear 2.0
</li>
</ul> </ul>
<p> <p>
If you want an environment for basic compatibility testing of your app on the If you want an environment for basic <strong>compatibility
new platform, all you need is your current APK and a hardware device or testing</strong> of your app, you can use your current APK and a
emulator. You don't necessarily need to update your full development supported watch or an emulator. As described below, you don't necessarily
environment to do basic testing. need to update your full development environment to do basic testing.
</p> </p>
<p> <p>
If you want to modify your app to target the Wear Preview or use the Wear However, if you want to <strong>modify</strong> your app to target
Preview APIs, you need to set up a development environment that's updated Android Wear 2.0 or use new APIs, you need to update your development
to support the Wear Preview. For more information, see environment. See <a href="{@docRoot}wear/preview/start.html">Get Started
<a href="{@docRoot}wear/preview/start.html">Get Started with Wear Preview</a>. with the Android Wear 2.0 Preview</a>.
</p> </p>
<h2 id="set_up_a_watch">
<h2 id="downloads">Download Files</h2> Set Up a Watch
</h2>
<h3 id="docs-dl">Reference documentation</h3>
<p> <p>
Detailed information about the Wear Preview APIs is available in the You can download a system image and manually flash it to a matching
reference documentation, which you can download from the following table. watch. See the table below to download the system image for your test
This package contains an abridged, offline version of the Android developer watch.
web site, and includes an updated API reference for the Wear Preview APIs </p>
and an API difference report.
<p>
Manually flashing a watch is useful if you need precise control over the
test environment or need to reinstall frequently, such as for automated
testing.
</p>
<p>
Installing a system image on a watch <strong>removes all data from the
watch</strong>, so you should back up your data first.
</p>
<h3 id="preview_system_images">
Preview system images
</h3>
<p>
The preview includes system images for testing your app. Based on your
device, you can download a preview system image from the following tables
and flash it to the corresponding device.
</p>
<h4 id="preview_image_for_lge_watch_urbane_2nd_edition">
Preview image for LGE Watch Urbane 2nd Edition
</h4>
<p>
<strong>Please note the following:</strong>
Flashing your device will
require unlocking the bootloader which may
void the device's warranty--proceed at your own risk.
</p> </p>
<table> <table>
<tr> <tr>
<th scope="col">Documentation</th> <th scope="col">
<th scope="col">Checksums</th> Type of LGE Watch Urbane 2nd Edition image
</th>
<th scope="col">
Download/Checksums
</th>
</tr> </tr>
<tr> <tr id="download-3-placeholder">
<td style="white-space: nowrap"> <td>
<a href="{@docRoot}shareables/preview/n-preview-1-docs.zip" Preview image for testing
>n-preview-1-docs.zip</a></td> </td>
<td width="100%"> <td><a href="#top" onclick="onDownload(this)">download-3-placeholder.tgz</a><br>
MD5: 4ab33ccbe698f46f125cc5b807cf9c2f<br> MD5: [string]<br>
SHA-1: 6a3880b3ccd19614daae5a4d0698ea6ae11c20a5 SHA-1: [string]
</td> </td>
</tr> </tr>
<table> <tr id="download-4-placeholder">
<td>
<h3 id="images-dl">Device system images</h3> Non-preview image (for after testing)
</td>
<p> <td><a href="#top" onclick="onDownload(this)">download-4-placeholder.tgz</a><br>
The following device system images can be used to update a compatible device MD5: [string]<br>
with the Wear Preview for testing. For information on installing these SHA-1: [string]
images, see <a href="#device-preview">Set up a Hardware Device</a>.
</p>
<table>
<tr>
<th scope="col">Device</th>
<th scope="col">Download / Checksums</th>
</tr>
<tr id="sprat">
<td>Gear Live <br>"sprat"</td>
<td><a href="#top" onclick="onDownload(this)"
>sprat-XXXXX-preview-d86c7559.tgz</a><br>
MD5: d84b6c31a7754e505149594887b3481a<br>
SHA-1: d86c7559c93724cca6af91040b012c48529f2c94
</td> </td>
</tr> </tr>
</table> </table>
<h4 id="preview_image_for_huawei_watch">
Preview image for Huawei Watch
<h2 id="device-preview">Set up a Hardware Device</h2> </h4>
<p> <p>
The Wear Developer Preview offers system updates for a range of hardware devices <strong>Please note the following:</strong>
that you can use for testing your app, from phones to tablets and TV. Flashing your device will require unlocking
the bootloader which
shall void the device's warranty--proceed at your own risk.
</p> </p>
<table>
<tr>
<th scope="col">
Type of Huawei Watch image
</th>
<th scope="col">
Download/Checksums
</th>
</tr>
<tr id="download-1-placeholder">
<td>
Preview image for testing
</td>
<td><a href="#top" onclick="onDownload(this)">download-1-placeholder.tgz</a><br>
MD5: [string]<br>
SHA-1: [string]
</td>
</tr>
<tr id="download-2-placeholder">
<td>
Non-preview image (for after testing)
</td>
<td><a href="#top" onclick="onDownload(this)">download-2-placeholder.tgz</a><br>
MD5: [string]<br>
SHA-1: [string]
</td>
</tr>
</table>
<h3 id="flash_a_watch">
<h3 id="flash">Flash a device</h3> Flash a watch
</h3>
<p> <p>
At any time you can download the latest Developer Preview system image and The steps for flashing an image to a watch are similar to the <a href=
manually flash it to your device. See the table below to download the system "https://developers.google.com/android/nexus/images">steps provided for
image for your test device. Manually flashing a device is useful if you need flashing to a phone</a>. After you <strong>back up your watch
precise control over the test environment or need to reinstall frequently, data</strong>, use steps in this section to flash the image to the
such as for automated testing. <strong>specific watch</strong> that matches the image (e.g., you must
use an LGE Watch Urbane 2nd Edition for the corresponding image).
</p> </p>
<h4 id="set_up_the_watch_to_be_flashed">
Set up the watch to be flashed
</h4>
<p> <p>
Installing a system image on a device <strong>removes all data from the On the watch, enable the Developer Options menu and ADB debugging as
device</strong>, so you should back up your data first. follows:
</p> </p>
<p>
After you back up your device data and download the system image below that
matches your device, 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.
</p>
<h3 id="revertDevice">Uninstalling the Preview</h3>
<p>
If you want to uninstall the preview from a device, you can do so in one of
these ways: </p>
<ul>
<li><strong>Obtain a factory spec system image</strong> and then manually
flash it to the device.
<ul>
<li>For <strong>Nexus devices and Pixel C devices</strong>, see
the <a href="http://developers.google.com/android/nexus/images">Factory Images
for Nexus Devices</a> page for downloads. </li>
<li>For <strong>other devices</strong>, please contact the device manufacturer
directly. Alternatively, if the device is supported
in the Android Beta Program, you can enroll the device in the
program and then un-enroll it (see below).</li>
</ul>
</li>
<li><strong>Un-enroll the device from Android Beta Program</strong>. If the
device is enrolled in the <a href="https://g.co/androidbeta">Android Beta
Program</a>, regardless of device, you can simply un-enroll it from the program.
<p>
The device will receive an OTA update to the most recent production version
of Android available for that device (for example, Android 6.0 Marshmallow).
The update requires a full device reset, so user data on the device will be
removed. Make sure to <strong>back up important data</strong> before
un-enrolling a device.
</p>
</li>
</ul>
<p class="note"><strong>Note:</strong>
Uninstalling a Developer Preview system image prior to
the end of the program requires a full device reset and removes all user data
on the device.
</p>
<h2 id="setupAVD">Set up an emulator</h2>
<p>To use the Android Emulator to run the Wear Preview, you need to
download the Wear Preview SDK and create a virtual device for the
emulator.</p>
<p>First, download the Wear Preview SDK as follows (if you
already got it while <a href="{@docRoot}preview/setup-sdk.html">setting up
to develop for Android N</a>, you can skip this part):
<ol> <ol>
<li>In Android Studio, open the Settings dialog <li>Open the Settings menu on the watch.
(<strong>File &gt; Settings</strong> on Windows/Linux, or
<strong>Android Studio &gt; Preferences</strong> on Mac). In the left
panel, select <strong>Appearance &amp; Behavior &gt;
System Settings &gt; Android SDK</strong>.
<li>Click the <strong>SDK Platforms</strong> tab, then select the
<strong>Wear Preview</strong> check box.</li>
<li>Click the <strong>SDK Tools</strong> tab, then select the
<strong>Android SDK Build Tools</strong>, <strong>Android SDK
Platform-Tools</strong>, and <strong>Android SDK Tools</strong> check
boxes.
</li> </li>
<li>Click <strong>OK</strong> and accept the license <li>Scroll to the bottom of the menu. If no <strong>Developer
agreements for any packages to be installed. Options</strong> item is provided, tap <strong>About</strong>.
</li>
<li>Tap the build number 7 times.
</li>
<li>From the Settings menu, tap the <strong>Developer Options</strong>
item.
</li>
<li>Enable ADB debugging.
</li> </li>
</ol> </ol>
<p>You should now have <strong>Android SDK Built-Tools 24.0 0 rc1</strong>, <h4 id="confirm_installation_of_the_fastboot_tool">
<strong>Platform-Tools 24.0.0 rc1</strong>, and <strong>SDK Tools Confirm installation of the fastboot tool
25.0.9</strong>. If you do not update the SDK Tools to 25.0.9, then you won't </h4>
be able to run the x86_64 system images for Android N.</p>
<p>Now create a virtual device with the Wear Preview system image:</p>
<ol>
<li>Open the AVD Manager by selecting <strong>Tools > Android >
AVD Manager</strong>.</li>
<li>Click <strong>Create Virtual Device</strong>.</li>
<li>Select a device such as Nexus 5X, Nexus 6P, Nexus 9, or Android TV,
then click <strong>Next</strong>.</li>
<li>Select the <strong>N</strong> system image (with the
<strong>x86</strong> ABI), then click <strong>Next</strong>.
(Only x86 system images are currently supported with the Android Emulator
for the Wear Preview.)
<li>Complete the rest of the AVD configuration and click
<strong>Finish</strong>.</li>
</ol>
<p>You can now launch the Android Emulator with the Wear Preview AVD.</p>
<p> <p>
For the best experience in the Android Emulator, install To flash a device using one of the <a href=
Android Studio 2.2 Preview, which supports the <a "#preview_system_images">system images</a>, confirm that you have the
href="http://tools.android.com/tech-docs/emulator">Android Emulator 2.0 Beta</a> <code>fastboot</code> tool in the <code>platform-tools/</code> directory
with much faster performance compared to the Emulator in of the <a href="https://developer.android.com/sdk">Android SDK</a>. Be
Android Studio 1.5.</p> sure that you have the latest version of the <strong>Android SDK
Platform-tools</strong> from the <a href=
<p>For more information about creating virtual devices, see <a href= "{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.
"{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.
</p> </p>
<p>
After you confirm that you have the <code>fastboot</code> tool, add the
tool to your PATH environment variable so the tool can be found when you
flash the watch.
</p>
<h4 id="transfer_the_image_to_the_watch">
Transfer the image to the watch
</h4>
<p>
To download a preview image and flash it to the watch:
</p>
<ol>
<li>Download and unzip the appropriate system image from the "Preview
system image" column in the <a href="#preview_system_images">table
above</a>.
</li>
<li>Attach the watch charger to the watch and plug the USB cord (from the
charger) into your computer.
</li>
<li>Use the following <a href="{@docRoot}tools/help/adb.html">adb
command</a> to confirm that the watch is available for flashing:
<code>adb devices</code>
</li>
<li>Use the following adb command to start the device in fastboot mode:
<code>adb reboot bootloader</code>
</li>
<li>If necessary, use <strong>one</strong> of following two commands to
unlock the device's bootloader. This step <strong>erases all data on the
device</strong>: <code>fastboot flashing unlock</code> or, for some
devices, <code>fastboot oem unlock</code>
</li>
<li>Navigate to the directory where you unzipped the system image in Step
1.
</li>
<li>Execute the <code>flash-all</code> script by typing
<code>flash-all.sh</code> or, in the case of Windows,
<code>flash-all.bat</code>.
</li>
</ol>
<p>
After the script finishes, your watch reboots. Pair the watch with a
phone or tablet. The preview now is available for testing on the watch.
Before installing an app, enable the Developer Options menu, and ADB
debugging, on the watch as follows:
</p>
<ol>
<li>Open the Settings menu (on the watch).
</li>
<li>Scroll to the bottom of the menu and tap <strong>About</strong>.
</li>
<li>Tap the build number 7 times.
</li>
<li>From the Settings menu, tap the <strong>Developer Options</strong>
item.
</li>
<li>Enable ADB debugging.
</li>
<li>Connect the watch to your computer and tap <strong>Always allow from
this computer</strong>.
</li>
</ol>
<p>
Your watch is ready for you to <a href=
"{@docRoot}training/wearables/apps/creating.html#Install">install and run
your app</a>:
</p>
<ol>
<li>Open your app in Android Studio.
</li>
<li>Select <strong>wear</strong> from the Run/Debug configuration
drop-down menu.
</li>
<li>Click the Play button.
</li>
<li>In the Select Deployment Target box, click your device.
</li>
</ol>
<p>
After your app is installed on the watch, you are prompted to start the
app on the watch.
</p>
<p>
When testing is completed, follow the steps for <a href=
"#uninstall_the_preview_from_a_watch">uninstalling the preview</a>.
</p>
<h3 id="uninstall_the_preview_from_a_watch">
Uninstall the preview from a watch
</h3>
<p>
When testing with the preview is done, restore the watch as follows:
</p>
<ol>
<li>Download and unzip the appropriate system image from the "Non-preview
system image" column in the <a href="#preview_system_images">table
above</a>.
</li>
<li>Manually flash the image to the watch using steps similar to those in
<a href="#transfer_the_image_to_the_watch">Transfer the image to the
watch</a>, except that you flash the <strong>non-preview</strong> image
to the watch.
</li>
</ol>
<p>
<strong>Note</strong>: Removing a preview system image requires a full
device reset and removes all user data on the device.
</p>
<h2 id="set_up_an_emulator">
Set Up an Emulator
</h2>
<p>
To test with the Android Emulator, create a virtual device in Android
Studio as follows:
</p>
<ol>
<li>Open the AVD Manager by selecting <strong>Tools &gt; Android &gt; AVD
Manager</strong>.
</li>
<li>Click <strong>Create Virtual Device</strong>.
</li>
<li>In the <strong>Category</strong> pane, select Wear, choose a name
(such as Android Wear Round), and click <strong>Next</strong>.
</li>
<li>Select an <strong>N</strong> image to download. The images may be on
the <strong>x86</strong> tab instead of the <strong>Recommended</strong>
tab, until installed. For example, select the image with the
<strong>Release Name</strong> of N, the <strong>API Level</strong> of N,
and the <strong>Target</strong> of "Android 6.X (with Android Wear)".
When the download and installation are complete, click
<strong>Finish</strong> and then click <strong>Next</strong>.
</li>
<li>Verify the configuration of the Android Virtual Device (AVD) and
click <strong>Finish</strong>.
</li>
</ol>
<p>
You can now test an application in the <a href=
"{@docRoot}tools/devices/emulator.html">Android Emulator</a>. For more
information about using virtual devices, see <a href=
"{@docRoot}tools/devices/managing-avds.html">Managing AVDs with the AVD
Manager</a>.
</p>
</div><!-- landing --> </div><!-- landing -->
</div><!-- relative wrapper --> </div><!-- relative wrapper -->
<script> <script>
var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/wear/preview/"; var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/wear/preview/";
function onDownload(link) { function onDownload(link) {

View File

@@ -1,62 +1,255 @@
page.title=Preview Program Overview page.title=Android Wear Preview Program Overview
page.metaDescription=Get your apps ready for the next version of Android. meta.keywords="wear-preview"
page.image=images/cards/card-n-overview_2x.png page.tags="wear-preview"
meta.tags="wear", "wear-preview" page.image=images/cards/card-n-sdk_2x.png
page.tags="wear"
@jd:body @jd:body
<p> <p>
Welcome to the <strong>Wear Developer Preview</strong>, a program that Welcome to the Android Wear 2.0 Developer Preview! This program gives you
gives you everything you need to test and optimize your apps for the next everything you need to get started with the next version of Android Wear.
version of Android Wear. It's free, and you can get started right away just by It’s free, and you can get started right away by downloading the
downloading the Wear Developer Preview tools. Developer Preview resources.
</p> </p>
<h3 id="program_highlights">
Program Highlights
</h3>
<div style="background-color:#eceff1;padding:1em;">
<h2 id="timeline">Timeline and updates</h2> <div class="wrap">
<div class="cols">
<div class="col-4of12">
<h5>
Hardware and emulator images
</h5>
<p> <p>
Lorem ipsum dolor sit amet, consul graecis gloriatur in cum. Porro noster ea Run and test your apps on a range of devices or on an emulator.
nam, omnes tollit facete ut vix. Ut nibh ancillae mei, unum mollis aliquid an
pri. No melius dignissim mel. An eum erant dicit volumus, ut eum animal
convenire.
</p> </p>
</div>
<div class="col-4of12">
<h2 id="preview_tools">What's in the Wear Developer Preview?</h2> <h5>
Latest platform code
</h5>
<p> <p>
Lorem ipsum dolor sit amet, consul graecis gloriatur in cum. Porro noster ea We’ll provide monthly updates during the preview, so you'll be
nam, omnes tollit facete ut vix. Ut nibh ancillae mei, unum mollis aliquid an testing against the latest platform changes.
pri. No melius dignissim mel. An eum erant dicit volumus, ut eum animal
convenire.
</p> </p>
</div>
<div class="col-4of12">
<h2 id="how_to_get_started">How to get started</h2> <h5>
Priority for developer issues
</h5>
<p> <p>
To get started testing your app with the Wear Developer Preview: 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>
<div class="cols">
<div class="col-4of12">
<h5>
New behaviors and capabilities
</h5>
<p>
Start work early to support new platform behaviors such as
complications and Material Design for Wear.
</p>
</div>
<div class="col-4of12">
<h5>
Feedback and support
</h5>
<p>
Report issues and give us feedback using our issue tracker.
Connect with other developers in the Wear Developer Community.
</p>
</div>
<div class="col-4of12">
</div>
</div>
</div>
</div>
<h2 id="timeline_and_updates">
Timeline and Updates
</h2>
<p>
The Android Wear 2.0 Developer Preview runs from 18 May 2016 until the
final Android Wear public release to OEMs, planned for Q4 2016.
</p> </p>
<ol> <p>
<li> Review the <a href="{@docRoot}wear/preview/api-overview.html">API At key development milestones, we'll deliver updates for your development
Overview</a> to and testing environment. In general you can expect updates in
get an idea of what's new and how it affects your apps.</li> approximately 6-week intervals. The release milestones are:
<li>Download the preview API documentation and system images from the </p>
<a href="{@docRoot}wear/preview/downloads.html">Preview Downloads</a>
<ul>
<li>Milestone 1 (initial release, alpha)
</li> </li>
<li> Set up your environment by following the instructions for <a
href="{@docRoot}wear/preview/start.html">Get Started with Wear Preview</a> <li>Milestone 2 (incremental update, beta)
and configuring test devices.</li> </li>
<li> Join the <a href="http://g.co/androidweardev">Android Wear
Developer Community</a> to get the latest news and connect with other <li>Milestone 3 (incremental update, beta)
developers working with the new platform.</li> </li>
</ol>
<li>Milestone 4 (final APIs and official SDK, Play publishing)
</li>
<li>Near-final system image
</li>
<li>Final release to OEMs
</li>
</ul>
<p> <p>
Thank you for participating in the Android Wear Developer Preview program! Each update includes an updated support library, preview system images,
emulator, reference documentation, and API diffs.
</p> </p>
<p>
The first three milestones provide an early test and development
environment to helps you identify compatibility issues in your current
apps and plan migration or feature work needed to target the new
platform. This is the priority period in which to give us your feedback
on features and APIs and file compatibility issues — for all of these,
please use the issue tracker. You can expect some API changes across
these updates.
</p>
<p>
At milestones 4 and 5 you'll have access to the final Android Wear 2.0
APIs and SDK to develop with, as well as near-final system images to test
system behaviors and features. Android Wear 2.0 will use the Android N
API level at this time. You can begin final compatibility testing of your
legacy apps and refine any new code that is using the Android Wear 2.0
APIs or features.
</p>
<p>
As you test and develop on Android Wear 2.0, we strongly recommend
keeping your development environment up-to-date as updates are released.
Updated preview images will be available that you can download and flash
manually.
</p>
<p>
We'll notify you when updates are available via the Android Developers
Blog, as well as via this site and the <a href=
"http://g.co/androidweardev">Android Wear Developer Community on G+</a>.
</p>
<h2 id="what's_in_the_android_wear_2_0_developer_preview">
What's in the Android Wear 2.0 Developer Preview
</h2>
<p>
The preview includes everything you need to test your existing apps on a
variety of hardware configurations.
</p>
<h3 id="developer_resources">
Developer resources
</h3>
<p>
You can download these components through the SDK Manager in <a href=
"{@docRoot}sdk/installing/adding-packages.html">Android Studio</a>. For
more information, see <a href=
"{@docRoot}wear/preview/downloads.html">Download and Test with a
Device</a>.
</p>
<ul>
<li>Android Wear 2.0 Developer Preview <strong>SDK/support
library</strong>
</li>
<li>Android Wear 2.0 Developer Preview <strong>emulator system
image</strong>
</li>
</ul>
<p>
We'll provide updates to these development tools at each milestone as
needed.
</p>
<h3 id="hardware_system_images">
Hardware system images
</h3>
<p>
You can download these hardware system images for Nexus devices from the
Downloads page:
</p>
<ul>
<li>LG Watch Urbane 2nd Edition “nemo”
</li>
<li>Huawei Watch “sturgeon”
</li>
</ul>
<h3 id="documentation_and_sample_code">
Documentation and sample code
</h3>
<p>
These documentation resources help you learn about the preview:
</p>
<ul>
<li>[comment placeholder] Get Started has step-by-step instructions for
setting up the SDK.
</li>
<li>Documentation of new APIs, including an API Overview, downloadable
API Reference, and developer guides on key features such as
complications, design patterns for Wear, and building standalone Android
Wear apps.
</li>
<li>Sample code that demonstrates how to implement [comment placeholder]
complications and other new features.
</li>
</ul>
<h3 id="support_resources">
Support Resources
</h3>
<p>
Use these support resources as you test and develop on the Android Wear
2.0 Developer Preview:
</p>
<ul>
<li>Wear Developer Preview Issue Tracker is your primary feedback
channel. You can report bugs, performance issues, and general feedback
through the issue tracker. You can also check for known issues and find
workaround steps.
</li>
<li>The <a href="http://g.co/androidweardev">Wear Developer Community</a>
is a Google+ community where you can connect with other developers
working with Android Wear. You can share observations or ideas or find
answers to questions about Android Wear.
</li>
</ul>

View File

@@ -1,4 +1,4 @@
page.title=Get Started with Wear Preview page.title=Get Started with the Android Wear 2.0 Developer Preview
meta.keywords="wear-preview" meta.keywords="wear-preview"
page.tags="wear-preview" page.tags="wear-preview"
page.image=images/cards/card-n-sdk_2x.png page.image=images/cards/card-n-sdk_2x.png
@@ -9,131 +9,202 @@ page.image=images/cards/card-n-sdk_2x.png
<div id="qv-wrapper"> <div id="qv-wrapper">
<div id="qv"> <div id="qv">
<ol> <ol>
<li><a href="#get-as22">Get Android Studio 2.2</a></li> <li>
<li><a href="#get-sdk">Get the Wear Preview SDK</a></li> <a href="#install_android_studio_and_the_latest_packages">Install
<li><a href="#create-update">Update or Create a Project</a></li> Android Studio and the Latest Packages</a>
</li>
<li>
<a href="#get_the_preview_reference_documentation">Get the Preview
Reference Documentation</a>
</li>
<li>
<a href="#update_or_create_a_project">Update or Create a
Project</a>
</li>
</ol> </ol>
</div> </div>
</div> </div>
<p> <p>
To develop apps for the Wear Developer Preview, you need to make some updates If you want an environment for basic <strong>compatibility
to your developer environment. This page describes how to setup for testing testing</strong> of your app, you can use your current APK and a
the Wear Preview APIs with your app. supported watch or an emulator. You don't necessarily need to update your
</p> full development environment to do basic testing. To simply test your
app's compatibility with a preview system image, see <a href=
"{@docRoot}wear/preview/downloads.html">Download and Test with a
<h2 id="get-as22">Get Android Studio 2.2 (preview)</h2> Device</a>.
<p>
Android Studio 2.2 is currently available as a preview in the canary release
channel. If you already have Android Studio and don't want to update to the
canary channel, you can download Android Studio 2.2 as a separate
installation and use it for development with the Wear Developer Preview,
leaving your primary Android Studio environment unaffected.
</p> </p>
<p> <p>
To download Android Studio 2.2 as a separate installation, follow these steps However, to develop apps for the Android Wear 2.0 Developer Preview, you
(or if you want to receive Android Studio 2.1 as an update to your existing need to make some updates to your development environment, as described
installation, skip to step 4): below.
</p>
<h2 id="install_android_studio_and_the_latest_packages">
Install Android Studio and the Latest Packages
</h2>
<p>
1. For compatibility with the <a href="{@docRoot}preview/overview.html">N
Developer Preview</a>, follow the <a href=
"{@docRoot}preview/setup-sdk.html">setup instructions</a> for installing
the latest version of Android Studio.
</p>
<p>
2. Use the <a href="{@docRoot}tools/help/sdk-manager.html">SDK
manager</a> to install or confirm that you have the latest installations
of the following packages:
</p>
<ul>
<li>Under the <strong>SDK Platforms tab</strong>:
<ul>
<li>Android N Preview
</li>
</ul>
</li>
<li>Under the <strong>SDK Tools tab</strong>:
<ul>
<li>Android Support Library
</li>
<li>Google Play services
</li>
<li>Google Repository
</li>
<li>Android Support Repository
</li>
</ul>
</li>
</ul>
<h2 id="get_the_preview_reference_documentation">
Get the Preview Reference Documentation
</h2>
<p>
Detailed information about the preview is available in the preview
reference documentation, which you can download from the following table.
The zip file includes an updated API reference for the preview.
</p>
<table>
<tr>
<th scope="col">
Reference documentation
</th>
<th scope="col">
Notes
</th>
</tr>
<tr>
<td>
[zip file name]
</td>
<td>
</td>
</tr>
</table>
<h2 id="update_or_create_a_project">
Update or Create a Project
</h2>
<p>
To use the APIs, your project must be configured appropriately in Android
Studio.
</p>
<h3 id="update_an_existing_project">
Update an existing project
</h3>
<p>
To update an existing project for development:
</p> </p>
<ol> <ol>
<li>Edit the name of your <li>Start Android Studio, click <strong>Open an existing Android Studio
existing Android Studio installation and append the version number. This way, Project</strong>, and select a project.
when you install the new version, it will not override the existing one.</li>
<li>Download the appropriate ZIP file for your operating system from the
<a href="http://tools.android.com/download/studio/canary/latest"
>canary channel download page</a>.
</li>
<li>Unzip the package and move the Android Studio 2.1 contents to the
appropriate location for applications on your system, then launch it.</li>
<li>Open the Settings dialog
(<strong>File &gt; Settings</strong> on Windows/Linux, or
<strong>Android Studio &gt; Preferences</strong> on Mac). In the left
panel, select <strong>Appearance &amp; Behavior &gt; System Settings &gt;
Updates</strong>.
</li>
<li>On the Updates panel, select the <strong>Automatically
check updates for</strong> check box and select
<strong>Canary Channel</strong> from the drop-down list.
</li>
</ol>
<p>Keep this settings window open for the next step.</p>
<h2 id="get-sdk">Get the Wear Preview SDK</h2>
<p>To start developing with Wear Preview APIs, you need to install the
Wear Preview SDK in Android Studio as follows:</p>
<ol>
<li>While still viewing the Updates panel (step 4 from above),
select the <strong>Automatically
check updates for Android SDK</strong> check box and select
<strong>Preview Channel</strong> from the drop-down list.
</li>
<li>Click <strong>Check Now</strong>.</li>
<li>In the left panel, select <strong>Appearance &amp; Behavior &gt;
System Settings &gt; Android SDK</strong>.
<li>Click the <strong>SDK Platforms</strong> tab, then select the
<strong>Wear Preview</strong> check box.</li>
<li>Click the <strong>SDK Tools</strong> tab, then select the
<strong>Android SDK Build Tools</strong>, <strong>Android SDK
Platform-Tools</strong>, and <strong>Android SDK Tools</strong> check
boxes.
</li> </li>
<li>Click <strong>OK</strong>, then accept the licensing <li>If prompted by the Android SDK Manager for the SDK version to use for
agreements for any packages that need to be installed. the project, select <strong>Use</strong> <strong>Android Studio's
SDK</strong>. &lt;//li&gt;
</li> </li>
</ol>
<li>If prompted to update the Gradle plugin, update the version of the
plugin.
</li>
<h2 id="create-update">Update or Create a Project</h2> <li>In the <code>build.gradle</code> file for the Wear module, in the
<code>dependencies</code> section, update the existing reference to the
<p> Wearable Support Library (for example, <code>compile
To use the Wear Preview APIs, your project must be configured appropriately. 'com.google.android.support:wearable:1.4.0'</code>) by changing it to the
</p> following, which requires that your the Google Repository <a href=
"#install_android_studio_and_the_latest_packages">is the latest
version</a>::
<h3 id="update">Update an existing project</h3>
<p>Open the
<code>build.gradle</code> file for your module and update the values as
follows:
</p>
<pre> <pre>
android { compile 'com.google.android.support:wearable:2.0.0-alpha1'
compileSdkVersion <strong>'23'</strong>
buildToolsVersion <strong>'24.0.1-rc1'</strong>
...
defaultConfig { </pre>
minSdkVersion <strong>'23'</strong> </li>
targetSdkVersion <strong>'23'</strong>
...
}
...
}</pre>
<li>See the following page for setting up a watch or emulator with a
preview system image, in order to begin testing your app: <a href=
"{@docRoot}wear/preview/downloads.html">Download and Test with a
Device</a>
</li>
</ol>
<h3 id="create">Create a new project</h3> <h3 id="create_a_new_project">
Create a new project
</h3>
<p>To create a new project for development with the Wear Preview SDK:</p> <p>
To create a new project for development:
</p>
<ol> <ol>
<li>Click <strong>File > New Project</strong>. and follow the steps until <li>Click <strong>File &gt; New Project</strong> and follow the steps in
you reach the Target Android Devices page. the Create New Project wizard until you reach the Target Android Devices
page.
</li>
<li>Optionally, select the <strong>Phone and Tablet</strong> option. If
you plan to use N Preview APIs in a phone app, then the Minimum SDK
option list, select <strong>API N: Android 6.x (N Preview)</strong>.
</li>
<li>Select the <strong>Wear</strong> option, and in the Minimum SDK
option list, select the latest available (<strong>N Preview</strong>)
option. Click <strong>Next</strong> until you exit the Create New Project
wizard.
</li>
<li>In the <code>build.gradle</code> file for the Wear module, in the
<code>dependencies</code> section, update the existing reference to the
Wearable Support Library (perhaps <code>compile
'com.google.android.support:wearable:1.4.0'</code>) to:
<pre>
compile 'com.google.android.support:wearable:2.0.0-alpha1'
</pre>
</li>
<li>See the following page for setting up a watch or emulator with a
preview system image, in order to begin testing your app: <a href=
"{@docRoot}wear/preview/downloads.html">Download and Test with a
Device</a>
</li> </li>
<li>On this page, select <strong>Wear</strong> option.</li>
<li>Under <strong>Wear</strong> option, in the <strong>Minimum
SDK</strong> option list, select
<strong>API 23: Android API 6.0 (Wear Preview)</strong>.</li>
</ol> </ol>