1page.title=Android 1.6 Platform 2excludeFromSuggestions=true 3sdk.platform.version=1.6 4sdk.platform.apiLevel=4 5sdk.platform.majorMinor=minor 6 7@jd:body 8 9<div id="qv-wrapper"> 10<div id="qv"> 11 12<h2>In this document</h2> 13<ol> 14 <li><a href="#features">Platform Highlights</a></li> 15 <li><a href="#relnotes">Revisions</a></li> 16 <li><a href="#api-level">API Level</a></li> 17 <li><a href="#api">Framework API Changes</a> 18 <li><a href="#apps">Built-in Applications</a></li> 19 <li><a href="#locs">Locales</a></li> 20 <li><a href="#skins">Emulator Skins</a></li> 21 22 </ol> 23 </li> 24</ol> 25 26<h2>Reference</h2> 27<ol> 28<li><a 29href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API 30Differences Report »</a> </li> 31</ol> 32 33</div> 34</div> 35 36<p> 37<em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p> 38 39<p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release 40deployable to Android-powered handsets since October 2009. 41The platform includes new features for users and developers, as well as changes 42in the Android framework API. </p> 43 44<p>For developers, a new release of the Android {@sdkPlatformVersion} platform 45is available as a downloadable component for the Android SDK. The platform 46— Android 1.6 r2 — includes a fully compliant Android library and 47system image, as well as a set of emulator skins, sample applications, and minor 48development updates. The downloadable platform is fully compliant (API Level 4) 49and includes no external libraries.</p> 50 51<p>To get started developing or testing against the Android 52{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to 53download the latest Android 1.6 platform into your Android 1.6 or later SDK.</p> 54 55 56<h2 id="features">Platform Highlights</h2> 57 58<p>For a list of new user features and platform highlights, see the <a 59href="http://developer.android.com/about/versions/android-{@sdkPlatformVersion}-highlights.html">Android 60{@sdkPlatformVersion} Platform Highlights</a> document.</p> 61 62 63<h2 id="relnotes">Revisions</h2> 64 65<p>The sections below provide notes about successive releases of 66the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by 67revision number. To determine what revision(s) of the Android 68{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to 69the "Installed Packages" listing in the Android SDK and AVD Manager.</p> 70 71<script type="text/javascript"> 72function toggleDiv(link) { 73 var toggleable = $(link).parent(); 74 if (toggleable.hasClass("closed")) { 75 //$(".toggleme", toggleable).slideDown("fast"); 76 toggleable.removeClass("closed"); 77 toggleable.addClass("open"); 78 $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/styles/disclosure_up.png")); 79 } else { 80 //$(".toggleme", toggleable).slideUp("fast"); 81 toggleable.removeClass("open"); 82 toggleable.addClass("closed"); 83 $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/styles/disclosure_down.png")); 84 } 85 return false; 86} 87</script> 88<style> 89.toggleable { 90 padding: .25em 1em 0em 1em; 91 margin-bottom: 0; 92} 93.toggleme { 94 padding: 1em 1em 0 2em; 95 line-height:1em; 96} 97.toggleable a { 98 text-decoration:none; 99} 100.toggleme a { 101 text-decoration:underline; 102} 103.toggleable.closed .toggleme { 104 display:none; 105} 106#jd-content .toggle-img { 107 margin:0; 108} 109</style> 110 111<div class="toggleable opened"> 112 <a href="#" onclick="return toggleDiv(this)"> 113 <img src="{@docRoot}assets/images/styles/disclosure_up.png" class="toggle-img" height="9px" width="9px" /> 114 Android 1.6, Revision 3</a> <em>(May 2010)</em></a> 115 <div class="toggleme"> 116<dl> 117<dt>Dependencies:</dt> 118<dd> 119<p>Requires SDK Tools r6 or higher.</p> 120</dd> 121<dt>Tools:</dt> 122<dd> 123<ul> 124<li>Adds support for library projects in the Ant build system.</li> 125</ul> 126</dd> 127</dl> 128 </div> 129</div> 130 131<div class="toggleable closed"> 132 <a href="#" onclick="return toggleDiv(this)"> 133 <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-img" height="9px" width="9px" /> 134 Android 1.6, Revision 2</a> <em>(December 2009)</em></a> 135 <div class="toggleme"> 136<dl> 137<dt>Dependencies:</dt> 138<dd> 139<p>Requires SDK Tools r4 or higher.</p> 140</dd> 141 142<dt>API related:</dt> 143<dd> 144<ul> 145<li>Properly exposes CDMA-related constants in <code><a href="{@docRoot}reference/android/telephony/TelephonyManager.html">android.telephony.TelephonyManager</a></code>: <code>DATA_ACTIVITY_DORMANT</code>, 146<code>PHONE_TYPE_CDMA</code>, <code>NETWORK_TYPE_CDMA</code>, 147<code>NETWORK_TYPE_EVDO_0</code>, <code>NETWORK_TYPE_EVDO_A</code>, and 148<code>NETWORK_TYPE_1xRTT</code>.</li> 149</ul> 150</dd> 151<dt>System image:</dt> 152<dd> 153<ul> 154<li>Fixes bug so that Bitmap's density is now propagated through Parcelable.</li> 155<li>Fixes NinePatchDrawable to properly scale its reported padding for compatibility mode.</li> 156<li>Fixes TextView to properly compute styled font metrics based on the screen density.</li> 157<li>Updates kernel to 2.6.29, to match kernel on commercially 158available Android-powered devices.</li> 159</ul> 160</dd> 161<dt>Tools:</dt> 162<dd> 163<ul> 164<li>Adds new Ant build system with support for Emma instrumentation projects 165(code coverage).</li> 166<li>Fixes emulator skins to properly emulate d-pad in landscape mode.</li> 167<li>Fixes density rendering in the layout editor in ADT.</li> 168</ul> 169</dd> 170</dl> 171 </div> 172</div> 173 174<div class="toggleable closed"> 175 <a href="#" onclick="return toggleDiv(this)"> 176 <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-img" height="9px" width="9px" /> 177 Android 1.6, Revision 1</a> <em>(September 2009)</em></a> 178 <div class="toggleme"> 179<dl> 180<dt>Dependencies</dt> 181<dd> 182<p>Requires SDK Tools r3 or higher.</p> 183</dd> 184</dl> 185 </div> 186</div> 187 188 189<h2 id="api-level">API Level</h2> 190 191<p>The Android {@sdkPlatformVersion} platform delivers an updated version of 192the framework API. The Android {@sdkPlatformVersion} API 193is assigned an integer identifier — 194<strong>{@sdkPlatformApiLevel}</strong> — that is 195stored in the system itself. This identifier, called the "API Level", allows the 196system to correctly determine whether an application is compatible with 197the system, prior to installing the application. </p> 198 199<p>To use APIs introduced in Android {@sdkPlatformVersion} in your 200application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the 201<code>android:minSdkVersion</code> attributes of the <code><uses-sdk></code> 202element in your application's manifest. </p> 203 204<p>For more information about how to use API Level, see the <a 205href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p> 206 207 208<h2 id="api">Framework API Changes</h2> 209 210<p>The sections below provide information about the application framework API provided by the Android {@sdkPlatformVersion} platform. </p> 211 212<h3 id="UIFramework">UI framework</h3> 213 <ul> 214 <li>New classes in {@link android.view.animation} 215 to control the behavior of animations: 216 <ul> 217 <li><code>AnticipateInterpolator</code></li> 218 <li><code>AnticipateOvershootInterpolator</code></li> 219 <li><code>BounceInterpolator</code></li> 220 <li><code>OvershootInterpolator</code></li> 221 </ul> 222 </li> 223 <li>New XML attribute <code>android:onClick</code> to specify a View's 224<a href="/reference/android/view/View.OnClickListener.html">View.OnClickListener</a> 225from a layout file. 226 </li> 227 <li>New support for dealing with varying screen densities. Density 228information is associated with Bitmap and Canvas for performing the 229correct scaling. The framework will automatically scale bitmaps and 230nine-patches based on the density the resource was found under and the 231density of the screen, etc. 232 </li><p>To use APIs introduced in Android {@sdkPlatformVersion} in your application, you need to 233set the proper value, "{@sdkPlatformApiLevel}", in the attributes of the <code><uses-sdk></code> 234element in your application's manifest. </p> 235 </ul> 236 237<h3>Search framework</h3> 238 <ul> 239 <li>Applications can now expose relevant content to users as search 240suggestions in the Quick Search Box, a new device-wide search capability that is 241accessible from the home screen. To support this, the search framework adds new 242attributes to the searchable metadata file. For complete information, see the 243{@link android.app.SearchManager SearchManager} documentation. 244 </li> 245 </ul> 246 247<h3>Accessibility framework</h3> 248 <ul> 249 <li>New {@link android.view.accessibility android.accessibility} package 250that includes classes for capturing accessibility events and forwarding them to 251an {@link android.accessibilityservice AccessibilityService} handler. </li> 252 <li>New {@link android.accessibilityservice AccessibilityService} package 253that lets your application track user events and provide visual, audible, or 254haptic feedback to the user. </li> 255 </ul> 256 257<h3>Gesture input</h3> 258 <ul> 259 <li>New {@link android.gesture gesture} API for creating, recognizing, 260loading, and saving gestures.</li> 261 </ul> 262 263<h3>Text-to-speech</h3> 264 <ul> 265 <li>New {@link android.speech.tts android.speech.tts} package provides 266classes for synthesizing speech from text, for immediate playback or to create a 267sound file.</li> 268 </ul> 269 270<h3>Graphics</h3> 271 <ul> 272 <li>Classes in {@link android.graphics android.graphics} now support scaling 273for different screen densities.</li> 274 </ul> 275 276<h3>Telephony</h3> 277 <ul> 278 <li>New {@link android.telephony.SmsManager SmsManager} and other classes 279for sending and receiving SMS messages.</li> 280 </ul> 281 282<h3>Utilities</h3> 283 <ul> 284 <li>New {@link android.util.DisplayMetrics DisplayMetrics} fields for 285determining the density of the current device screen.</li> 286 </ul> 287 288<h3 id="AndroidManifest">Android Manifest elements</h3> 289 290 <ul> 291 <li>New <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code 292 <supports-screens>}</a> element lets you specify the device screen sizes that your 293 application is designed and tested to support, where "size" is a combination 294 of resolution and density. If your application is run on a device whose screen 295 size is not specified in the <code><supports-screen></code> element, the system 296 displays the application in <em>compatibility mode</em>, which performs best-effort scaling 297 of the application UI to match the resolution and density of the screen. 298 299 <p>The attributes available for defining an application's screen support are: 300 301 <ul> 302 303 <li><code>smallScreen</code>: Boolean value that indicates whether the 304 application is designed to run on devices with small screens. 305 Examples: QVGA low density; VGA high density. 306 </li> 307 <li><code>normalScreens</code>: Boolean value that indicates whether 308 the application is designed to run on devices with normal screens. 309 Examples: WQVGA low density; HVGA medium density; WVGA high density. 310 </li> 311 <li><code>largeScreens</code>: Boolean value that indicates whether 312 the application is designed to run on devices with significantly 313 larger screens, such that special care may be required on 314 the application's part to make proper use of the screen area. 315 Examples: VGA medium density; WVGA medium density. 316 </li> 317 <li><code>anyDensity</code>: Boolean value that indicates whether 318 the application can accommodate any screen density. 319 </li> 320 <li><code>resizable</code>: Boolean value that indicates whether 321 the application can expand its layout to fit slightly larger screens. 322 </li> 323 </ul> 324 </p> 325 </li> 326 327 <li>New <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 328 element lets an application specify hardware (or other) 329 features that it requires to function normally. When an application 330 specifies such features, the system allows the application to be installed only 331 on devices that offer the required features. The element supports these 332 attributes: 333 <ul> 334 <li><code>name</code>: The name of the feature required by the application. Currently accepts 335 "android.hardware.camera" and "android.hardware.camera.autofocus" values, which specify that a 336 camera and camera autofocus are required, respectively.</li> 337 <li><code>glEsVersion</code>: Indicates the minimum version of OpenGL ES required.</li> 338 </ul> 339 </li> 340 <li>New attributes for the 341 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element: 342 <ul> 343 <li><code>targetSdkVersion</code>: Indicates the API Level that the application is targeting. 344 It is able to run on older versions (down to minSdkVersion), but was explicitly tested to 345 work with the version specified here. Specifying this version allows the platform to 346 disable compatibility code that is not required or enable newer features that are not 347 available to older applications. </li> 348 <li><code>maxSdkVersion</code>: Indicates the maximum API Level on which an application is 349 designed to run. <strong>Important:</strong> Please read the <a 350 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code><uses-sdk></code></a> 351 documentation before using this attribute. </li> 352 </ul> 353 </li> 354 355 </li> 356 </ul> 357 358<h3>New permissions</h3> 359 360 <ul> 361 <li>{@link android.Manifest.permission#CHANGE_WIFI_MULTICAST_STATE 362 CHANGE_WIFI_MULTICAST_STATE}: Allows applications to enter Wi-Fi 363 Multicast mode. 364 </li> 365 <li>{@link android.Manifest.permission#GLOBAL_SEARCH}: Allows the 366 global search system to access the data of a specified content provider. 367 </li> 368 <li>{@link android.Manifest.permission#INSTALL_LOCATION_PROVIDER INSTALL_LOCATION_PROVIDER}: 369 Allows an application to install a location provider into the Location Manager. 370 </li> 371 <li>READ_HISTORY_BOOKMARKS: 372 Allows an application to read (but not write) the user's browsing history 373 and bookmarks. 374 </li> 375 <li>WRITE_HISTORY_BOOKMARKS: 376 Allows an application to write (but not read) the user's browsing history 377 and bookmarks. 378 </li> 379 <li>{@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE WRITE_EXTERNAL_STORAGE}: 380 Allows an application to write to external storage. Applications using API Level 3 381 and lower will be implicitly granted this permission (and this will be visible to 382 the user); Applications using API Level 4 or higher must explicitly request this 383 permission. 384 </li> 385 </ul> 386 387 388<h3 id="api-diff">API differences report</h3> 389 390<p>For a detailed view of API changes in Android {@sdkPlatformVersion} (API Level {@sdkPlatformApiLevel}), as compared to 391the previous version, see the <a href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API 392Differences Report</a>.</p> 393 394<h2 id="apps">Built-in Applications</h2> 395 396<p>The system image included in the downloadable platform provides these 397built-in applications:</p> 398 399<table style="border:0;padding-bottom:0;margin-bottom:0;"> 400<tr> 401<td style="border:0;padding-bottom:0;margin-bottom:0;"> 402 <ul> 403 <li>Alarm Clock</li> 404 <li>Browser</li> 405 <li>Calculator</li> 406 <li>Camcorder</li> 407 <li>Camera</li> 408 <li>Contacts</li> 409 <li>Custom Locale (developer app)</li> 410 <li>Dev Tools (developer app)</li> 411 <li>Dialer</li> 412 </ul> 413</td> 414<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> 415 <ul> 416 <li>Email</li> 417 <li>Gallery</li> 418 <li>Gestures Builder</li> 419 <li>IME for Japanese text input</li> 420 <li>Messaging</li> 421 <li>Music</li> 422 <li>Settings</li> 423 <li>Spare Parts (developer app)</li> 424 </ul> 425</td> 426</tr> 427</table> 428 429<h2 id="locs" style="margin-top:.75em;">Locales</h2> 430 431<p>The system image included in the downloadable platform provides a variety of 432built-in locales. In some cases, region-specific strings are available for the 433locales. In other cases, a default version of the language is used. The 434languages that are available in the Android {@sdkPlatformVersion} system 435image are listed below (with <em>language</em>_<em>country/region</em> 436locale descriptor).</p> 437 438<table style="border:0;margin-bottom:0;padding-bottom:0;"> 439<tr> 440<td style="border:0;padding-bottom:0;margin-bottom:0;"> 441<ul> 442<li>Chinese, PRC (zh_CN)</li> 443<li>Chinese, Taiwan (zh_TW)</li> 444<li>Czech (cs_CZ)</li> 445<li>Dutch, Netherlands (nl_NL)</li> 446<li>Dutch, Belgium (nl_BE)</li> 447<li>English, US (en_US)</li> 448<li>English, Britain (en_GB)</li> 449<li>English, Canada (en_CA)</li> 450<li>English, Australia (en_AU)</li> 451<li>English, New Zealand (en_NZ)</li> 452<li>English, Singapore(en_SG)</li> 453<li>French, France (fr_FR)</li> 454<li>French, Belgium (fr_BE)</li> 455</ul> 456</td> 457<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> 458<li>French, Canada (fr_CA)</li> 459<li>French, Switzerland (fr_CH)</li> 460<li>German, Germany (de_DE)</li> 461<li>German, Austria (de_AT)</li> 462<li>German, Switzerland (de_CH)</li> 463<li>German, Liechtenstein (de_LI)</li> 464<li>Italian, Italy (it_IT)</li> 465<li>Italian, Switzerland (it_CH)</li> 466<li>Japanese (ja_JP)</li> 467<li>Korean (ko_KR)</li> 468<li>Polish (pl_PL)</li> 469<li>Russian (ru_RU)</li> 470<li>Spanish (es_ES)</li> 471</td> 472</tr> 473</table> 474 475<p>Localized UI strings match the locales that are accessible 476through Settings.</p> 477 478<h2 id="skins">Emulator Skins</h2> 479 480<p>The downloadable platform includes a set of emulator skins that you can 481use for modeling your application in different screen sizes and resolutions. 482The emulator skins are: </p> 483 484<ul> 485 <li> 486 QVGA (240x320, low density, small screen) 487 </li> 488 <li> 489 HVGA (320x480, medium density, normal screen) 490 </li> 491 <li> 492 WVGA800 (480x800, high density, normal screen) 493 </li> 494 <li> 495 WVGA854 (480x854 high density, normal screen) 496 </li> 497</ul> 498 499<p>For more information about how to develop an application that displays and functions properly on all Android-powered devices, see <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>.</p> 500