Dirk Dougherty | 7b229ef | 2010-03-26 17:32:26 -0700 | [diff] [blame] | 1 | page.title=Android 2.1 Platform |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 2 | sdk.platform.version=2.1 |
| 3 | sdk.platform.apiLevel=7 |
| 4 | sdk.platform.majorMinor=minor |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 5 | |
| 6 | @jd:body |
| 7 | |
| 8 | <div id="qv-wrapper"> |
| 9 | <div id="qv"> |
| 10 | |
| 11 | <h2>In this document</h2> |
| 12 | <ol> |
| 13 | <li><a href="#features">Platform Highlights</a></li> |
Dirk Dougherty | 7b229ef | 2010-03-26 17:32:26 -0700 | [diff] [blame] | 14 | <li><a href="#relnotes">Revisions</a></li> |
Dirk Dougherty | 44108b5 | 2010-05-18 16:53:06 -0700 | [diff] [blame] | 15 | <li><a href="#api-level">API Level</a></li> |
| 16 | <li><a href="#api">Framework API Changes</a> |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 17 | <li><a href="#apps">Built-in Applications</a></li> |
| 18 | <li><a href="#locs">Locales</a></li> |
| 19 | <li><a href="#skins">Emulator Skins</a></li> |
Dirk Dougherty | 44108b5 | 2010-05-18 16:53:06 -0700 | [diff] [blame] | 20 | |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 21 | </ol> |
| 22 | </li> |
| 23 | </ol> |
| 24 | |
Dirk Dougherty | 44108b5 | 2010-05-18 16:53:06 -0700 | [diff] [blame] | 25 | <h2>Reference</h2> |
| 26 | <ol> |
| 27 | <li><a |
| 28 | href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API |
| 29 | Differences Report »</a> </li> |
| 30 | </ol> |
| 31 | |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 32 | <h2>See Also</h2> |
| 33 | <ol> |
| 34 | <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li> |
| 35 | </ol> |
| 36 | |
| 37 | </div> |
| 38 | </div> |
| 39 | |
| 40 | <p> |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 41 | <em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p> |
| 42 | |
| 43 | <p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release |
Dirk Dougherty | 9519eab | 2010-09-14 18:15:08 -0700 | [diff] [blame] | 44 | deployable to Android-powered handsets starting in January 2010. |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 45 | This release includes new API |
| 46 | changes and bug fixes. For information on changes, see the <a href="#api">Framework API</a> |
| 47 | section.</p> |
| 48 | |
| 49 | <p>For developers, the Android {@sdkPlatformVersion} platform is available as a |
| 50 | downloadable component for the Android SDK. The downloadable platform includes a |
| 51 | fully compliant Android library and system image, as well as a set of emulator |
| 52 | skins, sample applications, and more. The downloadable platform |
| 53 | includes no external libraries. </p> |
| 54 | |
| 55 | <p>To get started developing or testing against the Android |
| 56 | {@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to |
Dirk Dougherty | 7b229ef | 2010-03-26 17:32:26 -0700 | [diff] [blame] | 57 | download the platform into your SDK. For more information, |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 58 | see <a href="{@docRoot}sdk/adding-components.html">Adding SDK |
| 59 | Components</a>.</p> |
| 60 | |
| 61 | |
| 62 | <h2 id="features">Platform Highlights</h2> |
| 63 | |
| 64 | <p>Android {@sdkPlatformVersion} does not add significant user features, see the <a |
| 65 | href="http://developer.android.com/sdk/android-2.0-highlights.html">Android |
| 66 | 2.0 Platform Highlights</a> document for the latest user features.</p> |
| 67 | |
Dirk Dougherty | 7b229ef | 2010-03-26 17:32:26 -0700 | [diff] [blame] | 68 | <h2 id="relnotes">Revisions</h2> |
| 69 | |
| 70 | <p>The sections below provide notes about successive releases of |
| 71 | the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by |
| 72 | revision number. To determine what revision(s) of the Android |
| 73 | {@sdkPlatformVersion} platforms are installed in your SDK environment, refer to |
| 74 | the "Installed Packages" listing in the Android SDK and AVD Manager.</p> |
| 75 | |
Dirk Dougherty | 7b229ef | 2010-03-26 17:32:26 -0700 | [diff] [blame] | 76 | |
Scott Main | 5465e05 | 2011-07-26 18:29:44 -0700 | [diff] [blame] | 77 | <div class="toggle-content opened" style="padding-left:1em;"> |
| 78 | |
| 79 | <p><a href="#" onclick="return toggleContent(this)"> |
| 80 | <img src="{@docRoot}assets/images/triangle-opened.png" |
| 81 | class="toggle-content-img" alt="" /> |
| 82 | Android {@sdkPlatformVersion}, Revision 3</a> <em>(July 2011)</em> |
| 83 | </a></p> |
| 84 | |
| 85 | <div class="toggle-content-toggleme" style="padding-left:2em;"> |
| 86 | |
| 87 | <dl> |
| 88 | <dt>Dependencies:</dt> |
| 89 | <dd> |
| 90 | <p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a> or |
| 91 | higher.</p> |
| 92 | </dd> |
| 93 | <dt>Notes:</dt> |
| 94 | <dd> |
| 95 | <p>Improvements to the platform's rendering library to support the visual layout editor in the ADT |
| 96 | Eclipse plugin. This revision allows for more drawing features in ADT and fixes several |
| 97 | bugs in the previous rendering library. It also unlocks several editor features that were added in |
| 98 | ADT 12.</p> |
| 99 | </dd> |
| 100 | </dl> |
| 101 | |
| 102 | </div> |
| 103 | </div> |
| 104 | |
| 105 | <div class="toggle-content closed" style="padding-left:1em;"> |
| 106 | |
| 107 | <p><a href="#" onclick="return toggleContent(this)"> |
| 108 | <img src="{@docRoot}assets/images/triangle-closed.png" |
| 109 | class="toggle-content-img" alt="" /> |
| 110 | Android {@sdkPlatformVersion}, Revision 2</a> <em>(May 2010)</em> |
| 111 | </a></p> |
| 112 | |
| 113 | <div class="toggle-content-toggleme" style="padding-left:2em;"> |
Dirk Dougherty | 0d1b081 | 2010-04-07 17:05:16 -0700 | [diff] [blame] | 114 | <dl> |
| 115 | <dt>Dependencies:</dt> |
| 116 | <dd> |
| 117 | <p>Requires SDK Tools r6 or higher.</p> |
| 118 | </dd> |
| 119 | |
| 120 | <dt>Tools:</dt> |
| 121 | <dd> |
| 122 | <ul> |
| 123 | <li>Adds support for library projects in the Ant build system.</li> |
| 124 | <li>Adds improved layout rendering in ADT’s visual layout editor.</li> |
| 125 | </ul> |
| 126 | </dd> |
| 127 | |
| 128 | </dl> |
| 129 | </div> |
| 130 | </div> |
| 131 | |
Scott Main | 5465e05 | 2011-07-26 18:29:44 -0700 | [diff] [blame] | 132 | <div class="toggle-content closed" style="padding-left:1em;"> |
| 133 | |
| 134 | <p><a href="#" onclick="return toggleContent(this)"> |
| 135 | <img src="{@docRoot}assets/images/triangle-closed.png" |
| 136 | class="toggle-content-img" alt="" /> |
| 137 | Android {@sdkPlatformVersion}, Revision 1</a> <em>(January 2010)</em> |
| 138 | </a></p> |
| 139 | |
| 140 | <div class="toggle-content-toggleme" style="padding-left:2em;"> |
Dirk Dougherty | 7b229ef | 2010-03-26 17:32:26 -0700 | [diff] [blame] | 141 | <dl> |
| 142 | <dt>Dependencies:</dt> |
| 143 | <dd> |
| 144 | <p>Requires SDK Tools r4 or higher.</p> |
| 145 | </dd> |
| 146 | </dl> |
| 147 | </div> |
| 148 | </div> |
| 149 | |
Dirk Dougherty | 44108b5 | 2010-05-18 16:53:06 -0700 | [diff] [blame] | 150 | |
| 151 | <h2 id="api-level">API Level</h2> |
| 152 | |
| 153 | <p>The Android {@sdkPlatformVersion} platform delivers an updated version of |
| 154 | the framework API. The Android {@sdkPlatformVersion} API |
| 155 | is assigned an integer identifier — |
| 156 | <strong>{@sdkPlatformApiLevel}</strong> — that is |
| 157 | stored in the system itself. This identifier, called the "API Level", allows the |
| 158 | system to correctly determine whether an application is compatible with |
| 159 | the system, prior to installing the application. </p> |
| 160 | |
| 161 | <p>To use APIs introduced in Android {@sdkPlatformVersion} in your |
| 162 | application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the |
| 163 | <code>android:minSdkVersion</code> attributes of the <code><uses-sdk></code> |
| 164 | element in your application's manifest. </p> |
| 165 | |
| 166 | <p>For more information about how to use API Level, see the <a |
| 167 | href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p> |
| 168 | |
| 169 | |
| 170 | <h2 id="api">Framework API Changes</h2> |
| 171 | |
| 172 | <p>The sections below provide information about changes made to the application |
| 173 | framework API provided by the Android {@sdkPlatformVersion} platform.</p> |
| 174 | |
| 175 | <h3>Live Wallpapers</h3> |
| 176 | |
| 177 | <p>The following additions provide APIs for you to develop animated wallpapers:</p> |
| 178 | <ul> |
| 179 | <li>New {@link android.service.wallpaper} package.</li> |
| 180 | <li>New {@link android.app.WallpaperInfo} class.</li> |
| 181 | <li>Updated {@link android.app.WallpaperManager}.</li> |
| 182 | </ul> |
| 183 | |
| 184 | <p>Additionally, if your application uses or provides Live Wallpapers, you must |
| 185 | remember to add a <a |
| 186 | href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code><uses-feature></code></a> |
| 187 | element to the application's manifest, declaring the attribute |
| 188 | <code>android:name="android.software.live_wallpaper"</code>. For example:</p> |
| 189 | |
| 190 | <pre class="no-pretty-print"> |
| 191 | <uses-feature android:name="android.software.live_wallpaper" /> |
| 192 | </pre> |
| 193 | |
Dirk Dougherty | 4d7bc655 | 2012-01-27 17:56:49 -0800 | [diff] [blame] | 194 | <p>When you've published your application, Google Play checks for the |
Dirk Dougherty | 44108b5 | 2010-05-18 16:53:06 -0700 | [diff] [blame] | 195 | presence of this element and uses it as a filter, ensuring that your application |
| 196 | is not made available to users whose devices do not support Live Wallpapers. |
| 197 | </p> |
| 198 | |
| 199 | <h3>Telephony</h3> |
| 200 | |
| 201 | <ul> |
| 202 | <li>New {@link android.telephony.SignalStrength} class provides information |
| 203 | about the device's current network signal. This can be acquired from the |
| 204 | new {@link |
| 205 | android.telephony.PhoneStateListener#onSignalStrengthsChanged(SignalStrength)} |
| 206 | callback.</li> |
| 207 | |
| 208 | <li>New {@link |
| 209 | android.telephony.PhoneStateListener#onDataConnectionStateChanged(int,int)} |
| 210 | callback.</li> |
| 211 | </ul> |
| 212 | |
| 213 | <h3>Views</h3> |
| 214 | |
| 215 | <ul> |
| 216 | <li>New {@link android.view.View} methods {@link android.view.View#isOpaque()} |
| 217 | and {@link android.view.View#onDrawScrollBars(Canvas)}.</li> |
| 218 | |
| 219 | <li>New {@link android.widget.RemoteViews} methods {@link |
| 220 | android.widget.RemoteViews#addView(int,RemoteViews)} and {@link |
| 221 | android.widget.RemoteViews#removeAllViews(int)}.</li> |
| 222 | |
| 223 | <li>New {@link android.view.ViewGroup} methods {@link |
| 224 | android.view.ViewGroup#isChildrenDrawingOrderEnabled()} and {@link |
| 225 | android.view.ViewGroup#setChildrenDrawingOrderEnabled(boolean)}.</li> |
| 226 | </ul> |
| 227 | |
| 228 | <h3>WebKit</h3> |
| 229 | |
| 230 | <ul> |
| 231 | <li>New {@link android.webkit.WebStorage} methods to manipulate web |
| 232 | storage databases.</li> |
| 233 | |
| 234 | <li>New {@link android.webkit.GeolocationPermissions} methods to |
| 235 | get Geolocation permissions from, and set them on the WebView.</li> |
| 236 | |
| 237 | <li>New {@link android.webkit.WebSettings} methods to manage settings for |
| 238 | app cache, web storage, and zooming based on screen density.</li> |
| 239 | |
| 240 | <li>New {@link android.webkit.WebChromeClient} methods for handling video, |
| 241 | browsing history, custom Views, app cache limits, and more.</li> |
| 242 | </ul> |
| 243 | |
| 244 | </ul> |
| 245 | |
| 246 | <!-- |
| 247 | <h3 id="behavior-changes">Behavior changes</h3> |
| 248 | |
| 249 | <h3 id="bug-fixes">Bug fixes</h3> |
| 250 | --> |
| 251 | |
| 252 | <h3 id="api-diff">API differences report</h3> |
| 253 | |
| 254 | <p>For a detailed view of all API changes in Android {@sdkPlatformVersion} (API |
| 255 | Level {@sdkPlatformApiLevel}), as compared to API Level 6, see the <a |
| 256 | href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API |
| 257 | Differences Report</a>.</p> |
| 258 | |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 259 | <h2 id="apps">Built-in Applications</h2> |
| 260 | |
| 261 | <p>The system image included in the downloadable platform provides these |
| 262 | built-in applications:</p> |
| 263 | |
| 264 | <table style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 265 | <tr> |
| 266 | <td style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 267 | <ul> |
| 268 | <li>Alarm Clock</li> |
| 269 | <li>Browser</li> |
| 270 | <li>Calculator</li> |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 271 | <li>Camera</li> |
| 272 | <li>Contacts</li> |
| 273 | <li>Custom Locale (developer app)</li> |
| 274 | <li>Dev Tools (developer app)</li> |
Dirk Dougherty | 5bc32d3 | 2010-01-11 16:16:36 -0800 | [diff] [blame] | 275 | <li>Email</li> |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 276 | </ul> |
| 277 | </td> |
| 278 | <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> |
| 279 | <ul> |
Dirk Dougherty | 5bc32d3 | 2010-01-11 16:16:36 -0800 | [diff] [blame] | 280 | |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 281 | <li>Gallery</li> |
Dirk Dougherty | 5bc32d3 | 2010-01-11 16:16:36 -0800 | [diff] [blame] | 282 | <li>IMEs for Japanese, Chinese, and Latin text input</li> |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 283 | <li>Messaging</li> |
| 284 | <li>Music</li> |
Dirk Dougherty | 5bc32d3 | 2010-01-11 16:16:36 -0800 | [diff] [blame] | 285 | <li>Phone</li> |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 286 | <li>Settings</li> |
| 287 | <li>Spare Parts (developer app)</li> |
| 288 | </ul> |
| 289 | </td> |
| 290 | </tr> |
| 291 | </table> |
| 292 | |
Dirk Dougherty | 5bc32d3 | 2010-01-11 16:16:36 -0800 | [diff] [blame] | 293 | |
Scott Main | b149ee8 | 2009-12-15 10:47:31 -0800 | [diff] [blame] | 294 | <h2 id="locs" style="margin-top:.75em;">Locales</h2> |
| 295 | |
| 296 | <p>The system image included in the downloadable platform provides a variety of |
| 297 | built-in locales. In some cases, region-specific strings are available for the |
| 298 | locales. In other cases, a default version of the language is used. The |
| 299 | languages that are available in the Android {@sdkPlatformVersion} system |
| 300 | image are listed below (with <em>language</em>_<em>country/region</em> locale |
| 301 | descriptor).</p> |
| 302 | |
| 303 | <table style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 304 | <tr> |
| 305 | <td style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 306 | <ul> |
| 307 | <li>Chinese, PRC (zh_CN)</li> |
| 308 | <li>Chinese, Taiwan (zh_TW)</li> |
| 309 | <li>Czech (cs_CZ)</li> |
| 310 | <li>Dutch, Netherlands (nl_NL)</li> |
| 311 | <li>Dutch, Belgium (nl_BE)</li> |
| 312 | <li>English, US (en_US)</li> |
| 313 | <li>English, Britain (en_GB)</li> |
| 314 | <li>English, Canada (en_CA)</li> |
| 315 | <li>English, Australia (en_AU)</li> |
| 316 | <li>English, New Zealand (en_NZ)</li> |
| 317 | <li>English, Singapore(en_SG)</li> |
| 318 | <li>French, France (fr_FR)</li> |
| 319 | <li>French, Belgium (fr_BE)</li> |
| 320 | </ul> |
| 321 | </td> |
| 322 | <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> |
| 323 | <li>French, Canada (fr_CA)</li> |
| 324 | <li>French, Switzerland (fr_CH)</li> |
| 325 | <li>German, Germany (de_DE)</li> |
| 326 | <li>German, Austria (de_AT)</li> |
| 327 | <li>German, Switzerland (de_CH)</li> |
| 328 | <li>German, Liechtenstein (de_LI)</li> |
| 329 | <li>Italian, Italy (it_IT)</li> |
| 330 | <li>Italian, Switzerland (it_CH)</li> |
| 331 | <li>Japanese (ja_JP)</li> |
| 332 | <li>Korean (ko_KR)</li> |
| 333 | <li>Polish (pl_PL)</li> |
| 334 | <li>Russian (ru_RU)</li> |
| 335 | <li>Spanish (es_ES)</li> |
| 336 | </td> |
| 337 | </tr> |
| 338 | </table> |
| 339 | |
| 340 | <p>Localized UI strings match the locales that are accessible |
| 341 | through Settings.</p> |
| 342 | |
| 343 | <h2 id="skins">Emulator Skins</h2> |
| 344 | |
| 345 | <p>The downloadable platform includes a set of emulator skins that you can use |
| 346 | for modeling your application in different screen sizes and resolutions. The |
| 347 | emulator skins are:</p> |
| 348 | |
| 349 | <ul> |
| 350 | <li> |
| 351 | QVGA (240x320, low density, small screen) |
| 352 | </li> |
| 353 | <li> |
| 354 | WQVGA (240x400, low density, normal screen) |
| 355 | </li> |
| 356 | <li> |
| 357 | FWQVGA (240x432, low density, normal screen) |
| 358 | </li> |
| 359 | <li> |
| 360 | HVGA (320x480, medium density, normal screen) |
| 361 | </li> |
| 362 | <li> |
| 363 | WVGA800 (480x800, high density, normal screen) |
| 364 | </li> |
| 365 | <li> |
| 366 | WVGA854 (480x854 high density, normal screen) |
| 367 | </li> |
| 368 | </ul> |
| 369 | |
| 370 | <p>For more information about how to develop an application that displays |
| 371 | and functions properly on all Android-powered devices, see <a |
| 372 | href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple |
| 373 | Screens</a>.</p> |