Dirk Dougherty | fefa95a | 2011-02-07 17:32:11 -0800 | [diff] [blame] | 1 | page.title=Android 2.3.3 Platform |
| 2 | sdk.platform.version=2.3.3 |
| 3 | sdk.platform.apiLevel=10 |
| 4 | |
| 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="#relnotes">Revisions</a></li> |
| 14 | <li><a href="#api">API Overview</a></li> |
| 15 | <li><a href="#api-level">API Level</a></li> |
| 16 | <li><a href="#apps">Built-in Applications</a></li> |
| 17 | <li><a href="#locs">Locales</a></li> |
| 18 | <li><a href="#skins">Emulator Skins</a></li> |
| 19 | </ol> |
| 20 | |
| 21 | <h2>Reference</h2> |
| 22 | <ol> |
| 23 | <li><a |
| 24 | href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API |
| 25 | Differences Report »</a> </li> |
| 26 | </ol> |
| 27 | |
| 28 | <h2>See Also</h2> |
| 29 | <ol> |
| 30 | <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</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 2.3.3 is a small feature release that adds several improvements |
| 40 | and APIs to the Android 2.3 platform.</p> |
| 41 | |
| 42 | <p>For developers, the Android {@sdkPlatformVersion} platform is available as a |
| 43 | downloadable component for the Android SDK. The downloadable platform includes |
| 44 | an Android library and system image, as well as a set of emulator |
| 45 | skins and more. The downloadable platform |
| 46 | includes no external libraries.</p> |
| 47 | |
| 48 | <p>To get started developing or testing against Android |
| 49 | {@sdkPlatformVersion}, use the Android SDK Manager to |
| 50 | download the platform into your SDK. For more information, |
| 51 | see <a href="{@docRoot}sdk/adding-components.html">Adding SDK |
| 52 | Components</a>. If you are new to Android, <a |
| 53 | href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> |
| 54 | first.</p> |
| 55 | |
| 56 | <p>For a high-level introduction to Android 2.3, see the <a |
Scott Main | ea72329 | 2011-02-09 16:01:04 -0800 | [diff] [blame^] | 57 | href="{@docRoot}sdk/android-2.3-highlights.html">Platform Highlights</a>.</p> |
Dirk Dougherty | fefa95a | 2011-02-07 17:32:11 -0800 | [diff] [blame] | 58 | |
| 59 | |
| 60 | <h2 id="relnotes">Revisions</h2> |
| 61 | |
| 62 | <p>The sections below provide notes about successive releases of |
| 63 | the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by |
| 64 | revision number. To determine what revision(s) of the Android |
| 65 | {@sdkPlatformVersion} platforms are installed in your SDK environment, refer to |
| 66 | the "Installed Packages" listing in the Android SDK and AVD Manager.</p> |
| 67 | |
| 68 | <script type="text/javascript"> |
| 69 | function toggleDiv(link) { |
| 70 | var toggleable = $(link).parent(); |
| 71 | if (toggleable.hasClass("closed")) { |
| 72 | //$(".toggleme", toggleable).slideDown("fast"); |
| 73 | toggleable.removeClass("closed"); |
| 74 | toggleable.addClass("open"); |
| 75 | $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png")); |
| 76 | } else { |
| 77 | //$(".toggleme", toggleable).slideUp("fast"); |
| 78 | toggleable.removeClass("open"); |
| 79 | toggleable.addClass("closed"); |
| 80 | $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png")); |
| 81 | } |
| 82 | return false; |
| 83 | } |
| 84 | </script> |
| 85 | <style> |
| 86 | .toggleable { |
| 87 | padding: .25em 1em 0em 1em; |
| 88 | margin-bottom: 0; |
| 89 | } |
| 90 | .toggleme { |
| 91 | padding: 1em 1em 0 2em; |
| 92 | line-height:1em; |
| 93 | } |
| 94 | .toggleable a { |
| 95 | text-decoration:none; |
| 96 | } |
| 97 | .toggleme a { |
| 98 | text-decoration:underline; |
| 99 | } |
| 100 | .toggleable.closed .toggleme { |
| 101 | display:none; |
| 102 | } |
| 103 | #jd-content .toggle-img { |
| 104 | margin:0; |
| 105 | } |
| 106 | </style> |
| 107 | |
| 108 | <div class="toggleable opened"> |
| 109 | <a href="#" onclick="return toggleDiv(this)"> |
| 110 | <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" /> |
| 111 | Android {@sdkPlatformVersion}, Revision 1</a> <em>(February 2011)</em></a> |
| 112 | <div class="toggleme"> |
| 113 | <dl> |
| 114 | <dt>Dependencies:</dt> |
| 115 | <dd> |
| 116 | <p>Requires SDK Tools r9 or higher.</p> |
| 117 | </dd> |
| 118 | |
| 119 | </dl> |
| 120 | </div> |
| 121 | </div> |
| 122 | |
| 123 | |
| 124 | <h2 id="api">API Overview</h2> |
| 125 | |
| 126 | <p>The sections below provide a technical overview of what's new for developers |
| 127 | in {@sdkPlatformVersion}, including new features and changes in the framework |
| 128 | API since the previous version.</p> |
| 129 | |
| 130 | <h3 id="nfc">Near Field Communications (NFC)</h3> |
| 131 | |
| 132 | <p>Android 2.3.3 provides improved and extended support for NFC, to allow |
| 133 | applications to interact with more types of tags in new ways.</p> |
| 134 | |
| 135 | <p>A new, comprehensive set of APIs give applications read and write access |
| 136 | to a wider range of standard tag technologies, including:</p> |
| 137 | |
| 138 | <ul> |
| 139 | <li>NFC-A (ISO 14443-3A)</li> |
| 140 | <li>NFC-B (ISO 14443-3B)</li> |
| 141 | <li>NFC-F (JIS 6319-4)</li> |
| 142 | <li>NFC-V (ISO 15693)</li> |
| 143 | <li>ISO-DEP (ISO 14443-4)</li> |
| 144 | <li>Mifare Classic</li> |
| 145 | <li>Mifare Ultralight</li> |
| 146 | <li>NFC Forum NDEF tags</li> |
| 147 | </ul> |
| 148 | |
| 149 | <p>The platform also provides a limited peer-to-peer communication protocol |
| 150 | and API. Foreground Activities can use the API to register an NDEF |
| 151 | message that will get pushed to other NFC devices when they connect.</p> |
| 152 | |
| 153 | <p>Advanced tag dispatching now gives applications more control over how and |
| 154 | when they are launched, when an NFC tag is discovered. Previously, the platform |
| 155 | used a single-step intent dispatch to notify interested applications that a tag |
| 156 | was discovered. The platform now uses a four-step process that enables the |
| 157 | foreground application to take control of a tag event before it is passed to any |
| 158 | other applications (<code>android.nfc.NfcAdapter.enableForegroundDispatch()</code>). |
| 159 | |
| 160 | The new dispatch process also lets apps listen for specific tag content and |
| 161 | tag technologies, based on two new intent actions — |
| 162 | <code>android.nfc.action.NDEF_DISCOVERED</code> and |
| 163 | <code>android.nfc.action.TECH_DISCOVERED</code>.</p> |
| 164 | |
| 165 | <p>The NFC API is available in the {@link android.nfc} and |
| 166 | {@link android.nfc.tech} packages. The key classes are: </p> |
| 167 | |
| 168 | <ul> |
| 169 | <li>{@link android.nfc.NfcAdapter}, which represents the NFC hardware on the device.</li> |
| 170 | <li>{@link android.nfc.NdefMessage}, which represents an NDEF data message, |
| 171 | the standard format in which "records" carrying data are transmitted between |
| 172 | devices and tags. An NDEF message certain many NDEF records of different types. |
| 173 | Applications can receive these messages from |
| 174 | {@link android.nfc.NfcAdapter#ACTION_NDEF_DISCOVERED NDEF_DISCOVERED}, |
| 175 | {@link android.nfc.NfcAdapter#ACTION_TECH_DISCOVERED TECH_DISCOVERED}, or |
| 176 | {@link android.nfc.NfcAdapter#ACTION_TAG_DISCOVERED TAG_DISCOVERED} Intents.</li> |
| 177 | <li>{@link android.nfc.NdefRecord}, delivered in an |
| 178 | {@link android.nfc.NdefMessage}, which describes the type of data being shared |
| 179 | and carries the data itself.</li> |
| 180 | <li>{@link android.nfc.Tag}, which represents a tag scanned by the device. |
| 181 | Multiple types of tags are supported, based on the underlying tag |
| 182 | technology.</li> |
| 183 | <li>{@link android.nfc.tech.TagTechnology}, an interface that gives applications |
| 184 | access to tag properties and I/O operations based on the technologies present |
| 185 | in the tag. For a full list of tag technologies supported in Android 2.3.3, see |
| 186 | {@link android.nfc.tech}.</li> |
| 187 | </ul> |
| 188 | |
| 189 | <p>NFC communication relies on wireless technology in the device hardware, and |
| 190 | is not present in all Android devices. Android devices that do not support |
| 191 | NFC will return a null object when |
| 192 | {@link android.nfc.NfcAdapter#getDefaultAdapter(android.content.Context) |
| 193 | getDefaultAdapter(Context)} is called, and |
| 194 | <code>context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC)</code> |
| 195 | will return <code>false</code>. The NFC API is always present, however, regardless of |
| 196 | underlying hardware support.</p> |
| 197 | |
| 198 | <p>To use the NFC API, applications must request permission from the user by |
| 199 | declaring <code><uses-permission |
| 200 | android:name="android.permission.NFC"></code> in their manifest files.</p> |
| 201 | |
| 202 | <p>Additionally, developers can request filtering on Android Market, such that |
| 203 | their applications are not discoverable to users whose devices do not support |
| 204 | NFC. To request filtering, add |
| 205 | <code><uses-feature android:name="android.hardware.nfc" |
| 206 | android:required="true"></code> to the application's manifest.</p> |
| 207 | |
| 208 | <p class="note">To look at sample code for NFC, see |
| 209 | <a href="{@docRoot}resources/samples/NFCDemo/index.html">NFCDemo app</a>, <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/TechFilter.html">filtering by tag technology</a></li>, <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html">using foreground dispatch</a>, and <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.html">foreground NDEF push (P2P)</a>.</p> |
| 210 | |
| 211 | <h3 id="bluetooth">Bluetooth</h3> |
| 212 | |
| 213 | <p>Android 2.3.3 adds platform and API support for Bluetooth nonsecure socket |
| 214 | connections. This lets applications communicate with simple devices that may not |
| 215 | offer a UI for authentication. See |
| 216 | {@link android.bluetooth.BluetoothDevice#createInsecureRfcommSocketToServiceRecord(java.util.UUID)} and |
| 217 | {@link android.bluetooth.BluetoothAdapter#listenUsingInsecureRfcommWithServiceRecord(java.lang.String, java.util.UUID)} |
| 218 | for more information. </p> |
| 219 | |
| 220 | <h3 id="graphics">Graphics</h3> |
| 221 | |
| 222 | <ul> |
| 223 | <li>A new {@link android.graphics.BitmapRegionDecoder} class lets applications |
| 224 | decode a rectangle region from an image. The API is particularly useful when an |
| 225 | original image is large and and the application only need parts of the image. |
| 226 | </li> |
| 227 | <li>A new {@link |
| 228 | android.graphics.BitmapFactory.Options#inPreferQualityOverSpeed} field in {@link |
| 229 | android.graphics.BitmapFactory.Options} allows applications to use a more accurate |
| 230 | but slightly slower IDCT method in JPEG decode. This in turn improves the |
| 231 | quality of the reconstructed image.</li> |
| 232 | </ul> |
| 233 | |
| 234 | |
| 235 | <h3 id="media">Media framework</h3> |
| 236 | |
| 237 | <ul> |
| 238 | <li>A new {@link android.media.MediaMetadataRetriever} class provides a unified |
| 239 | interface for retrieving frame and metadata from an input media file.</li> |
| 240 | <li>{@link android.media.MediaRecorder.AudioEncoder} and {@link |
| 241 | android.media.MediaRecorder.OutputFormat} include new fields for specifying AMR |
| 242 | Wideband and AAC formats. </li> |
| 243 | </ul> |
| 244 | |
| 245 | |
| 246 | <h3 id="speech">Speech recognition</h3> |
| 247 | |
| 248 | <p>The speech-recognition API includes new constants to let you manage voice |
| 249 | search results in new ways. Although the new constants are not needed for normal |
| 250 | use of speech recognition, you could use them to offer a different view of voice |
| 251 | search results in your application. For information, see {@link |
| 252 | android.speech.RecognizerResultsIntent}.</p> |
| 253 | |
| 254 | |
| 255 | <h2 id="api-level">API Level</h2> |
| 256 | |
| 257 | <p>The Android {@sdkPlatformVersion} platform delivers an updated version of |
| 258 | the framework API. The Android {@sdkPlatformVersion} API |
| 259 | is assigned an integer identifier — |
| 260 | <strong>{@sdkPlatformApiLevel}</strong> — that is |
| 261 | stored in the system itself. This identifier, called the "API Level", allows the |
| 262 | system to correctly determine whether an application is compatible with |
| 263 | the system, prior to installing the application. </p> |
| 264 | |
| 265 | <p>To use APIs introduced in Android {@sdkPlatformVersion} in your application, |
| 266 | you need compile the application against the Android library that is provided in |
| 267 | the Android {@sdkPlatformVersion} SDK platform. Depending on your needs, you might |
| 268 | also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code> |
| 269 | attribute to the <code><uses-sdk></code> element in the application's |
| 270 | manifest. If your application is designed to run only on Android 2.3 and higher, |
| 271 | declaring the attribute prevents the application from being installed on earlier |
| 272 | versions of the platform.</p> |
| 273 | |
| 274 | <p>For more information about how to use API Level, see the <a |
| 275 | href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p> |
| 276 | |
| 277 | <h2 id="apps">Built-in Applications</h2> |
| 278 | |
| 279 | <p>The system image included in the downloadable platform provides these |
| 280 | built-in applications:</p> |
| 281 | |
| 282 | <table style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 283 | <tr> |
| 284 | <td style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 285 | <ul> |
| 286 | <li>Browser</li> |
| 287 | <li>Calculator</li> |
| 288 | <li>Camera</li> |
| 289 | <li>Clock</li> |
| 290 | <li>Contacts</li> |
| 291 | <li>Cusom Locale</li> |
| 292 | <li>Dev Tools</li> |
| 293 | <li>Downloads</li> |
| 294 | <li>Email</li> |
| 295 | </ul> |
| 296 | </td> |
| 297 | <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> |
| 298 | <ul> |
| 299 | <li>Gallery</li> |
| 300 | <li>IMEs for Japanese, Chinese, and Latin text input</li> |
| 301 | <li>Messaging</li> |
| 302 | <li>Music</li> |
| 303 | <li>Phone</li> |
| 304 | <li>Search</li> |
| 305 | <li>Settings</li> |
| 306 | <li>Spare Parts (developer app)</li> |
| 307 | <li>Speech Recorder</li> |
| 308 | </ul> |
| 309 | </td> |
| 310 | </tr> |
| 311 | </table> |
| 312 | |
| 313 | |
| 314 | <h2 id="locs" style="margin-top:.75em;">Locales</h2> |
| 315 | |
| 316 | <p>The system image included in the downloadable SDK platform provides a variety of |
| 317 | built-in locales. In some cases, region-specific strings are available for the |
| 318 | locales. In other cases, a default version of the language is used. The |
| 319 | languages that are available in the Android {@sdkPlatformVersion} system |
| 320 | image are listed below (with <em>language</em>_<em>country/region</em> locale |
| 321 | descriptor).</p> |
| 322 | |
| 323 | <table style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 324 | <tr> |
| 325 | <td style="border:0;padding-bottom:0;margin-bottom:0;"> |
| 326 | <ul> |
| 327 | <li>Arabic, Egypt (ar_EG)</li> |
| 328 | <li>Arabic, Israel (ar_IL)</li> |
| 329 | <li>Bulgarian, Bulgaria (bg_BG)</li> |
| 330 | <li>Catalan, Spain (ca_ES)</li> |
| 331 | <li>Czech, Czech Republic (cs_CZ)</li> |
| 332 | <li>Danish, Denmark(da_DK)</li> |
| 333 | <li>German, Austria (de_AT)</li> |
| 334 | <li>German, Switzerland (de_CH)</li> |
| 335 | <li>German, Germany (de_DE)</li> |
| 336 | <li>German, Liechtenstein (de_LI)</li> |
| 337 | <li>Greek, Greece (el_GR)</li> |
| 338 | <li>English, Australia (en_AU)</li> |
| 339 | <li>English, Canada (en_CA)</li> |
| 340 | <li>English, Britain (en_GB)</li> |
| 341 | <li>English, Ireland (en_IE)</li> |
| 342 | <li>English, India (en_IN)</li> |
| 343 | <li>English, New Zealand (en_NZ)</li> |
| 344 | <li>English, Singapore(en_SG)</li> |
| 345 | <li>English, US (en_US)</li> |
| 346 | <li>English, Zimbabwe (en_ZA)</li> |
| 347 | <li>Spanish (es_ES)</li> |
| 348 | <li>Spanish, US (es_US)</li> |
| 349 | <li>Finnish, Finland (fi_FI)</li> |
| 350 | <li>French, Belgium (fr_BE)</li> |
| 351 | <li>French, Canada (fr_CA)</li> |
| 352 | <li>French, Switzerland (fr_CH)</li> |
| 353 | <li>French, France (fr_FR)</li> |
| 354 | <li>Hebrew, Israel (he_IL)</li> |
| 355 | <li>Hindi, India (hi_IN)</li> |
| 356 | </ul> |
| 357 | </td> |
| 358 | <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> |
| 359 | <li>Croatian, Croatia (hr_HR)</li> |
| 360 | <li>Hungarian, Hungary (hu_HU)</li> |
| 361 | <li>Indonesian, Indonesia (id_ID)</li> |
| 362 | <li>Italian, Switzerland (it_CH)</li> |
| 363 | <li>Italian, Italy (it_IT)</li> |
| 364 | <li>Japanese (ja_JP)</li> |
| 365 | <li>Korean (ko_KR)</li> |
| 366 | <li>Lithuanian, Lithuania (lt_LT)</li> |
| 367 | <li>Latvian, Latvia (lv_LV)</li> |
| 368 | <li>Norwegian-Bokmol, Norway(nb_NO)</li> |
| 369 | <li>Dutch, Belgium (nl_BE)</li> |
| 370 | <li>Dutch, Netherlands (nl_NL)</li> |
| 371 | <li>Polish (pl_PL)</li> |
| 372 | <li>Portuguese, Brazil (pt_BR)</li> |
| 373 | <li>Portuguese, Portugal (pt_PT)</li> |
| 374 | <li>Romanian, Romania (ro_RO)</li> |
| 375 | <li>Russian (ru_RU)</li></li> |
| 376 | <li>Slovak, Slovakia (sk_SK)</li> |
| 377 | <li>Slovenian, Slovenia (sl_SI)</li> |
| 378 | <li>Serbian (sr_RS)</li> |
| 379 | <li>Swedish, Sweden (sv_SE)</li> |
| 380 | <li>Thai, Thailand (th_TH)</li> |
| 381 | <li>Tagalog, Philippines (tl_PH)</li> |
| 382 | <li>Turkish, Turkey (tr_TR)</li> |
| 383 | <li>Ukrainian, Ukraine (uk_UA)</li> |
| 384 | <li>Vietnamese, Vietnam (vi_VN)</li> |
| 385 | <li>Chinese, PRC (zh_CN)</li> |
| 386 | <li>Chinese, Taiwan (zh_TW)</li> |
| 387 | </td> |
| 388 | </tr> |
| 389 | </table> |
| 390 | |
| 391 | <p class="note"><strong>Note:</strong> The Android platform may support more |
| 392 | locales than are included in the SDK system image. All of the supported locales |
| 393 | are available in the <a href="http://source.android.com/">Android Open Source |
| 394 | Project</a>.</p> |
| 395 | |
| 396 | <h2 id="skins">Emulator Skins</h2> |
| 397 | |
| 398 | <p>The downloadable platform includes a set of emulator skins that you can use |
| 399 | for modeling your application in different screen sizes and resolutions. The |
| 400 | emulator skins are:</p> |
| 401 | |
| 402 | <ul> |
| 403 | <li> |
| 404 | QVGA (240x320, low density, small screen) |
| 405 | </li> |
| 406 | <li> |
| 407 | WQVGA400 (240x400, low density, normal screen) |
| 408 | </li> |
| 409 | <li> |
| 410 | WQVGA432 (240x432, low density, normal screen) |
| 411 | </li> |
| 412 | <li> |
| 413 | HVGA (320x480, medium density, normal screen) |
| 414 | </li> |
| 415 | <li> |
| 416 | WVGA800 (480x800, high density, normal screen) |
| 417 | </li> |
| 418 | <li> |
| 419 | WVGA854 (480x854 high density, normal screen) |
| 420 | </li> |
| 421 | </ul> |
| 422 | |
| 423 | <p>For more information about how to develop an application that displays |
| 424 | and functions properly on all Android-powered devices, see <a |
| 425 | href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple |
| 426 | Screens</a>.</p> |