1 page.title=Android 3.0 Platform 2 sdk.platform.version=3.0 3 sdk.platform.apiLevel=11 4 @jd:body 5 6 <div id="qv-wrapper"> 7 <div id="qv"> 8 9 <h2>In this document</h2> 10 <ol> 11 <li><a href="#relnotes">Revisions</a></li> 12 <li><a href="#api">API Overview</a></li> 13 <li><a href="#api-level">API Level</a></li> 14 <li><a href="#apps">Built-in Applications</a></li> 15 <li><a href="#locs">Locales</a></li> 16 <li><a href="#skins">Emulator Skins</a></li> 17 </ol> 18 19 <h2>Reference</h2> 20 <ol> 21 <li><a 22 href="{@docRoot}sdk/api_diff/11/changes.html">API 23 Differences Report »</a> </li> 24 </ol> 25 26 <h2>See Also</h2> 27 <ol> 28 <li><a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for Android 3.0</a></li> 29 </ol> 30 31 </div> 32 </div> 33 34 35 <p><em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p> 36 37 <p>For developers, the Android {@sdkPlatformVersion} platform is available as a downloadable 38 component for the Android SDK. The downloadable platform includes an Android library and system 39 image, as well as a set of emulator skins and more. The downloadable platform includes no external 40 libraries.</p> 41 42 <p>To get started developing or testing against Android {@sdkPlatformVersion}, use the Android SDK 43 Manager to download the platform into your SDK. For more information, see <a 44 href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>. If you are new to Android, <a 45 href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p> 46 47 <p>For a high-level introduction to Android {@sdkPlatformVersion}, see the <a 48 href="{@docRoot}sdk/android-{@sdkPlatformVersion}-highlights.html">Platform 49 Highlights</a>.</p> 50 51 <p class="note"><strong>Note:</strong> 52 If you've already published an Android application, please test and optimize your application on 53 Android 3.0 as soon as possible. You should do so to be sure your application provides the best 54 experience possible on the latest Android-powered devices. For information about what you can do, 55 read <a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for Android 56 3.0</a>.</p> 57 58 59 <h2 id="relnotes">Revisions</h2> 60 61 <p>To determine what revision of the Android {@sdkPlatformVersion} platform you have installed, 62 refer to the "Installed Packages" listing in the Android SDK and AVD Manager.</p> 63 64 65 66 <div class="toggle-content opened" style="padding-left:1em;"> 67 68 <p><a href="#" onclick="return toggleContent(this)"> 69 <img src="{@docRoot}assets/images/triangle-opened.png" 70 class="toggle-content-img" alt="" /> 71 Android {@sdkPlatformVersion}, Revision 2</a> <em>(July 2011)</em> 72 </a></p> 73 74 <div class="toggle-content-toggleme" style="padding-left:2em;"> 75 76 <dl> 77 <dt>Dependencies:</dt> 78 <dd> 79 <p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a> or 80 higher.</p> 81 </dd> 82 <dt>Notes:</dt> 83 <dd> 84 <p>Improvements to the platform's rendering library to support the visual layout editor in the ADT 85 Eclipse plugin. This revision allows for more drawing features in ADT and fixes several 86 bugs in the previous rendering library. It also unlocks several editor features that were added in 87 ADT 12.</p> 88 </dd> 89 </dl> 90 91 </div> 92 </div> 93 94 <div class="toggle-content closed" style="padding-left:1em;"> 95 96 <p><a href="#" onclick="return toggleContent(this)"> 97 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" /> 98 Android {@sdkPlatformVersion}, Revision 1</a> <em>(February 2011)</em> 99 </a></p> 100 101 <div class="toggle-content-toggleme" style="padding-left:2em;"> 102 103 <dl> 104 <dt>Dependencies:</dt> 105 <dd> 106 <p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r10</a> or higher.</p> 107 </dd> 108 </dl> 109 110 </div> 111 </div> 112 113 114 115 <h2 id="#api">API Overview</h2> 116 117 <p>The sections below provide a technical overview of what's new for developers in Android 3.0, 118 including new features and changes in the framework API since the previous version.</p> 119 120 121 122 123 124 <h3>Fragments</h3> 125 126 <p>A fragment is a new framework component that allows you to separate distinct elements of an 127 activity into self-contained modules that define their own UI and lifecycle. To create a 128 fragment, you must extend the {@link android.app.Fragment} class and implement several lifecycle 129 callback methods, similar to an {@link android.app.Activity}. You can then combine multiple 130 fragments in a single activity to build a multi-pane UI in which each 131 pane manages its own lifecycle and user inputs.</p> 132 133 <p>You can also use a fragment without providing a UI and instead use the fragment as a worker 134 for the activity, such as to manage the progress of a download that occurs only while the 135 activity is running.</p> 136 137 <p>Additionally:</p> 138 139 <ul> 140 <li>Fragments are self-contained and you can reuse them in multiple activities</li> 141 <li>You can add, remove, replace and animate fragments inside the activity</li> 142 <li>You can add fragments to a back stack managed by the activity, preserving the state of 143 fragments as they are changed and allowing the user to navigate backward through the different 144 states</li> 145 <li>By <a 146 href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">providing 147 alternative layouts</a>, you can mix and match fragments, based 148 on the screen size and orientation</li> 149 <li>Fragments have direct access to their container activity and can contribute items to the 150 activity's Action Bar (discussed next)</li> 151 </ul> 152 153 <p>To manage the fragments in your activity, you must use the {@link 154 android.app.FragmentManager}, which provides several APIs for interacting with fragments, such 155 as finding fragments in the activity and popping fragments off the back stack to restore their 156 previous state.</p> 157 158 <p>To perform a transaction, such as add or remove a fragment, you must create a {@link 159 android.app.FragmentTransaction}. You can then call methods such as {@link 160 android.app.FragmentTransaction#add add()} {@link android.app.FragmentTransaction#remove 161 remove()}, or {@link android.app.FragmentTransaction#replace replace()}. Once you've applied all 162 the changes you want to perform for the transaction, you must call {@link 163 android.app.FragmentTransaction#commit commit()} and the system applies the fragment transaction to 164 the activity.</p> 165 166 <p>For more information about using fragments, read the <a 167 href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> documentation. Several 168 samples are also available in the <a 169 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment"> 170 API Demos</a> application.</p> 171 172 173 174 175 <h3>Action Bar</h3> 176 177 <p>The Action Bar is a replacement for the traditional title bar at the top of the activity window. 178 It includes the application logo in the left corner and provides a new interface for items in the 179 <a href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options Menu</a>. Additionally, the 180 Action Bar allows you to:</p> 181 182 <ul> 183 <li>Add menu items directly in the Action Bar—as "action items." 184 <p>In your XML declaration for the menu item, include the {@code 185 android:showAsAction} attribute with a value of {@code "ifRoom"}. When there's enough room, the menu 186 item appears directly in the Action Bar. Otherwise, the item is placed in the 187 overflow menu, revealed by the menu icon on the right side of the Action Bar.</p></li> 188 189 <li>Replace an action item with a widget (such as a search box)—creating an 190 "action view." 191 <p>In the XML declaration for the menu item, add the {@code android:actionViewLayout} attribute 192 with a layout resource or the {@code android:actionViewClass} attribute with the class name of a 193 widget. (You must also declare the {@code android:showAsAction} attribute so that the item appears 194 in the Action Bar.) If there's not enough room in the Action Bar and the item appears in the 195 overflow menu, it behaves like a regular menu item and does not show the widget.</p></li> 196 197 <li>Add an action to the application logo and replace it with a custom logo 198 <p>The application logo is automatically assigned the {@code android.R.id.home} ID, 199 which the system delivers to your activity's {@link android.app.Activity#onOptionsItemSelected 200 onOptionsItemSelected()} callback when touched. Simply respond to this ID in your callback 201 method to perform an action such as go to your application's "home" activity.</p> 202 <p>To replace the icon with a logo, specify your application logo in the manifest file with the 203 <a href="{@docRoot}guide/topics/manifest/application-element.html#logo">{@code android:logo}</a> 204 attribute, then call {@link android.app.ActionBar#setDisplayUseLogoEnabled 205 setDisplayUseLogoEnabled(true)} in your activity.</p></li> 206 207 <li>Add breadcrumbs to navigate backward through the back stack of fragments</li> 208 <li>Add tabs or a drop-down list to navigate through fragments</li> 209 <li>Customize the Action Bar with themes and backgrounds</li> 210 </ul> 211 212 <p>The Action Bar is standard for all applications that use the new holographic theme, which is 213 also standard when you set either the <a 214 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code 215 android:minSdkVersion}</a> or <a 216 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code 217 android:targetSdkVersion}</a> to {@code "11"}.</p> 218 219 <p>For more information about the Action Bar, read the <a 220 href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> documentation. Several 221 samples are also available in the <a 222 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#ActionBar"> 223 API Demos</a> application.</p> 224 225 226 227 228 <h3>System clipboard</h3> 229 230 <p>Applications can now copy and paste data (beyond mere text) to and from the system-wide 231 clipboard. Clipped data can be plain text, a URI, or an intent.</p> 232 233 <p>By providing the system access to the data you want the user to copy, through a content provider, 234 the user can copy complex content (such as an image or data structure) from your application and 235 paste it into another application that supports that type of content.</p> 236 237 <p>To start using the clipboard, get the global {@link android.content.ClipboardManager} object 238 by calling {@link android.content.Context#getSystemService getSystemService(CLIPBOARD_SERVICE)}.</p> 239 240 <p>To copy an item to the clipboard, you need to create a new {@link 241 android.content.ClipData} object, which holds one or more {@link android.content.ClipData.Item} 242 objects, each describing a single entity. To create a {@link android.content.ClipData} object 243 containing just one {@link android.content.ClipData.Item}, you can use one of the helper methods, 244 such as {@link android.content.ClipData#newPlainText newPlainText()}, {@link 245 android.content.ClipData#newUri newUri()}, and {@link android.content.ClipData#newIntent 246 newIntent()}, which each return a {@link android.content.ClipData} object pre-loaded with the 247 {@link android.content.ClipData.Item} you provide.</p> 248 249 <p>To add the {@link android.content.ClipData} to the clipboard, pass it to {@link 250 android.content.ClipboardManager#setPrimaryClip setPrimaryClip()} for your instance of {@link 251 android.content.ClipboardManager}.</p> 252 253 <p>You can then read a file from the clipboard (in order to paste it) by calling {@link 254 android.content.ClipboardManager#getPrimaryClip()} on the {@link 255 android.content.ClipboardManager}. Handling the {@link android.content.ClipData} you receive can 256 be complicated and you need to be sure you can actually handle the data type in the clipboard 257 before attempting to paste it.</p> 258 259 <p>The clipboard holds only one piece of clipped data (a {@link android.content.ClipData} 260 object) at a time, but one {@link android.content.ClipData} can contain multiple {@link 261 android.content.ClipData.Item}s.</p> 262 263 <p>For more information, read the <a href="{@docRoot}guide/topics/clipboard/copy-paste.html">Copy 264 and Paste</a> documentation. You can also see a simple implementation of copy and paste in the <a 265 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/content/ClipboardSample. 266 html">API Demos</a> and a more complete implementation in the <a 267 href="{@docRoot}resources/samples/NotePad/index.html">Note Pad</a> application.</p> 268 269 270 271 272 <h3>Drag and drop</h3> 273 274 <p>New APIs simplify drag and drop operations in your application's user interface. A drag 275 operation is the transfer of some kind of data—carried in a {@link android.content.ClipData} 276 object—from one place to another. The start and end point for the drag operation is a {@link 277 android.view.View}, so the APIs that directly handle the drag and drop operations are 278 in the {@link android.view.View} class.</p> 279 280 <p>A drag and drop operation has a lifecycle that's defined by several drag actions—each 281 defined by a {@link android.view.DragEvent} object—such as {@link 282 android.view.DragEvent#ACTION_DRAG_STARTED}, {@link android.view.DragEvent#ACTION_DRAG_ENTERED}, and 283 {@link android.view.DragEvent#ACTION_DROP}. Each view that wants to participate in a drag 284 operation can listen for these actions.</p> 285 286 <p>To begin dragging content in your activity, call {@link android.view.View#startDrag startDrag()} 287 on a {@link android.view.View}, providing a {@link android.content.ClipData} object that represents 288 the data to drag, a {@link android.view.View.DragShadowBuilder} to facilitate the "shadow" 289 that users see under their fingers while dragging, and an {@link java.lang.Object} that can share 290 information about the drag object with views that may receive the object.</p> 291 292 <p>To accept a drag object in a {@link android.view.View} (receive the "drop"), register the view 293 with an {@link android.view.View.OnDragListener OnDragListener} by calling {@link 294 android.view.View#setOnDragListener setOnDragListener()}. When a drag event occurs on the view, the 295 system calls {@link android.view.View.OnDragListener#onDrag onDrag()} for the {@link 296 android.view.View.OnDragListener OnDragListener}, which receives a {@link android.view.DragEvent} 297 describing the type of drag action has occurred (such as {@link 298 android.view.DragEvent#ACTION_DRAG_STARTED}, {@link android.view.DragEvent#ACTION_DRAG_ENTERED}, and 299 {@link android.view.DragEvent#ACTION_DROP}). During a drag, the system repeatedly calls {@link 300 android.view.View.OnDragListener#onDrag onDrag()} for the view underneath the drag, to deliver a 301 stream of drag events. The receiving view can inquire the event type delivered to {@link 302 android.view.View#onDragEvent onDragEvent()} by calling {@link android.view.DragEvent#getAction 303 getAction()} on the {@link android.view.DragEvent}.</p> 304 305 <p class="note"><strong>Note:</strong> Although a drag event may carry a {@link 306 android.content.ClipData} object, this is not related to the system clipboard. A drag and drop 307 operation should never put the dragged data in the system clipboard.</p> 308 309 <p>For more information, read the <a href="{@docRoot}guide/topics/ui/drag-drop.html">Dragging and 310 Dropping</a> documentation. You can also see an implementation of drag and drop in the <a 311 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.html"> 312 API Demos</a> application and the <a 313 href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a> 314 application.</p> 315 316 317 318 <h3>App widgets</h3> 319 320 <p>Android 3.0 supports several new widget classes for more interactive app widgets on the users 321 Home screen, including: {@link android.widget.GridView}, {@link android.widget.ListView}, {@link 322 android.widget.StackView}, {@link android.widget.ViewFlipper}, and {@link 323 android.widget.AdapterViewFlipper}.</p> 324 325 <p>More importantly, you can use the new {@link android.widget.RemoteViewsService} to create app 326 widgets with collections, using widgets such as {@link android.widget.GridView}, {@link 327 android.widget.ListView}, and {@link android.widget.StackView} that are backed by remote data, 328 such as from a content provider.</p> 329 330 <p>The {@link android.appwidget.AppWidgetProviderInfo} class (defined in XML with an {@code 331 <appwidget-provider>} element) also supports two new fields: {@link 332 android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} and {@link 333 android.appwidget.AppWidgetProviderInfo#previewImage}. The {@link 334 android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} field lets you specify the view ID of the 335 app widget subview that should be auto-advanced by the app widgets host. The 336 {@link android.appwidget.AppWidgetProviderInfo#previewImage} field specifies a preview of what the 337 app widget looks like and is shown to the user from the widget picker. If this field is not 338 supplied, the app widget's icon is used for the preview.</p> 339 340 <p>To help create a preview image for your app widget (to specify in the {@link 341 android.appwidget.AppWidgetProviderInfo#previewImage} field), the Android emulator includes an 342 application called "Widget Preview." To create a preview image, launch this application, select the 343 app widget for your application and set it up how you'd like your preview image to appear, then save 344 it and place it in your application's drawable resources.</p> 345 346 <p>You can see an implementation of the new app widget features in the <a 347 href="{@docRoot}resources/samples/StackWidget/index.html">StackView App Widget</a> and <a 348 href="{@docRoot}resources/samples/WeatherListWidget/index.html">Weather List Widget</a> 349 applications.</p> 350 351 352 353 <h3>Status bar notifications</h3> 354 355 <p>The {@link android.app.Notification} APIs have been extended to support more content-rich status 356 bar notifications, plus a new {@link android.app.Notification.Builder} class allows you to easily 357 create {@link android.app.Notification} objects.</p> 358 <p>New features include:</p> 359 <ul> 360 <li>Support for a large icon in the notification, using {@link 361 android.app.Notification.Builder#setLargeIcon setLargeIcon()}. This is usually for 362 social applications to show the contact photo of the person who is the source of the 363 notification or for media apps to show an album thumbnail.</li> 364 <li>Support for custom layouts in the status bar ticker, using {@link 365 android.app.Notification.Builder#setTicker(CharSequence,RemoteViews) setTicker()}.</li> 366 <li>Support for custom notification layouts to include buttons with {@link 367 android.app.PendingIntent}s, for more interactive notification widgets. For example, a 368 notification can control music playback without starting an activity.</li> 369 </ul> 370 371 372 373 <h3>Content loaders</h3> 374 375 <p>New framework APIs facilitate asynchronous loading of data using the {@link 376 android.content.Loader} class. You can use it in combination with UI components such as views and 377 fragments to dynamically load data from worker threads. The {@link 378 android.content.CursorLoader} subclass is specially designed to help you do so for data backed by 379 a {@link android.content.ContentProvider}.</p> 380 381 <p>All you need to do is implement the {@link android.app.LoaderManager.LoaderCallbacks 382 LoaderCallbacks} interface to receive callbacks when a new loader is requested or the data has 383 changed, then call {@link android.app.LoaderManager#initLoader initLoader()} to initialize the 384 loader for your activity or fragment.</p> 385 386 <p>For more information, read the <a 387 href="{@docRoot}guide/topics/fundamentals/loaders.html">Loaders</a> documentation. You can also see 388 example code using loaders in the <a 389 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentListCursorLoader.html">FragmentListCursorLoader</a> 390 and <a 391 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html"> 392 LoaderThrottle</a> samples.</p> 393 394 395 396 <h3>Bluetooth A2DP and headset APIs</h3> 397 398 <p>Android now includes APIs for applications to verify the state of connected Bluetooth A2DP and 399 headset profile devices. For example, applications can identify when a Bluetooth headset is 400 connected for listening to music and notify the user as appropriate. Applications can also receive 401 broadcasts for vendor specific AT commands and notify the user about the state of the connected 402 device, such as when the connected device's battery is low.</p> 403 404 <p>You can initialize the respective {@link android.bluetooth.BluetoothProfile} by calling {@link 405 android.bluetooth.BluetoothAdapter#getProfileProxy getProfileProxy()} with either the {@link 406 android.bluetooth.BluetoothProfile#A2DP} or {@link android.bluetooth.BluetoothProfile#HEADSET} 407 profile constant and a {@link android.bluetooth.BluetoothProfile.ServiceListener} to receive 408 callbacks when the Bluetooth client is connected or disconnected.</p> 409 410 411 412 413 <h3 id="animation">Animation framework</h3> 414 415 <p>An all new flexible animation framework allows you to animate arbitrary properties of any object 416 (View, Drawable, Fragment, Object, or anything else). It allows you to define several aspects of an 417 animation, such as:</p> 418 <ul> 419 <li>Duration</li> 420 <li>Repeat amount and behavior</li> 421 <li>Type of time interpolation</li> 422 <li>Animator sets to play animations together, sequentially, or after specified delays</li> 423 <li>Frame refresh delay</li> 424 </ul> 425 426 <p>You can define these animation aspects, and others, for an object's int, float, and hexadecimal 427 color values, by default. That is, when an object has a property field for one of these types, you 428 can change its value over time to affect an animation. To animate any other type of value, you tell 429 the system how to calculate the values for that given type, by implementing the {@link 430 android.animation.TypeEvaluator} interface.</p> 431 432 <p>There are two animators you can use to animate the values of a property: {@link 433 android.animation.ValueAnimator} and {@link android.animation.ObjectAnimator}. The {@link 434 android.animation.ValueAnimator} computes the animation values, but is not aware of the specific 435 object or property that is animated as a result. It simply performs the calculations, and you must 436 listen for the updates and process the data with your own logic. The {@link 437 android.animation.ObjectAnimator} is a subclass of {@link android.animation.ValueAnimator} and 438 allows you to set the object and property to animate, and it handles all animation work. 439 That is, you give the {@link android.animation.ObjectAnimator} the object to animate, the 440 property of the object to change over time, and a set of values to apply to the property over 441 time, then start the animation.</p> 442 443 <p>Additionally, the {@link android.animation.LayoutTransition} class enables automatic transition 444 animations for changes you make to your activity layout. To enable transitions for part of the 445 layout, create a {@link android.animation.LayoutTransition} object and set it on 446 any {@link android.view.ViewGroup} by calling {@link 447 android.view.ViewGroup#setLayoutTransition setLayoutTransition()}. This causes default 448 animations to run whenever items are added to or removed from the group. To specify custom 449 animations, call {@link android.animation.LayoutTransition#setAnimator setAnimator()} on the {@link 450 android.animation.LayoutTransition} and provide a custom {@link android.animation.Animator}, 451 such as a {@link android.animation.ValueAnimator} or {@link android.animation.ObjectAnimator} 452 discussed above.</p> 453 454 <p>For more information, see the <a 455 href="{@docRoot}guide/topics/graphics/animation.html">Property Animation</a> documentation. You can 456 also see several samples using the animation APIs in the <a 457 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/animation/index.html">API 458 Demos</a> application.</p> 459 460 461 462 463 <h3>Extended UI framework</h3> 464 465 <ul> 466 467 <li><b>Multiple-choice selection for ListView and GridView</b> 468 469 <p>New {@link android.widget.AbsListView#CHOICE_MODE_MULTIPLE_MODAL} mode for {@link 470 android.widget.AbsListView#setChoiceMode setChoiceMode()} allows users to select multiple items 471 from a {@link android.widget.ListView} or {@link android.widget.GridView}. When used in 472 conjunction with the Action Bar, users can select multiple items and then select the action to 473 perform from a list of options in the Action Bar (which has transformed into a Multi-choice 474 Action Mode).</p> 475 476 <p>To enable multiple-choice selection, call {@link 477 android.widget.AbsListView#setChoiceMode setChoiceMode(CHOICE_MODE_MULTIPLE_MODAL)} and register a 478 {@link android.widget.AbsListView.MultiChoiceModeListener MultiChoiceModeListener} with {@link 479 android.widget.AbsListView#setMultiChoiceModeListener setMultiChoiceModeListener()}.</p> 480 481 <p>When the user performs a long-press on an item, the Action Bar switches to the Multi-choice 482 Action Mode. The system notifies the {@link android.widget.AbsListView.MultiChoiceModeListener 483 MultiChoiceModeListener} when items are selected by calling {@link 484 android.widget.AbsListView.MultiChoiceModeListener#onItemCheckedStateChanged 485 onItemCheckedStateChanged()}.</p> 486 487 <p>For an example of multiple-choice selection, see the <a 488 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List15.html">List15. 489 java</a> 490 class in the API Demos sample application.</p> 491 </li> 492 493 494 <li><b>New APIs to transform views</b> 495 496 <p>New APIs allow you to easily apply 2D and 3D transformations to views in your activity 497 layout. New transformations are made possible with a set of object properties that define the view's 498 layout position, orientation, transparency and more.</p> 499 <p>New methods to set the view properties include: {@link android.view.View#setAlpha 500 setAlpha()}, {@link 501 android.view.View#setBottom setBottom()}, {@link android.view.View#setLeft setLeft()}, {@link 502 android.view.View#setRight setRight()}, {@link android.view.View#setBottom setBottom()}, {@link 503 android.view.View#setPivotX setPivotX()}, {@link android.view.View#setPivotY setPivotY()}, {@link 504 android.view.View#setRotationX setRotationX()}, {@link android.view.View#setRotationY 505 setRotationY()}, {@link android.view.View#setScaleX setScaleX()}, {@link android.view.View#setScaleY 506 setScaleY()}, {@link android.view.View#setAlpha setAlpha()}, and others.</p> 507 508 <p>Some methods also have a corresponding XML attribute that you can specify in your layout 509 file, to apply a default transformation. Available attributes include: {@code translationX}, {@code 510 translationY}, {@code rotation}, 511 {@code rotationX}, {@code rotationY}, {@code scaleX}, {@code scaleY}, {@code transformPivotX}, 512 {@code transformPivotY}, and {@code alpha}.</p> 513 514 <p>Using some of these new view properties in combination with the new <a 515 href="#animation">animation framework</a> (discussed 516 above), you can easily apply some fancy animations to your views. For example, to rotate a 517 view on its y-axis, supply {@link android.animation.ObjectAnimator} with the {@link 518 android.view.View}, the "rotationY" property, and the start and end values:</p> 519 <pre> 520 ObjectAnimator animator = ObjectAnimator.ofFloat(myView, "rotationY", 0, 360); 521 animator.setDuration(2000); 522 animator.start(); 523 </pre> 524 </li> 525 526 527 <li><b>New holographic themes</b> 528 529 <p>The standard system widgets and overall look have been redesigned and incorporate a new 530 "holographic" user interface theme. The system applies the new theme 531 using the standard <a href="{@docRoot}guide/topics/ui/themes.html">style and theme</a> system.</p> 532 533 <p>Any application that targets the Android 3.0 platform—by setting either the <a 534 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a> 535 or <a 536 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code 537 android:targetSdkVersion}</a> value to {@code "11"}—inherits the holographic theme by default. 538 However, if your application also applies its own theme, then your theme will override the 539 holographic theme, unless you update your styles to inherit the holographic theme.</p> 540 541 <p>To apply the holographic theme to individual activities or to inherit them in your own theme 542 definitions, use one of several new {@link android.R.style#Theme_Holo Theme.Holo} 543 themes. If your application is compatible with version of Android lower than 3.0 and applies 544 custom themes, then you should <a 545 href="{@docRoot}guide/topics/ui/themes.html#SelectATheme">select a theme based on platform 546 version</a>.</p> 547 548 </li> 549 550 551 <li><b>New widgets</b> 552 553 <ul> 554 <li>{@link android.widget.AdapterViewAnimator} 555 <p>Base class for an {@link android.widget.AdapterView} that performs animations when switching 556 between its views.</p></li> 557 558 <li>{@link android.widget.AdapterViewFlipper} 559 <p>Simple {@link android.widget.ViewAnimator} that animates between two or more views that have 560 been added to it. Only one child is shown at a time. If requested, it can automatically flip 561 between 562 each child at a regular interval.</p></li> 563 564 <li>{@link android.widget.CalendarView} 565 <p>Allows users to select dates from a calendar by touching the date and can scroll or fling the 566 calendar to a desired date. You can configure the range of dates available in the widget.</p></li> 567 568 <li>{@link android.widget.ListPopupWindow} 569 <p>Anchors itself to a host view and displays a list of choices, such as for a list of 570 suggestions when typing into an {@link android.widget.EditText} view.</p></li> 571 572 <li>{@link android.widget.NumberPicker} 573 <p>Enables the user to select a number from a predefined range. The widget presents an input 574 field and up and down buttons for selecting a number. Touching the input field allows the user to 575 scroll through values or touch again to directly edit the current value. It also allows you to map 576 positions to strings, so that the corresponding string is displayed instead of the index 577 position.</p></li> 578 579 <li>{@link android.widget.PopupMenu} 580 <p>Displays a {@link android.view.Menu} in a modal popup window that's anchored to a view. The 581 popup appears below the anchor view if there is room, or above it if there is not. If the IME (soft 582 keyboard) is visible, the popup does not overlap the IME it until the user touches the 583 menu.</p></li> 584 585 <li>{@link android.widget.SearchView} 586 <p>Provides a search box that you can configure to deliver search queries to a specified 587 activity and display search suggestions (in the same manner as the traditional search dialog). This 588 widget is particularly useful for offering a search widget in the Action Bar. For more information, 589 see <a href="{@docRoot}guide/topics/search/search-dialog.html">Creating a Search Interface.</p></li> 590 591 <li>{@link android.widget.StackView} 592 <p>A view that displays its children in a 3D stack and allows users to swipe through 593 views like a rolodex.</p></li> 594 595 </ul> 596 </li> 597 598 </ul> 599 600 601 602 <h3>Graphics</h3> 603 604 <ul> 605 <li><b>Hardware accelerated 2D graphics</b> 606 607 <p>You can now enable the OpenGL renderer for your application by setting {@code 608 android:hardwareAccelerated="true"} in your manifest element's <a 609 href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a> 610 element or for individual <a 611 href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 612 elements.</p> 613 614 <p>This flag helps applications by making them draw faster. This results in smoother animations, 615 smoother scrolling, and overall better performance and response to user interaction.</p></li> 616 617 618 <li><b>View support for hardware and software layers</b> 619 620 <p>By default, a {@link android.view.View} has no layer specified. You can specify that the 621 view be backed by either a hardware or software layer, specified by values {@link 622 android.view.View#LAYER_TYPE_HARDWARE} and {@link android.view.View#LAYER_TYPE_SOFTWARE}, using 623 {@link android.view.View#setLayerType setLayerType()} or the <a 624 href="{@docRoot}reference/android/view/View.html#attr_android:layerType">{@code layerType}</a> 625 attribute.</p> 626 <p>A hardware layer is backed by a hardware specific texture (generally Frame Buffer Objects or 627 FBO on OpenGL hardware) and causes the view to be rendered using Android's hardware rendering 628 pipeline, but only if hardware acceleration is turned on for the view hierarchy. When hardware 629 acceleration is turned off, hardware layers behave exactly as software layers.</p> 630 <p>A software layer is backed by a bitmap and causes the view to be rendered using Android's 631 software rendering pipeline, even if hardware acceleration is enabled. Software layers should be 632 avoided when the affected view tree updates often. Every update will require to re-render the 633 software layer, which can potentially be slow.</p> 634 <p>For more information, see the {@link android.view.View#LAYER_TYPE_HARDWARE} and {@link 635 android.view.View#LAYER_TYPE_SOFTWARE} documentation.</p> 636 </li> 637 638 639 <li><b>Renderscript 3D graphics engine</b> 640 641 <p>Renderscript is a runtime 3D framework that provides both an API for building 3D scenes as well 642 as a special, platform-independent shader language for maximum performance. Using Renderscript, you 643 can accelerate graphics operations and data processing. Renderscript is an ideal way to create 644 high-performance 3D effects for applications, wallpapers, carousels, and more.</p> 645 <p>For more information, see the <a 646 href="{@docRoot}guide/topics/graphics/renderscript.html">3D Rendering and Computation with 647 Renderscript</a> documentation.</p></li> 648 </ul> 649 650 651 652 653 <h3>Media</h3> 654 655 656 <ul> 657 658 <li><b>Time lapse video</b> 659 660 <p>Camcorder APIs now support the ability to record time lapse video. The {@link 661 android.media.MediaRecorder#setCaptureRate setCaptureRate()} sets the rate at which frames 662 should be captured.</p></li> 663 664 <li><b>Texture support for image streams</b> 665 666 <p>New {@link android.graphics.SurfaceTexture} allows you to capture an image stream as an OpenGL ES 667 texture. By calling {@link android.hardware.Camera#setPreviewTexture setPreviewTexture()} for your 668 {@link android.hardware.Camera} instance, you can specify the {@link 669 android.graphics.SurfaceTexture} upon which to draw video playback or preview frames from the 670 camera.</p></li> 671 672 <li><b>HTTP Live streaming</b> 673 674 <p>Applications can now pass an M3U playlist URL to the media framework to begin an HTTP Live 675 streaming session. The media framework supports most of the HTTP Live streaming specification, 676 including adaptive bit rate. See the <a 677 href="{@docRoot}guide/appendix/media-formats.html">Supported Media Formats</a> document for 678 more information.</p></li> 679 680 <li><b>EXIF data</b> 681 682 <p>The {@link android.media.ExifInterface} includes new fields for photo aperture, ISO, and exposure 683 time.</p></li> 684 685 <li><b>Camcorder profiles</b> 686 687 <p>New {@link android.media.CamcorderProfile#hasProfile hasProfile()} method and several video 688 quality profiles (such as {@link android.media.CamcorderProfile#QUALITY_1080P}, {@link 689 android.media.CamcorderProfile#QUALITY_720P}, {@link 690 android.media.CamcorderProfile#QUALITY_CIF}, and others) allow you to determine camcorder 691 quality options.</p></li> 692 693 <li><b>Digital media file transfer</b> 694 695 <p>The platform includes built-in support for Media/Picture Transfer Protocol (MTP/PTP) over USB, 696 which lets users easily transfer any type of media files between devices and to a host computer. 697 Developers can build on this support, creating applications that let users create or manage rich 698 media files that they may want to transfer or share across devices. </p></li> 699 700 <li><b>Digital rights management (DRM)</b> 701 702 <p>New extensible digital rights management (DRM) framework for checking and enforcing digital 703 rights. It's implemented in two architectural layers:</p> 704 <ul> 705 <li>A DRM framework API, which is exposed to applications and runs through the Dalvik VM for 706 standard applications.</li> 707 <li>A native code DRM manager that implements the framework API and exposes an interface for DRM 708 plug-ins to handle rights management and decryption for various DRM schemes.</li> 709 </ul> 710 711 <p>For application developers, the framework offers an abstract, unified API that simplifies the 712 management of protected content. The API hides the complexity of DRM operations and allows a 713 consistent operation mode for both protected and unprotected content, and across a variety of DRM 714 schemes.</p> 715 716 <p>For device manufacturers, content owners, and Internet digital media providers the DRM 717 framework?s plugin API provides a means of adding support for a DRM scheme of choice into the 718 Android system, for secure enforcement of content protection.</p> 719 720 <p>The preview release does not provide any native DRM plug-ins for checking and enforcing digital 721 rights. However, device manufacturers may ship DRM plug-ins with their devices.</p> 722 723 <p>You can find all of the DRM APIs in the {@link android.drm} package.</p></li> 724 725 </ul> 726 727 728 729 <h3>Keyboard support</h3> 730 731 <ul> 732 <li>Support for Control, Meta, Caps Lock, Num Lock and Scroll Lock modifiers. For more information, 733 see {@link android.view.KeyEvent#META_CTRL_ON} and related fields.</li> 734 735 <li>Support for full desktop-style keyboards, including support for keys such as Escape, Home, End, 736 Delete and others. You can determine whether key events are coming from a full keyboard by 737 querying {@link android.view.KeyCharacterMap#getKeyboardType()} and checking for {@link 738 android.view.KeyCharacterMap#FULL KeyCharacterMap.FULL}</li> 739 740 <li>{@link android.widget.TextView} now supports keyboard-based cut, copy, paste, and select-all, 741 using the key combinations Ctrl+X, Ctrl+C, Ctrl+V, and Ctrl+A. It also supports PageUp/PageDown, 742 Home/End, and keyboard-based text selection.</li> 743 744 <li>{@link android.view.KeyEvent} adds several new methods to make it easier to check the key 745 modifier state correctly and consistently. See {@link android.view.KeyEvent#hasModifiers(int)}, 746 {@link android.view.KeyEvent#hasNoModifiers()}, 747 {@link android.view.KeyEvent#metaStateHasModifiers(int,int) metaStateHasModifiers()}, 748 {@link android.view.KeyEvent#metaStateHasNoModifiers(int) metaStateHasNoModifiers()}.</li> 749 750 <li>Applications can implement custom keyboard shortcuts by subclassing {@link 751 android.app.Activity}, {@link android.app.Dialog}, or {@link android.view.View} and implementing 752 {@link android.app.Activity#onKeyShortcut onKeyShortcut()}. The framework calls this method 753 whenever a key is combined with Ctrl key. When creating an <a 754 href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options Menu</a>, you can register keyboard 755 shortcuts by setting either the {@code android:alphabeticShortcut} or {@code 756 android:numericShortcut} attribute for each <a 757 href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code <item>}</a> 758 element (or with {@link android.view.MenuItem#setShortcut setShortcut()}).</li> 759 760 <li>Android 3.0 includes a new "virtual keyboard" device with the id {@link 761 android.view.KeyCharacterMap#VIRTUAL_KEYBOARD KeyCharacterMap.VIRTUAL_KEYBOARD}. The virtual 762 keyboard has a desktop-style US key map which is useful for synthesizing key events for testing 763 input.</li> 764 765 </ul> 766 767 768 769 770 <h3>Split touch events</h3> 771 772 <p>Previously, only a single view could accept touch events at one time. Android 3.0 773 adds support for splitting touch events across views and even windows, so different views can accept 774 simultaneous touch events.</p> 775 776 <p>Split touch events is enabled by default when an application targets 777 Android 3.0. That is, when the application has set either the <a 778 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a> 779 or <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code 780 android:targetSdkVersion}</a> attribute's value to {@code "11"}.</p> 781 782 <p>However, the following properties allow you to disable split touch events across views inside 783 specific view groups and across windows.</p> 784 785 <ul> 786 <li>The {@link android.R.attr#splitMotionEvents android:splitMotionEvents} attribute for view groups 787 allows you to disable split touch events that occur between child views in a layout. For example: 788 <pre> 789 <LinearLayout android:splitMotionEvents="false" ... > 790 ... 791 </LinearLayout> 792 </pre> 793 <p>This way, child views in the linear layout cannot split touch events—only one view can 794 receive touch events at a time.</p> 795 </li> 796 797 <li>The {@link android.R.attr#windowEnableSplitTouch android:windowEnableSplitTouch} style property 798 allows you to disable split touch events across windows, by applying it to a theme for the activity 799 or entire application. For example: 800 <pre> 801 <style name="NoSplitMotionEvents" parent="android:Theme.Holo"> 802 <item name="android:windowEnableSplitTouch">false</item> 803 ... 804 </style> 805 </pre> 806 <p>When this theme is applied to an <a 807 href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> or <a 808 href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>, 809 only touch events within the current activity window are accepted. For example, by disabling split 810 touch events across windows, the system bar cannot receive touch events at the same time as the 811 activity. This does <em>not</em> affect whether views inside the activity can split touch 812 events—by default, the activity can still split touch events across views.</p> 813 814 <p>For more information about creating a theme, read <a 815 href="{@docRoot}guide/topics/ui/themes.html">Applying Styles and Themes</a>.</p> 816 </li> 817 </ul> 818 819 820 821 <h3>WebKit</h3> 822 823 <ul> 824 <li>New {@link android.webkit.WebViewFragment} class to create a fragment composed of a 825 {@link android.webkit.WebView}.</li> 826 <li>New {@link android.webkit.WebSettings} methods: 827 <ul> 828 <li>{@link 829 android.webkit.WebSettings#setDisplayZoomControls setDisplayZoomControls()} allows you to hide 830 the on-screen zoom controls while still allowing the user to zoom with finger gestures ({@link 831 android.webkit.WebSettings#setBuiltInZoomControls setBuiltInZoomControls()} must be set 832 {@code true}).</li> 833 <li>New {@link android.webkit.WebSettings} method, {@link 834 android.webkit.WebSettings#setEnableSmoothTransition setEnableSmoothTransition()}, allows you 835 to enable smooth transitions when panning and zooming. When enabled, WebView will choose a solution 836 to maximize the performance (for example, the WebView's content may not update during the 837 transition).</li> 838 </ul> 839 <li>New {@link android.webkit.WebView} methods: 840 <ul> 841 <li>{@link android.webkit.WebView#onPause onPause()} callback, to pause any processing 842 associated with the WebView when it becomes hidden. This is useful to reduce unnecessary CPU or 843 network traffic when the WebView is not in the foreground.</li> 844 <li>{@link android.webkit.WebView#onResume onResume()} callback, to resume processing 845 associated with the WebView, which was paused during {@link android.webkit.WebView#onPause 846 onPause()}.</li> 847 <li>{@link android.webkit.WebView#saveWebArchive saveWebArchive()} allows you to save the 848 current view as a web archive on the device.</li> 849 <li>{@link android.webkit.WebView#showFindDialog showFindDialog()} initiates a text search in 850 the current view.</li> 851 </ul> 852 </li> 853 </ul> 854 855 856 857 <h3>Browser</h3> 858 859 <p>The Browser application adds the following features to support web applications:</p> 860 861 <ul> 862 <li><b>Media capture</b> 863 <p>As defined by the <a href="http://dev.w3.org/2009/dap/camera/">HTML Media Capture</a> 864 specification, the Browser allows web applications to access audio, image and video capture 865 capabilities of the device. For example, the following HTML provides an input for the user to 866 capture a photo to upload:</p> 867 <pre> 868 <input type="file" accept="image/*;capture=camera" /> 869 </pre> 870 <p>Or by excluding the {@code capture=camera} parameter, the user can choose to either capture a 871 new image with the camera or select one from the device (such as from the Gallery application).</p> 872 </li> 873 874 <li><b>Device Orientation</b> 875 <p>As defined by the <a 876 href="http://dev.w3.org/geo/api/spec-source-orientation.html">Device Orientation Event</a> 877 specification, the Browser allows web applications to listen to DOM events that provide information 878 about the physical orientation and motion of the device.</p> 879 <p>The device orientation is expressed with the x, y, and z axes, in degrees and motion is 880 expressed with acceleration and rotation rate data. A web page can register for orientation 881 events by calling {@code window.addEventListener} with event type {@code "deviceorientation"} 882 and register for motion events by registering the {@code "devicemotion"} event type.</p> 883 </li> 884 885 <li><b>CSS 3D Transforms</b> 886 <p>As defined by the <a href="http://www.w3.org/TR/css3-3d-transforms/">CSS 3D Transform 887 Module</a> specification, the Browser allows elements rendered by CSS to be transformed in three 888 dimensions.</p> 889 </li> 890 </ul> 891 892 893 894 <h3>JSON utilities</h3> 895 896 <p>New classes, {@link android.util.JsonReader} and {@link android.util.JsonWriter}, help you 897 read and write JSON streams. The new APIs complement the {@link org.json} classes, which manipulate 898 a document in memory.</p> 899 900 <p>You can create an instance of {@link android.util.JsonReader} by calling 901 its constructor method and passing the {@link java.io.InputStreamReader} that feeds the JSON string. 902 Then begin reading an object by calling {@link android.util.JsonReader#beginObject()}, read a 903 key name with {@link android.util.JsonReader#nextName()}, read the value using methods 904 respective to the type, such as {@link android.util.JsonReader#nextString()} and {@link 905 android.util.JsonReader#nextInt()}, and continue doing so while {@link 906 android.util.JsonReader#hasNext()} is true.</p> 907 908 <p>You can create an instance of {@link android.util.JsonWriter} by calling its constructor and 909 passing the appropriate {@link java.io.OutputStreamWriter}. Then write the JSON data in a manner 910 similar to the reader, using {@link android.util.JsonWriter#name name()} to add a property name 911 and an appropriate {@link android.util.JsonWriter#value value()} method to add the respective 912 value.</p> 913 914 <p>These classes are strict by default. The {@link android.util.JsonReader#setLenient setLenient()} 915 method in each class configures them to be more liberal in what they accept. This lenient 916 parse mode is also compatible with the {@link org.json}'s default parser.</p> 917 918 919 920 921 <h3>New feature constants</h3> 922 923 <p>The <a 924 href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 925 manfest element should be used to inform external entities (such as Android Market) of the set of 926 hardware and software features on which your application depends. In this release, Android adds the 927 following new constants that applications can declare with this element:</p> 928 929 <ul> 930 <li>{@link android.content.pm.PackageManager#FEATURE_FAKETOUCH "android.hardware.faketouch"} 931 <p>When declared, this indicates that the application is compatible with a device that offers an 932 emulated touchscreen (or better). A device that offers an emulated touchscreen provides a user input 933 system that can emulate a subset of touchscreen 934 capabilities. An example of such an input system is a mouse or remote control that drives an 935 on-screen cursor. Such input systems support basic touch events like click down, click up, and drag. 936 However, more complicated input types (such as gestures, flings, etc.) may be more difficult or 937 impossible on faketouch devices (and multitouch gestures are definitely not possible).</p> 938 <p>If your application does <em>not</em> require complicated gestures and you do 939 <em>not</em> want your application filtered from devices with an emulated touchscreen, you 940 should declare {@link 941 android.content.pm.PackageManager#FEATURE_FAKETOUCH "android.hardware.faketouch"} with a <a 942 href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 943 element. This way, your application will be available to the greatest number of device types, 944 including those that provide only an emulated touchscreen input.</p> 945 <p>All devices that include a touchscreen also support {@link 946 android.content.pm.PackageManager#FEATURE_FAKETOUCH "android.hardware.faketouch"}, because 947 touchscreen capabilities are a superset of faketouch capabilities. Thus, unless you actually require 948 a touchscreen, you should add a <a 949 href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 950 element for faketouch.</p> 951 </li> 952 </ul> 953 954 955 956 957 <h3>New permissions</h3> 958 959 <ul> 960 <li>{@link android.Manifest.permission#BIND_REMOTEVIEWS 961 "android.permission.BIND_REMOTEVIEWS"} 962 <p>This must be declared as a required permission in the <a 963 href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> manifest 964 element for an implementation of {@link android.widget.RemoteViewsService}. For example, when 965 creating an App Widget that uses {@link android.widget.RemoteViewsService} to populate a 966 collection view, the manifest entry may look like this:</p> 967 <pre> 968 <service android:name=".widget.WidgetService" 969 android:exported="false" 970 android:permission="android.permission.BIND_REMOTEVIEWS" /> 971 </pre> 972 </ul> 973 974 975 976 <h3>New platform technologies</h3> 977 978 <ul> 979 <li><strong>Storage</strong> 980 <ul> 981 <li>ext4 file system support to enable onboard eMMC storage.</li> 982 <li>FUSE file system to support MTP devices.</li> 983 <li>USB host mode support to support keyboards and USB hubs.</li> 984 <li>Support for MTP/PTP </li> 985 </ul> 986 </li> 987 988 <li><strong>Linux Kernel</strong> 989 <ul> 990 <li>Upgraded to 2.6.36</li> 991 </ul> 992 </li> 993 994 <li><strong>Dalvik VM</strong> 995 <ul> 996 <li>New code to support and optimize for SMP</li> 997 <li>Various improvements to the JIT infrastructure</li> 998 <li>Garbage collector improvements: 999 <ul> 1000 <li>Tuned for SMP</li> 1001 <li>Support for larger heap sizes</li> 1002 <li>Unified handling for bitmaps and byte buffers</li> 1003 </ul> 1004 </li> 1005 </ul> 1006 </li> 1007 1008 <li><strong>Dalvik Core Libraries</strong> 1009 <ul> 1010 <li>New, much faster implementation of NIO (modern I/O library)</li> 1011 <li>Improved exception messages</li> 1012 <li>Correctness and performance fixes throughout</li> 1013 </ul> 1014 </li> 1015 </ul> 1016 1017 1018 1019 <h3 id="api-diff">API differences report</h3> 1020 1021 <p>For a detailed view of all API changes in Android {@sdkPlatformVersion} (API Level 1022 {@sdkPlatformApiLevel}), see the <a 1023 href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API Differences Report</a>.</p> 1024 1025 1026 1027 1028 1029 <h2 id="api-level">API Level</h2> 1030 1031 <p>The Android {@sdkPlatformVersion} platform delivers an updated version of 1032 the framework API. The Android {@sdkPlatformVersion} API 1033 is assigned an integer identifier — 1034 <strong>{@sdkPlatformApiLevel}</strong> — that is 1035 stored in the system itself. This identifier, called the "API Level", allows the 1036 system to correctly determine whether an application is compatible with 1037 the system, prior to installing the application. </p> 1038 1039 <p>To use APIs introduced in Android {@sdkPlatformVersion} in your application, 1040 you need compile the application against the Android library that is provided in 1041 the Android {@sdkPlatformVersion} SDK platform. Depending on your needs, you might 1042 also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code> 1043 attribute to the <code><uses-sdk></code> element in the application's 1044 manifest. If your application is designed to run only on Android 2.3 and higher, 1045 declaring the attribute prevents the application from being installed on earlier 1046 versions of the platform.</p> 1047 1048 <p>For more information about how to use API Level, see the <a 1049 href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p> 1050 1051 1052 <h2 id="apps">Built-in Applications</h2> 1053 1054 <p>The system image included in the downloadable platform provides these 1055 built-in applications:</p> 1056 1057 <table style="border:0;padding-bottom:0;margin-bottom:0;"> 1058 <tr> 1059 <td style="border:0;padding-bottom:0;margin-bottom:0;"> 1060 <ul> 1061 <li>API Demos</li> 1062 <li>Browser</li> 1063 <li>Calculator</li> 1064 <li>Camera</li> 1065 <li>Clock</li> 1066 <li>Contacts</li> 1067 <li>Custom Locale</li> 1068 <li>Dev Tools</li> 1069 <li>Downloads</li> 1070 <li>Email</li> 1071 </ul> 1072 </td> 1073 <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> 1074 <ul> 1075 <li>Gallery</li> 1076 <li>Gestures Builder</li> 1077 <li>Messaging</li> 1078 <li>Music</li> 1079 <li>Search</li> 1080 <li>Settings</li> 1081 <li>Spare Parts</li> 1082 <li>Speech Recorder</li> 1083 <li>Widget Preview</li> 1084 </ul> 1085 </td> 1086 </tr> 1087 </table> 1088 1089 1090 <h2 id="locs" style="margin-top:.75em;">Locales</h2> 1091 1092 <p>The system image included in the downloadable SDK platform provides a variety of 1093 built-in locales. In some cases, region-specific strings are available for the 1094 locales. In other cases, a default version of the language is used. The 1095 languages that are available in the Android 3.0 system 1096 image are listed below (with <em>language</em>_<em>country/region</em> locale 1097 descriptor).</p> 1098 1099 <table style="border:0;padding-bottom:0;margin-bottom:0;"> 1100 <tr> 1101 <td style="border:0;padding-bottom:0;margin-bottom:0;"> 1102 <ul> 1103 <li>Arabic, Egypt (ar_EG)</li> 1104 <li>Arabic, Israel (ar_IL)</li> 1105 <li>Bulgarian, Bulgaria (bg_BG)</li> 1106 <li>Catalan, Spain (ca_ES)</li> 1107 <li>Czech, Czech Republic (cs_CZ)</li> 1108 <li>Danish, Denmark(da_DK)</li> 1109 <li>German, Austria (de_AT)</li> 1110 <li>German, Switzerland (de_CH)</li> 1111 <li>German, Germany (de_DE)</li> 1112 <li>German, Liechtenstein (de_LI)</li> 1113 <li>Greek, Greece (el_GR)</li> 1114 <li>English, Australia (en_AU)</li> 1115 <li>English, Canada (en_CA)</li> 1116 <li>English, Britain (en_GB)</li> 1117 <li>English, Ireland (en_IE)</li> 1118 <li>English, India (en_IN)</li> 1119 <li>English, New Zealand (en_NZ)</li> 1120 <li>English, Singapore(en_SG)</li> 1121 <li>English, US (en_US)</li> 1122 <li>English, Zimbabwe (en_ZA)</li> 1123 <li>Spanish (es_ES)</li> 1124 <li>Spanish, US (es_US)</li> 1125 <li>Finnish, Finland (fi_FI)</li> 1126 <li>French, Belgium (fr_BE)</li> 1127 <li>French, Canada (fr_CA)</li> 1128 <li>French, Switzerland (fr_CH)</li> 1129 <li>French, France (fr_FR)</li> 1130 <li>Hebrew, Israel (he_IL)</li> 1131 <li>Hindi, India (hi_IN)</li> 1132 </ul> 1133 </td> 1134 <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;"> 1135 <li>Croatian, Croatia (hr_HR)</li> 1136 <li>Hungarian, Hungary (hu_HU)</li> 1137 <li>Indonesian, Indonesia (id_ID)</li> 1138 <li>Italian, Switzerland (it_CH)</li> 1139 <li>Italian, Italy (it_IT)</li> 1140 <li>Japanese (ja_JP)</li> 1141 <li>Korean (ko_KR)</li> 1142 <li>Lithuanian, Lithuania (lt_LT)</li> 1143 <li>Latvian, Latvia (lv_LV)</li> 1144 <li>Norwegian bokml, Norway (nb_NO)</li> 1145 <li>Dutch, Belgium (nl_BE)</li> 1146 <li>Dutch, Netherlands (nl_NL)</li> 1147 <li>Polish (pl_PL)</li> 1148 <li>Portuguese, Brazil (pt_BR)</li> 1149 <li>Portuguese, Portugal (pt_PT)</li> 1150 <li>Romanian, Romania (ro_RO)</li> 1151 <li>Russian (ru_RU)</li></li> 1152 <li>Slovak, Slovakia (sk_SK)</li> 1153 <li>Slovenian, Slovenia (sl_SI)</li> 1154 <li>Serbian (sr_RS)</li> 1155 <li>Swedish, Sweden (sv_SE)</li> 1156 <li>Thai, Thailand (th_TH)</li> 1157 <li>Tagalog, Philippines (tl_PH)</li> 1158 <li>Turkish, Turkey (tr_TR)</li> 1159 <li>Ukrainian, Ukraine (uk_UA)</li> 1160 <li>Vietnamese, Vietnam (vi_VN)</li> 1161 <li>Chinese, PRC (zh_CN)</li> 1162 <li>Chinese, Taiwan (zh_TW)</li> 1163 </td> 1164 </tr> 1165 </table> 1166 1167 <p class="note"><strong>Note:</strong> The Android platform may support more 1168 locales than are included in the SDK system image. All of the supported locales 1169 are available in the <a href="http://source.android.com/">Android Open Source 1170 Project</a>.</p> 1171 1172 <h2 id="skins">Emulator Skins</h2> 1173 1174 <p>The downloadable platform includes the following emulator skin:</p> 1175 1176 <ul> 1177 <li> 1178 WXGA (1280x800, medium density, xlarge screen) 1179 </li> 1180 </ul> 1181 1182 <p>For more information about how to develop an application that displays 1183 and functions properly on all Android-powered devices, see <a 1184 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 1185 Screens</a>.</p>