1 page.title=Android 2.3.4 Platform 2 sdk.platform.version=2.3.4 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="#openaccessory">Open Accessory Library</a></li> 16 <li><a href="#api-level">API Level</a></li> 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> 20 </ol> 21 22 <h2>Reference</h2> 23 <ol> 24 <li><a 25 href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API 26 Differences Report »</a> </li> 27 </ol> 28 29 <h2>See Also</h2> 30 <ol> 31 <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li> 32 </ol> 33 34 </div> 35 </div> 36 37 <p> 38 <em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p> 39 40 <p>Android 2.3.4 is a maintenance release that adds several bug fixes and patches 41 to the Android 2.3 platform, without any API changes from Android 2.3.3. Additionally, 42 Android 2.3.4 brings support for the Open Accessory API to mobile devices, 43 through the optional <a href="#usb">Open Accessory Library</a>. </p> 44 45 <p>For developers, the Android {@sdkPlatformVersion} platform and the Open 46 Accessory Library are available together in the latest version of the Google 47 APIs Add-On, a downloadable component for the Android SDK.</p> 48 49 <p>To get started developing or testing against Android {@sdkPlatformVersion}, 50 use the Android SDK Manager to download the latest version of the Google APIs 51 Add-On into your SDK. For more information, see <a 52 href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>. If you 53 are new to Android, <a href="{@docRoot}sdk/index.html">download the SDK Starter 54 Package</a> first.</p> 55 56 <p>For a high-level introduction to Android 2.3, see the <a 57 href="{@docRoot}sdk/android-2.3-highlights.html">Platform Highlights</a>.</p> 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>(May 2011)</em></a> 112 <div class="toggleme"> 113 <dl> 114 <dt>Dependencies:</dt> 115 <dd> 116 <p>Requires SDK Tools r11 or higher.</p> 117 </dd> 118 119 </dl> 120 </div> 121 </div> 122 123 124 <h2 id="api">API Overview</h2> 125 126 <p>Android 2.3.4 provides the same framework API to applications as Android 2.3.3 127 (API level 10). For a summary of the API, see the 128 <a href="{@docRoot}sdk/android-2.3.3.html">Android 2.3.3 version notes</a>.</p> 129 130 131 <h2 id="openaccessory">Open Accessory Library</h2> 132 133 <p><em>Open Accessory</em> is a new capability for integrating 134 connected peripherals with applications running on the platform. The capability 135 is based on a USB (Universal Serial Bus) stack built into the platform and an 136 API exposed to applications. Peripherals that attach to Android-powered devices 137 as accessories connect as USB hosts. </p> 138 139 <p>Open Accessory is introduced in <a 140 href="{@docRoot}sdk/android-3.1.html#usb">Android 3.1</a> (API level 12), but is 141 made available to devices running Android 2.3.4 by means of an optional external 142 library, the Open Accessory Library. The library exposes a framework API that 143 lets applications discover, communicate with, and manage a variety of device 144 types connected over USB. It also provides the implementation of the API against 145 parts of the Android platform that are not directly exposed to applications in 146 Android 2.3.4.</p> 147 148 <p>The Open Accessory Library is optional on any given device. Device 149 manufacturers may choose whether to include the Open Accessory Library in their 150 products or exclude it. The library is forward-compatible with Android 3.1, so 151 applications developed against Android 2.3.4 will run properly on devices 152 running Android 3.1, if those devices support USB accessories. </p> 153 154 <p>The API provided by the Open Accessory Library is based on the Open Accessory 155 API provided in Android 3.1. In most areas, you can use the same techniques and 156 APIs. However, developing for the Open Accessory Library on Android 2.3.4 differs 157 from the standard USB API in these ways: 158 159 <ul> 160 <li>Obtaining a {@link android.hardware.usb.UsbManager} object — To obtain 161 a {@link android.hardware.usb.UsbManager} object when using the add-on library, 162 use the helper method <code>getInstance()</code> rather than {@link 163 android.content.Context#getSystemService(java.lang.String) getSystemService()} 164 For example: 165 166 <pre>UsbManager manager = UsbManager.getInstance(this);</pre></li> 167 168 <li>Obtaining a {@link android.hardware.usb.UsbAccessory} from a filtered intent 169 — When you filter for a connected device or accessory with an intent 170 filter, the {@link android.hardware.usb.UsbAccessory} object is contained 171 inside the intent that is passed to your application. If you are using the 172 add-on library, you can get the {@link android.hardware.usb.UsbAccessory} object 173 in the following manner: 174 175 <pre>UsbAccessory accessory = UsbManager.getAccessory(intent)</pre></li> 176 177 <li>No USB host support — Android 2.3.4 and the Open Accessory Library do 178 not support USB host mode (for example, through {@link 179 android.hardware.usb.UsbDevice}), although USB host mode is supported in Android 180 3.1. An Android-powered device running Android 2.3.4 can not function as a USB 181 host. The library enables the Android-powered device to function as 182 a peripheral only, with the connected accessory functioning as USB host 183 (through {@link android.hardware.usb.UsbAccessory}).</li> 184 </ul> 185 186 <p>To develop apps using the Open Accessory Library, you need:</p> 187 188 <ul> 189 <li>The latest version of the Android SDK tools</li> 190 <li>The latest version of the Google APIs add-on, which includes the library 191 itself (for linking)</li> 192 <li>An actual hardware device running Android 2.3.4 (or Android 3.1) with USB 193 accessories support, for runtime testing against connected devices</li> 194 </ul> 195 196 <p>For a full discussion of how to develop applications that interact with USB 197 accessories, please see the related <a 198 href="{@docRoot}guide/topics/usb/index.html">developer documentation</a>.</p> 199 200 <p>Additionally, developers can request filtering on Google Play, such that 201 their applications are not available to users whose devices do not provide the 202 appropriate accessory support. To request filtering, add the element below 203 to the application manifest:</p> 204 205 <pre><uses-feature 206 android:name="android.hardware.usb.accessory" 207 android:required="true"></pre> 208 209 210 <h2 id="api-level">API Level</h2> 211 212 <p>The Android 2.3.4 platform does <em>not</em> increment the API level — 213 it uses the same API level as Android 2.3.3, API level 10. 214 215 <p>To use APIs introduced in API level 10 in your application, 216 you need compile the application against the Android library that is provided in 217 the latest version of the Google APIs Add-On, which also includes the Open 218 Accessory Library.</p> 219 220 <p>Depending on your needs, you might 221 also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code> 222 attribute to the <code><uses-sdk></code> element in the application's 223 manifest. If your application is designed to run only on Android 2.3.3 and higher, 224 declaring the attribute prevents the application from being installed on earlier 225 versions of the platform.</p> 226 227 <p>For more information about how to use API Level, see the <a 228 href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p> 229 230 <h2 id="apps">Built-in Applications</h2> 231 232 <p>The system image included in the downloadable platform provides these 233 built-in applications:</p> 234 235 <table style="border:0;padding-bottom:0;margin-bottom:0;"> 236 <tr> 237 <td style="border:0;padding-bottom:0;margin-bottom:0;"> 238 <ul> 239 <li>Browser</li> 240 <li>Calculator</li> 241 <li>Camera</li> 242 <li>Clock</li> 243 <li>Contacts</li> 244 <li>Custom Locale</li> 245 <li>Dev Tools</li> 246 <li>Downloads</li> 247 <li>Email</li> 248 </ul> 249 </td> 250 <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> 251 <ul> 252 <li>Gallery</li> 253 <li>IMEs for Japanese, Chinese, and Latin text input</li> 254 <li>Messaging</li> 255 <li>Music</li> 256 <li>Phone</li> 257 <li>Search</li> 258 <li>Settings</li> 259 <li>Spare Parts (developer app)</li> 260 <li>Speech Recorder</li> 261 </ul> 262 </td> 263 </tr> 264 </table> 265 266 267 <h2 id="locs" style="margin-top:.75em;">Locales</h2> 268 269 <p>The system image included in the downloadable SDK platform provides a variety of 270 built-in locales. In some cases, region-specific strings are available for the 271 locales. In other cases, a default version of the language is used. The 272 languages that are available in the Android {@sdkPlatformVersion} system 273 image are listed below (with <em>language</em>_<em>country/region</em> locale 274 descriptor).</p> 275 276 <table style="border:0;padding-bottom:0;margin-bottom:0;"> 277 <tr> 278 <td style="border:0;padding-bottom:0;margin-bottom:0;"> 279 <ul> 280 <li>Arabic, Egypt (ar_EG)</li> 281 <li>Arabic, Israel (ar_IL)</li> 282 <li>Bulgarian, Bulgaria (bg_BG)</li> 283 <li>Catalan, Spain (ca_ES)</li> 284 <li>Czech, Czech Republic (cs_CZ)</li> 285 <li>Danish, Denmark(da_DK)</li> 286 <li>German, Austria (de_AT)</li> 287 <li>German, Switzerland (de_CH)</li> 288 <li>German, Germany (de_DE)</li> 289 <li>German, Liechtenstein (de_LI)</li> 290 <li>Greek, Greece (el_GR)</li> 291 <li>English, Australia (en_AU)</li> 292 <li>English, Canada (en_CA)</li> 293 <li>English, Britain (en_GB)</li> 294 <li>English, Ireland (en_IE)</li> 295 <li>English, India (en_IN)</li> 296 <li>English, New Zealand (en_NZ)</li> 297 <li>English, Singapore(en_SG)</li> 298 <li>English, US (en_US)</li> 299 <li>English, South Africa (en_ZA)</li> 300 <li>Spanish (es_ES)</li> 301 <li>Spanish, US (es_US)</li> 302 <li>Finnish, Finland (fi_FI)</li> 303 <li>French, Belgium (fr_BE)</li> 304 <li>French, Canada (fr_CA)</li> 305 <li>French, Switzerland (fr_CH)</li> 306 <li>French, France (fr_FR)</li> 307 <li>Hebrew, Israel (he_IL)</li> 308 <li>Hindi, India (hi_IN)</li> 309 </ul> 310 </td> 311 <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> 312 <ul> 313 <li>Croatian, Croatia (hr_HR)</li> 314 <li>Hungarian, Hungary (hu_HU)</li> 315 <li>Indonesian, Indonesia (id_ID)</li> 316 <li>Italian, Switzerland (it_CH)</li> 317 <li>Italian, Italy (it_IT)</li> 318 <li>Japanese (ja_JP)</li> 319 <li>Korean (ko_KR)</li> 320 <li>Lithuanian, Lithuania (lt_LT)</li> 321 <li>Latvian, Latvia (lv_LV)</li> 322 <li>Norwegian-Bokmol, Norway(nb_NO)</li> 323 <li>Dutch, Belgium (nl_BE)</li> 324 <li>Dutch, Netherlands (nl_NL)</li> 325 <li>Polish (pl_PL)</li> 326 <li>Portuguese, Brazil (pt_BR)</li> 327 <li>Portuguese, Portugal (pt_PT)</li> 328 <li>Romanian, Romania (ro_RO)</li> 329 <li>Russian (ru_RU)</li></li> 330 <li>Slovak, Slovakia (sk_SK)</li> 331 <li>Slovenian, Slovenia (sl_SI)</li> 332 <li>Serbian (sr_RS)</li> 333 <li>Swedish, Sweden (sv_SE)</li> 334 <li>Thai, Thailand (th_TH)</li> 335 <li>Tagalog, Philippines (tl_PH)</li> 336 <li>Turkish, Turkey (tr_TR)</li> 337 <li>Ukrainian, Ukraine (uk_UA)</li> 338 <li>Vietnamese, Vietnam (vi_VN)</li> 339 <li>Chinese, PRC (zh_CN)</li> 340 <li>Chinese, Taiwan (zh_TW)</li> 341 </ul> 342 </td> 343 </tr> 344 </table> 345 346 <p class="note"><strong>Note:</strong> The Android platform may support more 347 locales than are included in the SDK system image. All of the supported locales 348 are available in the <a href="http://source.android.com/">Android Open Source 349 Project</a>.</p> 350 351 <h2 id="skins">Emulator Skins</h2> 352 353 <p>The downloadable platform includes a set of emulator skins that you can use 354 for modeling your application in different screen sizes and resolutions. The 355 emulator skins are:</p> 356 357 <ul> 358 <li> 359 QVGA (240x320, low density, small screen) 360 </li> 361 <li> 362 WQVGA400 (240x400, low density, normal screen) 363 </li> 364 <li> 365 WQVGA432 (240x432, low density, normal screen) 366 </li> 367 <li> 368 HVGA (320x480, medium density, normal screen) 369 </li> 370 <li> 371 WVGA800 (480x800, high density, normal screen) 372 </li> 373 <li> 374 WVGA854 (480x854 high density, normal screen) 375 </li> 376 </ul> 377 378 <p>For more information about how to develop an application that displays 379 and functions properly on all Android-powered devices, see <a 380 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 381 Screens</a>.</p> 382