Android/NEWS2011/07/17 09:25

API Level: 13

Welcome to Android 3.2!

Android 3.2 is an incremental platform release that adds new capabilities for users and developers. This sections below provide an overview of the new features and developer APIs.

For developers, the Android 3.2 platform is available as a downloadable component for the Android SDK. The downloadable platform includes an Android library and system image, as well as a set of emulator skins and more. The downloadable platform includes no external libraries.

To get started developing or testing against Android 3.2, use the Android SDK Manager to download the platform into your SDK. For more information, see Adding SDK Components. If you are new to Android, download the SDK Starter Package first.

Reminder: If you've already published an Android application, please test and optimize your application on Android 3.2 as soon as possible. You should do so to be sure your application provides the best experience possible on the latest Android-powered devices. For information about what you can do, read Optimizing Apps for Android 3.x.

Revisions

To determine what revision of the Android 3.2 platform you have installed, refer to the "Installed Packages" listing in the Android SDK and AVD Manager.

 Android 3.2, Revision 1 (July 2011)

Initial release. SDK Tools r12 or higher is recommended.

Platform Highlights

New user features

  • Optimizations for a wider range of tablets

    Android 3.2 includes a variety of optimizations across the system to ensure a great user experience on a wider range of tablet devices.

  • Compatibility zoom for fixed-sized apps

    Android 3.2 introduces a new compatibility zoom mode that gives users a new way to view fixed-sized apps on larger devices. The new mode provides a pixel-scaled alternative to the standard UI stretching for apps that are not designed to run on larger screen sizes, such as on tablets. The new mode is accessible to users from a menu icon in the system bar, for apps that need compatibility support.

  • Media sync from SD card

    On devices that support an SD card, users can now load media files directly from the SD card to apps that use them. A system facility makes the files accessible to apps from the system media store.

New developer features

  • Extended API for managing screens support

    Android 3.2 introduces extensions to the platform's screen support API to give developers additional ways to manage application UI across the range of Android-powered devices. The API includes new resource qualifiers and new manifest attributes that give you more precise control over how your apps are displayed on different sizes, rather than relying on generalized size categories.

    To ensure the best possible display for fixed-sized apps and apps with limited support for various screen sizes, the platform also provides a new zoom compatibility mode that renders the UI on a smaller screen area, then scales it up to fill the space available on the display. For more information about the screen support API and the controls it provides, see the sections below.

API Overview

Screens Support APIs

Android 3.2 introduces new screens support APIs that give you more control over how their applications are displayed across different screen sizes. The API builds on the existing screens-support API, including the platform's generalized screen density model, but extends it with the ability to precisely target specific screen ranges by their dimensions, measured in density-independent pixel units (such as 600dp or 720dp wide), rather than by their generalized screen sizes (such as large or xlarge)

When designing an application's UI, you can still rely on the platform to provide density abstraction, which means that applications do not need to compensate for the differences in actual pixel density across devices. You can design the application UI according to the amount of horizontal or vertical space available. The platform expresses the amount of space available using three new characteristics: smallestWidthwidth, and height.

  • A screen's smallestWidth is it's fundamental minimum size, measured in density-independent pixel ("dp") units. Of the screen's height or width, it is the shorter of the two. For a screen in portrait orientation, the smallestWidth is normally based on its width, while in landscape orientation it based on its height. In all cases, the smallestWidth is derived from a fixed characteristic of the screen and the value does not change, regardless of orientation. The smallestWidth is important for applications because it represents the shortest possible width in which the application UI will need to be drawn, not including screen areas reserved by the system.
  • In constrast, a screen's width and height represent the current horizontal or vertical space available for application layout, measured in "dp" units, not including screen areas reserved by the system. The width and height of a screen change when the user switches orientation between landscape and portrait.

The new screens support API is designed to let you manage application UI according to the smallestWidth of the current screen. You can also manage the UI according to current width or height, as needed. For those purposes, the API provides these tools:

  • New resource qualifiers for targeting layouts and other resources to a minimum smallestWidth, width, or height, and
  • New manifest attributes, for specifying the app's maximum screen compatibility range

Additionally, applications can still query the system and manage UI and resource loading at runtime, as in the previous versions of the platform.

Since the new API lets you target screens more directly through smallestWidth, width, and height, it's helpful to understand the typical characteristics of the different screen types. The table below provides some examples, measured in "dp" units.

Table 1. Typical devices, with density and size in dp.

TypeDensity (generalized)Dimensions (dp)smallestWidth (dp)
Baseline phone mdpi 320x480 320
Small tablet/large phone mdpi 480x800 480
7-inch tablet mdpi 600x1024 600
10-inch tablet mdpi 800x1280 800

The sections below provide more information about the new screen qualifiers and manifest attributes. For complete information about how to use the screen support API, see Supporting Multiple Screens.

New resource qualifiers for screens support

The new resource qualifiers in Android 3.2 let you better target your layouts for ranges of screen sizes. Using the qualifiers, you can create resource configurations designed for a specific minimum smallestWidth, current width, or current height, measured in density-independent pixels.

The new qualifiers are:

  • swNNNdp — Specifies the minimum smallestWidth on which the resource should be used, measured in "dp" units. As mentioned above, a screen's smallestWidth is constant, regardless of orientation. Examples: sw320dpsw720dpsw720dp.
  • wNNNdp and hNNNdp — Specifies the minimum width or height on which the resource should be used, measured in "dp" units. As mentioned above, a screen's width and height are relative to the orientation of the screen and change whenever the orientation changes. Examples: w320dpw720dph1024dp.

You can also create multiple overlapping resource configurations if needed. For example, you could tag some resources for use on any screen wider than 480 dp, others for wider than 600 dp, and others for wider than 720 dp. When multiple resource configurations are qualified for a given screen, the system selects the configuration that is the closest match. For precise control over which resources are loaded on a given screen, you can tag resources with one qualifier or combine several new or existing qualifiers.

Based on the typical dimensions listed earlier, here are some examples of how you could use the new qualifiers:

res/layout/main_activity.xml   # For phones
res
/layout-sw600dp/main_activity.xml   # For 7” tablets
res
/layout-sw720dp/main_activity.xml   # For 10” tablets
res
/layout-w600dp/main_activity.xml   # Multi-pane when enough width
res
/layout-sw600dp-w720dp/main_activity.xml   # For large width

Older versions of the platform will ignore the new qualifiers, so you can mix them as needed to ensure that your app looks great on any device. Here are some examples:

res/layout/main_activity.xml   # For phones
res
/layout-xlarge/main_activity.xml   # For pre-3.2 tablets
res
/layout-sw600dp/main_activity.xml   # For 3.2 and up tablets

For complete information about how to use the new qualifiers, see Using new size qualifiers.

New manifest attributes for screen-size compatibility

The framework offers a new set of <supports-screens> manifest attributes that let you manage your app's support for different screen sizess. Specifically, you can specify the largest and smallest screens on which your app is designed to run, as well as the largest screen on which it is designed run without needing the system's newscreen compatibility mode. Like the resource qualifiers described above, the new manifest attributes specify the range of screens that the application supports, as specified by the smallestWidth.

The new manifest attributes for screen support are:

  • android:compatibleWidthLimitDp="numDp" — This attribute lets you specify the maximum smallestWidth on which the application can run without needing compatibility mode. If the current screen is larger than the value specified, the system displays the application in normal mode but allows the user to optionally switch to compatibility mode through a setting in the system bar.
  • android:largestWidthLimitDp="numDp" — This attribute lets you specify the maximum smallestWidth on which the application is designed to run. If the current screen is larger than the value specified, the system forces the application into screen compatibility mode, to ensure best display on the current screen.
  • android:smallestWidthLimitDp="numDp" — This attribute lets you specify the minimum smallestWidth on which the application can run. If the current screen is smaller than the value specified, the system considers the application incompatible with the device, but does not prevent it from being installed and run.

Note: Android Market does not currently filter apps based on any of the attributes above. Support for filtering will be added in a later platform release. Applications that require filtering based on screen size can use the existing <supports-screens> attributes.

For complete information about how to use the new attributes, see Declaring screen size support.

Screen compatibility mode

Android 3.2 provides a new screen compatibility mode for applications explicitly declaring that they do not support screens as large as the one on which they are running. This new "zoom" mode is a pixel-scaled — it renders the application in a smaller screen area and then scales the pixels to fill the current screen.

By default, the system offers screen compatibility mode as an user option, for apps that require it. Users can turn the zoom mode on and off using a control available in the system bar.

Because the new screen compatibility mode may not be appropriate for all applications, the platform allows the application to disable it using manifest attributes. When disabled by the app, the system does not offer "zoom" compatibility mode as an option for users when the app is running.

Note: For important information about how to control compatibility mode in your applications, please review the New Mode for Apps on Large Screens article on the Android Developers Blog.

New screen density for 720p televisions and similar devices

To meet the needs of applications running on 720p televisions or similar with moderate density screens, Android 3.2 introduces a new generalized density, tvdpi, with an approximate dpi of 213. Applications can query for the new density in densityDpi and can use the new tvdpi qualifier to tag resources for televisions and similar devices. For example:

res/drawable-tvdpi/my_icon.png   # Bitmap for tv density

In general, applications should not need to work with this density. For situations where output is needed for a 720p screen, the UI elements can be scaled automatically by the platform.

UI framework

  • Fragments
  • Screen size information in ActivityInfo and ApplicationInfo
    • ActivityInfo adds {android.content.pm.ActivityInfo#CONFIG_SCREEN_SIZE} and {android.content.pm.ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE} as bit masks in configChanges. The bits indicate whether an Activity can itself handle the screen size and smallest screen size.
    • ApplicationInfo adds {android.content.pm.ApplicationInfo#largestWidthLimitDp}, {android.content.pm.ApplicationInfo#compatibleWidthLimitDp}, and {android.content.pm.ApplicationInfo#requiresSmallestWidthLimitDp} fields, derived from the corresponding <supports-screens> attributes in the application manifest file.
  • Helpers for getting display size from WindowManager
  • New public "holographic" styles
    • The platform now exposes a variety of public "holographic" styles for text, actionbar widgets and tabs, and more. See R.style for a full list.
  • LocalActivityManagerActivityGroup, and LocalActivityManager are now deprecated
    • New applications should use Fragments instead of these classes. To continue to run on older versions of the platform, you can use the v4 Support Library (compatibility library), available in the Android SDK. The v4 Support Library provides a version of the Fragment API that is compatible down to Android 1.6 (API level 4).
    • For apps developing against Android 3.0 (API level 11) or higher, tabs are typically presented in the UI using the new ActionBar.newTab() and related APIs for placing tabs within their action bar area.

Media framework

  • Applications that use the platform's media provider (MediaStore) can now read media data directly from the removeable SD card, where supported by the device. Applications can also interact with the SD card files directly, using the MTP API.

Graphics

IME framework

  • New getModifiers() method for retrieving the current state of the modifier keys.

USB framework

  • New getRawDescriptors() method for retrieving the raw USB descriptors for the device. You can use the method to access descriptors not supported directly via the higher level APIs.

Network

Telephony

Core utilities

New feature constants

The platform adds new hardware feature constants that you can declare in their application manifests, to inform external entities such as Android Market of required hardware and software capabilities. You declare these and other feature constants in <uses-feature> manifest elements.

Android Market filters applications based on their <uses-feature> attributes, to ensure that they are available only to devices on which their requirements are met.

  • Feature constants for landscape or portrait requirements

    Android 3.2 introduces new feature constants that let applications specify whether they require display in landscape orientation, portrait orientation, or both. Declaring these constants indicates that the application must not be installed on a device that doesn't offer the associated orientation. Conversely, if one or both of the constants are not declared, it indicates that the application does not have a preference for the undeclared orientations and may be installed on a device that doesn't offer them.

    A typical application that functions properly in both landscape and portrait orientations would not normally need to declare an orientation requirement. Rather, an application designed primarily for one orientation, such as an app designed for a television, could declare one of the constants to ensure that it isn't available to devices that don't provide that orientation.

    If the application is targeting API level 12 or lower, the platform assumes that if app has not specified whether it requires portrait or landscape, both orientations are required.

  • Other feature constants

API Differences Report

For a detailed view of all API changes in Android 3.2 (API Level 13), see the API Differences Report.

저작자 표시 비영리 동일 조건 변경 허락

'Android > NEWS' 카테고리의 다른 글

Android 3.2 Platform  (0) 2011/07/17
Open Accessory Library  (0) 2011/05/11
Android 3.1 Platform Highlight  (0) 2011/05/11
Android 3.1 Platform  (0) 2011/05/11
Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
Update Android Developer Guide  (0) 2011/04/01
Posted by mirwing
Android/NEWS2011/05/11 03:49
    Open Accessory is a new capability for integrating connected peripherals with applications running on the platform. The capability is based on a USB (Universal Serial Bus) stack built into the platform and an API exposed to applications. Peripherals that attach to Android-powered devices as accessories connect as USB hosts.
    Open Accessory is introduced in Android 3.1 (API level 12), but is made available to devices running Android 2.3.4 by means of an optional external library, the Open Accessory Library. The library exposes a framework API that lets applications discover, communicate with, and manage a variety of device types connected over USB. It also provides the implementation of the API against parts of the Android platform that are not directly exposed to applications in Android 2.3.4.
    The Open Accessory Library is optional on any given device. Device manufacturers may choose whether to include the Open Accessory Library in their products or exclude it. The library is forward-compatible with Android 3.1, so applications developed against Android 2.3.4 will run properly on devices running Android 3.1, if those devices support USB accessories.
    The API provided by the Open Accessory Library is based on the Open Accessory API provided in Android 3.1. In most areas, you can use the same techniques and APIs. However, developing for the Open Accessory Library on Android 2.3.4 differs from the standard USB API in these ways:

    • Obtaining a UsbManager object — To obtain a UsbManager object when using the add-on library, use the helper method getInstance() rather thangetSystemService() For example:UsbManager manager = UsbManager.getInstance(this);
    • Obtaining a UsbAccessory from a filtered intent — When you filter for a connected device or accessory with an intent filter, the UsbAccessory object is contained inside the intent that is passed to your application. If you are using the add-on library, you can get the UsbAccessory object in the following manner:UsbAccessory accessory = UsbManager.getAccessory(intent)
    • No USB host support — Android 2.3.4 and the Open Accessory Library do not support USB host mode (for example, through UsbDevice), although USB host mode is supported in Android 3.1. An Android-powered device running Android 2.3.4 can not function as a USB host. The library enables the Android-powered device to function as a peripheral only, with the connected accessory functioning as USB host (through UsbAccessory).
    To develop apps using the Open Accessory Library, you need:

    • The latest version of the Android SDK tools
    • The latest version of the Google APIs add-on, which includes the library itself (for linking)
    • An actual hardware device running Android 2.3.4 (or Android 3.1) with USB accessories support, for runtime testing against connected devices
    For a full discussion of how to develop applications that interact with USB accessories, please see the related developer documentation.
    Additionally, developers can request filtering on Android Market, such that their applications are not available to users whose devices do not provide the appropriate accessory support. To request filtering, add the element below to the application manifest:
    <uses-feature
    android:name="android.hardware.usb.accessory"
    android:required="true"> 
저작자 표시 비영리 동일 조건 변경 허락

'Android > NEWS' 카테고리의 다른 글

Android 3.2 Platform  (0) 2011/07/17
Open Accessory Library  (0) 2011/05/11
Android 3.1 Platform Highlight  (0) 2011/05/11
Android 3.1 Platform  (0) 2011/05/11
Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
Update Android Developer Guide  (0) 2011/04/01
Posted by mirwing
Android/NEWS2011/05/11 03:44

Welcome to Android 3.1!

Android 3.1 is an incremental platform release that refines many of the features introduced in Android 3.0. It builds on the same tablet-optimized UI and features offered in Android 3.0 and adds several new capabilities for users and developers. This document provides an overview of the new features and technologies introduced in Android 3.1. For a more detailed look at new developer APIs, see the API Overview document.

For a high-level introduction to Android 3.0, please see the Android 3.0 Platform Highlights.

New User Features

Figure 1. An Android 3.1 Home screen.

UI refinements

The Android 3.1 platform adds a variety of refinements to make the user interface more intuitive and more efficient to use.

UI transitions are improved throughout the system and across the standard apps. The Launcher animation is optimized for faster, smoother transition to and from the Apps list. Adjustments in color, positioning, and text make UI elements easier to see, understand, and use. Accessibility is improved with consistent audible feedback throughout the UI and a new setting to let users customize the touch-hold interval to meet their needs.

Navigation to and from the five home screens is now easier — touching the Home button in the system bar now takes you to the home screen most recently used. Settings offers an improved view of internal storage, showing the storage used by a larger set of file types.

Connectivity for USB accessories

Android 3.1 adds broad platform support for a variety of USB-connected peripherals and accessories. Users can attach many types of input devices (keyboards, mice, game controllers) and digital cameras. Applications can build on the platform’s USB support to extend connectivity to almost any type of USB device.

The platform also adds new support for USB accessories — external hardware devices designed to attach to Android-powered devices as USB hosts. When an accessory is attached, the framework will look for a corresponding application and offer to launch it for the user. The accessory can also present a URL to the user, for downloading an appropriate application if one is not already installed. Users can interact with the application to control powered accessories such as robotics controllers; docking stations; diagnostic and musical equipment; kiosks; card readers; and much more.

The platform’s USB capabilities rely on components in device hardware, so support for USB on specific devices may vary and is determined by device manufacturers.

Figure 2. The Recent Apps menu is now expandable and scrollable.

Expanded Recent Apps list

For improved multitasking and instant visual access to a much larger number of apps, the Recent Apps list is now expandable. Users can now scroll the list of recent apps vertically to see thumbnail images all of the tasks in progress and recently used apps, then touch a thumbnail to jump back into that task.

Resizeable Home screen widgets

For more flexible Home screen customization, users can now resize their Home screen widgets using drag bars provided by the system. Users can expand widgets both horizontally and/or vertically to include more content, where supported by each widget.

Support for external keyboards and pointing devices

Users can now attach almost any type of external keyboard or mouse to their Android-powered devices, to create a familiar environment and work more efficiently. One or more input devices can be attached to the system simultaneously over USB and/or Bluetooth HID, in any combination. No special configuration or driver is needed, in most cases. When multiple devices are connected, users can conveniently manage the active keyboard and IME using the keyboard settings that are available from the System bar.

For pointing devices, the platform supports most types of mouse with a single button and optionally a scroll wheel, as well as similar devices such as trackballs. When these are connected, users can interact with the UI using point, select, drag, scroll, hover, and other standard actions.

Support for joysticks and gamepads

To make the platform even better for gaming, Android 3.1 adds support for most PC joysticks and gamepads that are connected over USB or Bluetooth HID.

For example, users can connect Sony Playstation™ 3 and XBox 360™ game controllers over USB (but not Bluetooth), Logitech Dual Action™ gamepads and flight sticks, or a car racing controller. Game controllers that use proprietary networking or pairing are not supported by default, but in general, the platform supports most PC-connectible joysticks and gamepads.

Robust Wi-Fi networking

Android 3.1 adds robust Wi-Fi features, to make sure that users and their apps can take full advantage of higher-speed Wi-Fi access at home, at work, and while away.

A new high-performance Wi-Fi lock lets applications maintain high-performance Wi-Fi connections even when the device screen is off. Users can take advantage of this to play continuous streamed music, video, and voice services for long periods, even when the device is otherwise idle and the screen is off.

Users can now configure an HTTP proxy for each individual Wi-Fi access point, by touch-hold of the access point in Settings. The browser uses the HTTP proxy when communicating with the network over the access point and other apps may also choose to do so. The platform also provides backup and restore of the user-defined IP and proxy settings.

The platform adds support for Preferred Network Offload (PNO), a background scanning capability that conserves battery power savings in cases where Wi-Fi needs to be available continuously for long periods of time.

Updated set of standard apps

The Android 3.1 platform includes an updated set of standard applications that are optimized for use on larger screen devices. The sections below highlight some of the new features.

Figure 3. Quick Controls menu in the Browser.

Browser

The Browser app includes a variety of new features and UI improvements that make viewing web content simpler, faster, and more convenient.

The Quick Controls UI, accessible from Browser Settings, is extended and redesigned. Users can now use the controls to view thumbnails of open tabs and close the active tab, as well as access the overflow menu for instant access to Settings and other controls.

To ensure a consistent viewing experience, the Browser extends it's support for popular web standards such as CSS 3D, animations, and CSS fixed positioning to all sites, mobile or desktop. It also adds support for embedded playback of HTML5 video content. To make it easier to manage favorite content, users can now save a web page locally for offline viewing, including all styling and images. For convenience when visiting Google sites, an improved auto-login UI lets users sign in quickly and manage access when multiple users are sharing a device.

For best performance, the Browser adds support for plugins that use hardware accelerated rendering. Page zoom performance is also dramatically improved, making it faster to navigate and view web pages.

Gallery

The Gallery app now supports Picture Transfer Protocol (PTP), so that users can connect their cameras over USB and import their pictures to Gallery with a single touch. The app also copies the pictures to local storage and provides an indicator to let users see how much space is available.

Figure 4. Home screen widgets can now be resized.

Calendar

Calendar grids are larger, for better readability and more accurate touch-targeting. Additionally, users can create a larger viewing area for grids by hiding the calendar list controls. Controls in the date picker are redesigned, making them easier to see and use.

Contacts

The Contacts app now lets you locate contacts more easily using full text search. Search returns matching results from all fields that are stored for a contact.

Email

When replying or forwarding an HTML message, The Email app now sends both plain text and HTML bodies as a multi-part mime message. This ensures that the message will be formatted properly for all recipients. Folder prefixes for IMAP accounts are now easier to define and manage. To conserve battery power and minimize cell data usage, the application now prefetches email from the server only when the device is connected to a Wi-Fi access point.

An updated Home screen widget give users quick access to more email. Users can touch Email icon at the top of the widget to cycle through labels such as Inbox, Unread, and Starred. The widget itself is now resizable, both horizontally and vertically.

Enterprise support

Users can now configure an HTTP proxy for each connected Wi-Fi access point. This lets administrators work with users to set a proxy hostname, port, and any bypass subdomains. This proxy configuration is automatically used by the Browser when the Wi-Fi access point is connected, and may optionally be used by other apps. The proxy and IP configuration is now backed up and restored across system updates and resets.

To meet the needs of tablet users, the platform now allows a "encrypted storage card" device policy to be accepted on devices with emulated storage cards and encrypted primary storage.

New Developer Features

The Android 3.1 platform adds refinements and new capabilities that developers can build on, to create powerful and engaging application experiences on tablets and other large-screen devices.

Open Accessory API for rich interaction with peripherals

Android 3.1 introduces a new API for integrating hardware accessories with applications running on the platform. The API provides a way to interact across a wide range of peripherals, from robotics controllers to musical equipment, exercise bicycles, and more.

The API is based on a new USB (Universal Serial Bus) stack and services that are built into the platform. The platform provides services for discovering and identifying connected hardware, as well as for notifying interested applications that the hardware is available.

When a user plugs in a USB accessory, the platform receives identifying information such as product name, accessory type, manufacturer, and version. The platform sets up communication with the accessory and uses its information to notify and launch a targeted app, if one is available. Optionally, an accessory can provide a URL that lets users find and download an app that works with the accessory. These discovery features make first-time setup easier for the user and ensure that an appropriate application is available for interacting with the connected hardware.

For application developers and accessory manufacturers, accessory mode offers many new ways to engage users and build powerful interaction experiences with connected hardware.

To learn more about how to develop applications that interact with accessories, see the USB Accessory documentation.

USB host API

Android 3.1 provides built-in platform support for USB host mode and exposes an API that lets applications manage connected peripherals. On devices that support host mode, applications can use the API to identify and communicate with connected devices such as audio devices. input devices, communications devices, hubs, cameras, and more.

To learn more about how to develop applications that interact with USB devices, see the USB Host documentation.

Input from mice, joysticks, and gamepads

Android 3.1 extends the input event system to support a variety of new input sources and motion events, across all views and windows. Developers can build on these capabilities to let users interact with their applications using mice, trackballs, joysticks, gamepads, and other devices, in addition to keyboards and touchscreens.

For mouse and trackball input, the platform supports two new motion event actions: scroll (horizontal or vertical) such as from a scrollwheel; and hover, which reports the location of the mouse when no buttons are pressed. Applications can handle these events in any way needed.

For joysticks and gamepads, the platform provides a large number of motion axes that applications can use from a given input source, such as X, Y, Hat X, Hat Y, rotation, throttle, pressure, size, touch, tool, orientation, and others. Developers can also define custom axes if needed, to capture motion in additional ways. The platform provides motion events to applications as a batch, and applications can query the details of the movements included in the batch, for more efficient and precise handling of events.

Applications can query for the list of connected input devices and the motion ranges (axes) supported by each device. Applications can also handle multiple input and motion events from a single input device. For example, an application can use mouse and joystick and mouse event sources from a single input device.

Resizable Home screen widgets

Developers can now create Home screen widgets that users can resize horizontally, vertically, or both. By simply adding an attribute to the declaration of a widget, the widget becomes resizable horizontally, vertically, or both. This lets users customize the display of the widget content and display more of it on their Home screens.

MTP API for integrating with external cameras

In Android 3.1, a new MTP (Media Transfer Protocol) API lets developers write apps that interact directly with connected cameras and other PTP devices. The new API makes it easy for applications to receive notifications when devices are attached and removed, manage files and storage on those devices, and transfer files and metadata to and from them. The MTP API implements the PTP (Picture Transfer Protocol) subset of the MTP specification.

RTP API, for control over audio streaming sessions

Android 3.1 exposes an API to its built-in RTP (Real-time Transport Protocol) stack, which applications can use to directly manage on-demand or interactive data streaming. In particular, apps that provide VOIP, push-to-talk, conferencing, and audio streaming can use the API to initiate sessions and transmit or receive data streams over any available network.

Performance optimizations

Android 3.1 includes a variety of performance optimizations that help make applications faster and more responsive. Some of the optimizations include:

  • A new LRU cache class lets applications benefit from efficient caching. Applications can use the class to reduce the time spent computing or downloading data from the network, while maintaining a sensible memory footprint for the cached data.
  • The UI framework now supports partial invalidates in hardware-accelerated Views, which makes drawing operations in those Views more efficient.
  • A new graphics method, setHasAlpha(), allows apps to hint that a given bitmap is opaque. This provides an extra performance boost for some types of blits and is especially useful for applications that use ARGB_8888 bitmaps.
저작자 표시 비영리 동일 조건 변경 허락

'Android > NEWS' 카테고리의 다른 글

Android 3.2 Platform  (0) 2011/07/17
Open Accessory Library  (0) 2011/05/11
Android 3.1 Platform Highlight  (0) 2011/05/11
Android 3.1 Platform  (0) 2011/05/11
Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
Update Android Developer Guide  (0) 2011/04/01
Posted by mirwing
Android/NEWS2011/05/11 03:30
    [Developer Android]

    API Level: 12

    API Overview
    The sections below provide a technical overview of what's new for developers in Android 3.1, including new features and changes in the framework API since the previous version.

    USB APIs
    Android 3.1 introduces powerful new APIs for integrating connected peripherals with applications running on the platform. The APIs are based on a USB (Universal Serial Bus) stack and services that are built into the platform, including support for both USB host and device interactions. Using the APIs, developers can create applications that are able to discover, communicate with, and manage a variety of device types connected over USB.
    The stack and APIs distinguish two basic types of USB hardware, based on whether the platform iself is acting as host or the external hardware is acting as host:

    • A USB device is a piece of connected hardware that depends on the Android-powered device to serve as host. For example, most input devices, mice, and joysticks are USB devices, as are many cameras, hubs, and so on.
    • A USB accessory is a piece of connected hardware that has a USB host controller, provides power, and is designed to communicate with Android-powered devices over USB, A variety of peripherals can connect as accessories, from robotics controllers to musical equipment, exercise bicycles, and more.
    For both types — USB devices and USB accessories — the platform's USB APIs support discovery by intent broadcast when attached or detached, as well as standard interfaces, endpoints, and transfer modes (control, bulk, and interrupt).
    The USB APIs are available in the package android.hardware.usb. The central class is UsbManager, which provides helper methods for identifying and communicating with both USB devices and USB accessories. Applications can acquire an instance of UsbManager and then query for the list of attached devices or accessories and then communicate with or manage them. UsbManager also declares intent actions that the system broadcasts, to announce when a USB device or accessory is attached or detached.
    Other classes include:

    • UsbDevice, a class representing external hardware connected as a USB device (with the Android-powered device acting as host).
    • UsbAccessory, representing external hardware connected as the USB host (with the Android-powered device acting as a USB device).
    • UsbInterface and UsbEndpoint, which provide access to standard USB interfaces and endpoints for a device.
    • UsbDeviceConnection and UsbRequest, for sending and receiving data and control messages to or from a USB device, sychronously and asynchronously.
    • UsbConstants, which provides constants for declaring endpoint types, device classes, and so on.
    Note that although the USB stack is built into the platform, actual support for USB host and open accessory modes on specific devices is determined by their manufacturers. In particular, host mode relies on appropriate USB controller hardware in the Android-powered device.
    Additionally, developers can request filtering on Android Market, such that their applications are not availabe to users whose devices do not provide the appropriate USB support. To request filtering, add one or both of the elements below to the application manifest, as appropriate:

    • If the application should only be visible to devices that support USB host mode (connection of USB devices), declare this element:
    • <uses-feature android:name="android.hardware.usb.host" android:required="true">

    • If the application should only be visible to devices that support USB accessories (connection of USB hosts), declare this element:
    • <uses-feature android:name="android.hardware.usb.accessory" android:required="true">

    For complete information about how to develop applications that interact with USB accessories, please see the developer documentation.
    To look at sample applications that use the USB host API, see ADB Test and Missile Launcher

    MTP/PTP API
    Android 3.1 exposes a new MTP API that lets applications interact directly with connected cameras and other PTP devices. The new API makes it easy for an application to receive notifications when devices are attached and removed, manage files and storage on those devices, and transfer files and metadata to and from them. The MTP API implements the PTP (Picture Transfer Protocol) subset of the MTP (Media Transfer Protocol) specification.
    The MTP API is available in the android.mtp package and provides these classes:

    • The MtpDevice encapsulates an MTP device that is connected over the USB host bus. An application can instantiate an object of this type and then use its methods to get information about the device and objects stored on it, as well as opening the connection and transferring data. Some of the methods include:
      • getObjectHandles() returns a list of handles for all objects on the device that match a specified format and parent. To get information about an object, an application can pass a handle to getObjectInfo().
      • importFile() lets an application copy data for an object to a file in external storage. This call may block for an arbitrary amount of time depending on the size of the data and speed of the devices, so should be made from a spearate thread.
      • open() lets an application open a connected MTP/PTP device.
      • getThumbnail() returns the thumbnail of the object as a byte array.
    • MtpStorageInfo holds information about about a storage unit on an MTP device, corresponding to the StorageInfo Dataset described in section 5.2.2 of the MTP specification. Methods in the class let an application get a storage unit’s description string, free space, maximum storage capacity, storage ID, and volume identifier.
    • MtpDeviceInfo holds information about an MTP device corresponding to the DeviceInfo Dataset described in section 5.1.1 of the MTP specification. Methods in the class let applications get a device’s manufacturer, model, serial number, and version.
    • MtpObjectInfo holds information about an object stored on an MTP device, corresponding to the ObjectInfo Dataset described in section 5.3.1 of the MTP specification. Methods in the class let applications get an object’s size, data format, association type, creation date, and thumbnail information.
    • MtpConstants provides constants for declaring MTP file format codes, association type, and protection status.
    Support for new input devices and motion events
    Android 3.1 extends the input subsystem to support new input devices and new types of motion events, across all views and windows. Developers can build on these capabilities to let users interact with their applications using mice, trackballs, joysticks, gamepads, and other devices, in addition to keyboards and touchscreens.
    For handling mouse, scrollwheel, and trackball input, the platform supports two new motion event actions:

    • ACTION_SCROLL, which describes the pointer location at which a non-touch scroll motion, such as from a mouse scroll wheel, took place. In the MotionEvent, the value of the AXIS_HSCROLL and AXIS_VSCROLL axes specify the relative scroll movement.
    • ACTION_HOVER_MOVE, reports the current position of the mouse when no buttons are pressed, as well as any intermediate points since the last HOVER_MOVEevent. Hover enter and exit notifications are not yet supported.
    To support joysticks and gamepads, the InputDevice class includes these new input device sources:

    To describe motion events from these new sources, as well as those from mice and trackballs, the platform now defines axis codes on MotionEvent, similar to how it defines key codes on KeyEvent. New axis codes for joysticks and game controllers include AXIS_HAT_X, AXIS_HAT_Y, AXIS_RTRIGGER, AXIS_ORIENTATION,AXIS_THROTTLE, and many others. Existing MotionEvent axes are represented by AXIS_X, AXIS_Y, AXIS_PRESSURE, AXIS_SIZE, AXIS_TOUCH_MAJOR,AXIS_TOUCH_MINOR, AXIS_TOOL_MAJOR, AXIS_TOOL_MINOR, and AXIS_ORIENTATION.
    Additionally, MotionEvent defines a number of generic axis codes that are used when the framework does not know how to map a particular axis. Specific devices can use the generic axis codes to pass custom motion data to applications. For a full list of axes and their intended interpretations, see the MotionEvent class documentation.
    The platform provides motion events to applications in batches, so a single event may contain a current position and multiple so-called historical movements. Applications should use getHistorySize() to get the number of historical samples, then retrieve and process all historical samples in order usinggetHistoricalAxisValue(). After that, applications should process the current sample using getAxisValue().
    Some axes can be retrieved using special accessor methods. For example, instead of calling getAxisValue(), applications can call getX(). Axes that have built-in accessors include AXIS_X, AXIS_Y, AXIS_PRESSURE, AXIS_SIZE, AXIS_TOUCH_MAJOR, AXIS_TOUCH_MINOR, AXIS_TOOL_MAJOR, AXIS_TOOL_MINOR, andAXIS_ORIENTATION.
    Each input device has a unique, system-assigned ID and may also provide multiple sources. When a device provides multiple sources, more than one source can provide axis data using the same axis. For example, a touch event coming from the touch source uses the X axis for screen position data, while a joystick event coming from the joystick source will use the X axis for the stick position instead. For this reason, it's important for applications to interpret axis values according to the source from which they originate. When handling a motion event, applications should use methods on the InputDevice class to determine the axes supported by a device or source. Specifically, applications can use getMotionRanges() to query for all axes of a device or all axes of a given source of the device. In both cases, the range information for axes returned in the InputDevice.MotionRange object specifies the source for each axis value.
    Finally, since the motion events from joysticks, gamepads, mice, and trackballs are not touch events, the platform adds a new callback method for passing them to aView as "generic" motion events. Specifically, it reports the non-touch motion events to Views through a call to onGenericMotionEvent(), rather than toonTouchEvent().
    The platform dispatches generic motion events differently, depending on the event source class. SOURCE_CLASS_POINTER events go to the View under the pointer, similar to how touch events work. All others go to the currently focused View. For example, this means a View must take focus in order to receive joystick events. If needed, applications can handle these events at the level of Activity or Dialog by implementing onGenericMotionEvent() there instead.
    To look at a sample application that uses joystick motion events, see GameControllerInput and GameView.

    RTP API
    Android 3.1 exposes an API to its built-in RTP (Real-time Transport Protocol) stack, which applications can use to manage on-demand or interactive data streaming. In particular, apps that provide VOIP, push-to-talk, conferencing, and audio streaming can use the API to initiate sessions and transmit or receive data streams over any available network.
    The RTP API is available in the android.net.rtp package. Classes include:

    • RtpStream, the base class of streams that send and receive network packets with media payloads over RTP.
    • AudioStream, a subclass of RtpStream that carries audio payloads over RTP.
    • AudioGroup, a local audio hub for managing and mixing the device speaker, microphone, and AudioStream.
    • AudioCodec, which holds a collection of codecs that you define for an AudioStream.
    To support audio conferencing and similar usages, an application instantiates two classes as endpoints for the stream:

    The simplest usage involves a single remote endpoint and local endpoint. For more complex usages, please refer to the limitations described for AudioGroup.
    To use the RTP API, applications must request permission from the user by declaring <uses-permission android:name="android.permission.INTERNET"> in their manifest files. To acquire the device microphone, the <uses-permission android:name="android.permission.RECORD_AUDIO"> permission is also required.

    Resizable app widgets
    Starting in Android 3.1, developers can make their homescreen widgets resizeable — horizontally, vertically, or on both axes. Users touch-hold a widget to show its resize handles, then drag the horizontal and/or vertical handles to change the size on the layout grid.
    Developers can make any Home screen widget resizeable by defining a resizeMode attribute in the widget's AppWidgetProviderInfo metadata. Values for theresizeMode attribute include "horizontal", "vertical", and "none". To declare a widget as resizeable horizontally and vertically, supply the value "horizontal|vertical".
    Here's an example:
    <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:minWidth="294dp"
    android:minHeight="72dp"
    android:updatePeriodMillis="86400000"
    android:previewImage="@drawable/preview"
    android:initialLayout="@layout/example_appwidget"
    android:configure="com.example.android.ExampleAppWidgetConfigure"
    android:resizeMode="horizontal|vertical" >
    </appwidget-provider>
    For more information about Home screen widgets, see the App Widgets documentation.

    Animation framework

    • New ViewPropertyAnimator class
      • A new ViewPropertyAnimator class provides a convenient way for developers to animate select properties on View objects. The class automaties and optimizes the animation of the properties and makes it easier to manage multiple simulataneous animations on a View object.
      • Using the ViewPropertyAnimator is straightforward. To animate properties for a View, call animate() to construct a ViewPropertyAnimator object for that View. Use the methods on the ViewPropertyAnimator to specify what property to animate and how to animate it. For example, to fade the View to transparent, call alpha(0);. The ViewPropertyAnimator object handles the details of configuring the underlying Animator class and starting it, then rendering the animation.

    • Animation background color
      • New getBackgroundColor() and setBackgroundColor(int) methods let you get/set the background color behind animations, for window animations only. Currently the background must be black, with any desired alpha level.
    • Getting animated fraction from ViewAnimator
      • A new getAnimatedFraction() method lets you get the current animation fraction — the elapsed/interpolated fraction used in the most recent frame update — from a ValueAnimator.
    UI framework

    Graphics

    • Helpers for managing bitmaps
      • setHasAlpha(boolean) lets an app indicate that all of the pixels in a Bitmap are known to be opaque (false) or that some of the pixels may contain non-opaque alpha values (true). Note, for some configs (such as RGB_565) this call is ignored, since it does not support per-pixel alpha values. This is meant as a drawing hint, as in some cases a bitmap that is known to be opaque can take a faster drawing case than one that may have non-opaque per-pixel alpha values.
      • getByteCount() gets a Bitmap's size in bytes.
      • getGenerationId() lets an application find out whether a Bitmap has been modified, such as for caching.
      • sameAs(android.graphics.Bitmap) determines whether a given Bitmap differs from the current Bitmap, in dimension, configuration, or pixel data.
    • Setting camera location and rotation
    Network

    • High-performance Wi-Fi lock
      • A new high-performance Wi-Fi lock lets applications maintain high-performance Wi-Fi connections even when the device screen is off. Applications that stream music, video, or voice for long periods can acquire the high-performance Wi-Fi lock to ensure streaming performance even when the screen is off. Because it uses more power, applications should acquire the high-performance Wi-Fi when there is a need for a long-running active connection.
      • To create a high-performance lock, pass WIFI_MODE_FULL_HIGH_PERF as the lock mode in a call to createWifiLock().

    • More traffic stats
      • Applications can now access statistics about more types of network usage using new methods in TrafficStats. Applications can use the methods to get UDP stats, packet count, TCP transmit/receive payload bytes and segments for a given UID.
    • SIP auth username
    Download Manager

    IME framework

    Media

    • New streaming audio formats
      • The media framework adds built-in support for raw ADTS AAC content, for improved streaming audio, as well as support for FLAC audio, for highest quality (lossless) compressed audio content. See the Supported Media Formats document for more information.

    Launch controls on stopped applications
    Starting from Android 3.1, the system's package manager keeps track of applications that are in a stopped state and provides a means of controlling their launch from background processes and other applications.
    Note that an application's stopped state is not the same as an Activity's stopped state. The system manages those two stopped states separately.
    The platform defines two new intent flags that let a sender specify whether the Intent should be allowed to activate components in stopped application.

    When neither or both of these flags is defined in an intent, the default behavior is to include filters of stopped applications in the list of potential targets.
    Note that the system adds FLAG_EXCLUDE_STOPPED_PACKAGES to all broadcast intents. It does this to prevent broadcasts from background services from inadvertently or unnecessarily launching components of stoppped applications. A background service or application can override this behavior by adding theFLAG_INCLUDE_STOPPED_PACKAGES flag to broadcast intents that should be allowed to activate stopped applications.
    Applications are in a stopped state when they are first installed but are not yet launched and when they are manually stopped by the user (in Manage Applications).

    Notification of application first launch and upgrade
    The platform adds improved notification of application first launch and upgrades through two new intent actions:

    • ACTION_PACKAGE_FIRST_LAUNCH — Sent to the installer package of an application when that application is first launched (that is, the first time it is moved out of a stopped state). The data contains the name of the package.
    • ACTION_MY_PACKAGE_REPLACED — Notifies an application that it was updated, with a new version was installed over an existing version. This is only sent to the application that was replaced. It does not contain any additional data. To receive it, declare an intent filter for this action. You can use the intent to trigger code that helps get your application back in proper running shape after an upgrade.
    • This intent is sent directly to the application, but only if the application was upgraded while it was in started state (not in a stopped state).

    Core utilities

    • LRU cache
      • A new LruCache class lets your applications benefit from efficient caching. Applications can use the class to reduce the time spent computing or downloading data from the network, while maintaining a sensible memory footprint for the cached data.LruCache is a cache that holds strong references to a limited number of values. Each time a value is accessed, it is moved to the head of a queue. When a value is added to a full cache, the value at the end of that queue is evicted and may become eligible for garbage collection.
    • File descriptor as int
    WebKit

    • File scheme cookies
      • The CookieManager now supports cookies that use the file: URI scheme. You can use setAcceptFileSchemeCookies() to enable/disable support for file scheme cookies, before constructing an instance of WebView or CookieManager. In a CookieManager instance, you can check whether file scheme cookies is enabled by calling allowFileSchemeCookies().
    • Notification of login request
      • To support the browser autologin features introduced in Android 3.0, the new method onReceivedLoginRequest() notifies the host application that an autologin request for the user was processed.
    • Removed classes and interfaces
      • Several classes and interfaces were removed from the public API, after previously being in deprecated state. See the API Differences Report for more information.

    Browser
    The Browser application adds the following features to support web applications:

    • Support for inline playback of video embedded in HTML5 <video> tag. Playback is hardware-accelerated where possible.
    • Layer support for fixed position elements for all sites (mobile and desktop).
    New feature constants
    The platform adds new hardware feature constants that developers can declare in their application manifests, to inform external entities such as Android Market of the application's requirement for new hardware capabilities supported in this version of the platform. Developers declare these and other feature constants in <uses-feature> manifest elements.

    Android Market filters applications based on features declared in <uses-feature> manifest elements. For more information about declaring features in an application manifest, read Android Market Filters. 
저작자 표시 비영리 동일 조건 변경 허락

'Android > NEWS' 카테고리의 다른 글

Open Accessory Library  (0) 2011/05/11
Android 3.1 Platform Highlight  (0) 2011/05/11
Android 3.1 Platform  (0) 2011/05/11
Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
Update Android Developer Guide  (0) 2011/04/01
Android 3.0 Version Note  (0) 2011/03/11
Posted by mirwing
Android/NEWS2011/05/11 02:15
[Google Code Blog]

This morning at Google I/O, the Android team shared some updates. It’s hard to believe a little more than two and a half years ago, we were just one device, launching in one country, on one carrier. Thanks to the ecosystem of manufacturers, developers and carriers, the platform has grown exponentially. There are now:
  • 100 million activated Android devices
  • 400,000 new Android devices activated every day
  • 200,000 free and paid applications available in Android Market
  • 4.5 billion applications installed from Android Market
Mobile—one OS everywhere
Over the past two and a half years, we’ve shipped eight releases of Android and there are now more than 310 Android devices around the world, of all shapes and sizes. This morning we talked about our next version of Android, Ice Cream Sandwich. Our goal with Ice Cream Sandwich is to deliver one operating system that works everywhere, regardless of device. Ice Cream Sandwich will bring everything you love about Honeycomb on your tablet to your phone, including the holographic user interface, more multitasking, the new launcher and richer widgets.

We also launched Music Beta by Google, a new service that lets you upload your personal music collection to the cloud for streaming to your computer and Android devices. With the new service, your music and playlists are automatically kept in sync, so if you create a new playlist on your phone, it’s instantly available on your computer or tablet. You can use a feature called Instant Mix to create a playlist of songs that go well together. You can even listen to music when you’re offline: we automatically store your most recently played music on your Android device and you can choose to make specific albums or playlists available when you’re not connected. The service is launching in beta today to U.S. users and is available by invitation. 




We’ve also added Movies for rent to Android Market. You can choose to rent from thousands of movies starting at $1.99 and have them available across your Android devices—rent a movie on your home computer, and it’ll be available for viewing on your tablet or phone. You can rent from Android Market on the web today, and we’ll be rolling out an update to Verizon XOOM customers beginning today. We’ll start rolling out the update to Android 2.2 and above devices in the coming weeks.

The Android ecosystem has been moving really fast over the last two and a half years and rapid iteration on new and highly-requested features has been a driving force behind Android’s success. But of course that innovation only matters if it reaches consumers. So today we’re announcing that a founding team of industry leaders, including many from the Open Handset Alliance, are working together to adopt guidelines for how quickly devices are updated after a new platform release, and also for how long they will continue to be updated. The founding partners are Verizon, HTC, Samsung, Sprint, Sony Ericsson, LG, T-Mobile, Vodafone, Motorola and AT&T, and we welcome others to join us. To start, we're jointly announcing that new devices from participating partners will receive the latest Android platform upgrades for 18 months after the device is first released, as long as the hardware allows...and that's just the beginning. Stay tuned for more details.

More—extending the platform beyond mobile
From the beginning, Android was designed to extend beyond the mobile phone. With that in mind, we’ve developed Android Open Accessory to help developers start building new hardware accessories that will work across all Android devices. We previewed an initiative called Android@Home, which allows Android apps to discover, connect and communicate with appliances and devices in your home. We also showed a preview of Project Tungsten, an Android device for Music Beta to give you more control over music playback within the Android@Home network.

You can watch the entire Android keynote from Google I/O on our Google Developer YouTube Channel shortly. On behalf of the team, we want to thank the entire Android community of developers, OEMs and carriers who are pushing the platform into new areas and building great experiences for consumers. Without you, the Android platform wouldn’t have grown so large in the past two and a half years. We look forward to seeing where you take it next.
저작자 표시 비영리 동일 조건 변경 허락

'Android > NEWS' 카테고리의 다른 글

Android 3.1 Platform Highlight  (0) 2011/05/11
Android 3.1 Platform  (0) 2011/05/11
Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
Update Android Developer Guide  (0) 2011/04/01
Android 3.0 Version Note  (0) 2011/03/11
Android 3.0 Platform Highlights  (0) 2011/01/27
Posted by mirwing
Android/NEWS2011/04/01 11:46
[[Android]]

3월 30일에 업데이트 된거 같은데 간단하게 훑어 보기만 하고 세세한 내용은 천천히 알아볼 예정입니다.

솔직히 Renderscript의 내용 추가가 제일 기대가 되어서.....ㅋㅋ

new라고 뜬 항목만 모아봤습니다.


추가 & 갱신 된 메뉴들

 Activities - Fragments new

 Activities - Loaders new

 User Interface - Using the Action Bar new

 User Interface -  Dragging and Dropping new

 Graphics - 3D with Renderscript new

 Graphics - Property Animation new

 Copy and Paste new

 Near Field Communication new

 Session Initiation Protocol new

 In-app Billing updated

 Optimizing Apps for Android 3.0 new

 Designing for Accessibility new

 Android Supported Media Formats updated : 많이 달라진 건 없군요...
저작자 표시 비영리 동일 조건 변경 허락

'Android > NEWS' 카테고리의 다른 글

Android 3.1 Platform  (0) 2011/05/11
Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
Update Android Developer Guide  (0) 2011/04/01
Android 3.0 Version Note  (0) 2011/03/11
Android 3.0 Platform Highlights  (0) 2011/01/27
Google I/O 2009  (0) 2011/01/11
Posted by mirwing
Android/NEWS2011/03/11 14:07
[Android Developer]

API Level: 11

For developers, the Android 3.0 platform is available as a downloadable component for the Android SDK. The downloadable platform includes an Android library and system image, as well as a set of emulator skins and more. The downloadable platform includes no external libraries.

To get started developing or testing against Android 3.0, use the Android SDK Manager to download the platform into your SDK. For more information, see Adding SDK Components. If you are new to Android, download the SDK Starter Package first.

For a high-level introduction to Android 3.0, see the Platform Highlights.

Note: If you've already published an Android application, please test and optimize your application on Android 3.0 as soon as possible. You should do so to be sure your application provides the best experience possible on the latest Android-powered devices. For information about what you can do, read Optimizing Apps for Android 3.0.

Revisions

To determine what revision of the Android 3.0 platform you have installed, refer to the "Installed Packages" listing in the Android SDK and AVD Manager.

 Android 3.0, Revision 1 (February 2011)

Dependencies:

Requires SDK Tools r10 or higher.

API Overview

The sections below provide a technical overview of what's new for developers in Android 3.0, including new features and changes in the framework API since the previous version.

Fragments

A fragment is a new framework component that allows you to separate distinct elements of an activity into self-contained modules that define their own UI and lifecycle. To create a fragment, you must extend the Fragment class and implement several lifecycle callback methods, similar to an Activity. You can then combine multiple fragments in a single activity to build a multi-pane UI in which each pane manages its own lifecycle and user inputs.

You can also use a fragment without providing a UI and instead use the fragment as a worker for the activity, such as to manage the progress of a download that occurs only while the activity is running.

Additionally:

  • Fragments are self-contained and you can reuse them in multiple activities
  • You can add, remove, replace and animate fragments inside the activity
  • You can add fragments to a back stack managed by the activity, preserving the state of fragments as they are changed and allowing the user to navigate backward through the different states
  • By providing alternative layouts, you can mix and match fragments, based on the screen size and orientation
  • Fragments have direct access to their container activity and can contribute items to the activity's Action Bar (discussed next)

To manage the fragments in your activity, you must use the FragmentManager, which provides several APIs for interacting with fragments, such as finding fragments in the activity and popping fragments off the back stack to restore their previous state.

To perform a transaction, such as add or remove a fragment, you must create a FragmentTransaction. You can then call methods such as add() remove(), or replace(). Once you've applied all the changes you want to perform for the transaction, you must call commit() and the system applies the fragment transaction to the activity.

For more information about using fragments, read the Fragments documentation. Several samples are also available in the API Demos application.

Action Bar

The Action Bar is a replacement for the traditional title bar at the top of the activity window. It includes the application logo in the left corner and provides a new interface for items in the Options Menu. Additionally, the Action Bar allows you to:

  • Add menu items directly in the Action Bar—as "action items."

    In your XML declaration for the menu item, include the android:showAsAction attribute with a value of "ifRoom". When there's enough room, the menu item appears directly in the Action Bar. Otherwise, the item is placed in the overflow menu, revealed by the menu icon on the right side of the Action Bar.

  • Replace an action item with a widget (such as a search box)—creating an "action view."

    In the XML declaration for the menu item, add the android:actionViewLayout attribute with a layout resource or the android:actionViewClass attribute with the class name of a widget. (You must also declare theandroid:showAsAction attribute so that the item appears in the Action Bar.) If there's not enough room in the Action Bar and the item appears in the overflow menu, it behaves like a regular menu item and does not show the widget.

  • Add an action to the application logo and replace it with a custom logo

    The application logo is automatically assigned the android.R.id.home ID, which the system delivers to your activity's onOptionsItemSelected() callback when touched. Simply respond to this ID in your callback method to perform an action such as go to your application's "home" activity.

    To replace the icon with a logo, specify your application logo in the manifest file with the android:logo attribute, then call setDisplayUseLogoEnabled(true) in your activity.

  • Add breadcrumbs to navigate backward through the back stack of fragments
  • Add tabs or a drop-down list to navigate through fragments
  • Customize the Action Bar with themes and backgrounds

The Action Bar is standard for all applications that use the new holographic theme, which is also standard when you set either the android:minSdkVersion or android:targetSdkVersion to "11".

For more information about the Action Bar, read the Action Bar documentation. Several samples are also available in the API Demos application.

System clipboard

Applications can now copy and paste data (beyond mere text) to and from the system-wide clipboard. Clipped data can be plain text, a URI, or an intent.

By providing the system access to the data you want the user to copy, through a content provider, the user can copy complex content (such as an image or data structure) from your application and paste it into another application that supports that type of content.

To start using the clipboard, get the global ClipboardManager object by calling getSystemService(CLIPBOARD_SERVICE).

To copy an item to the clipboard, you need to create a new ClipData object, which holds one or more ClipData.Item objects, each describing a single entity. To create a ClipData object containing just one ClipData.Item, you can use one of the helper methods, such as newPlainText()newUri(), and newIntent(), which each return a ClipData object pre-loaded with the ClipData.Item you provide.

To add the ClipData to the clipboard, pass it to setPrimaryClip() for your instance of ClipboardManager.

You can then read a file from the clipboard (in order to paste it) by calling getPrimaryClip() on the ClipboardManager. Handling the ClipData you receive can be complicated and you need to be sure you can actually handle the data type in the clipboard before attempting to paste it.

The clipboard holds only one piece of clipped data (a ClipData object) at a time, but one ClipData can contain multiple ClipData.Items.

For more information, read the Copy and Paste documentation. You can also see a simple implementation of copy and paste in the API Demos and a more complete implementation in the Note Pad application.

Drag and drop

New APIs simplify drag and drop operations in your application's user interface. A drag operation is the transfer of some kind of data—carried in a ClipData object—from one place to another. The start and end point for the drag operation is a View, so the APIs that directly handle the drag and drop operations are in the View class.

A drag and drop operation has a lifecycle that's defined by several drag actions—each defined by a DragEvent object—such as ACTION_DRAG_STARTEDACTION_DRAG_ENTERED, and ACTION_DROP. Each view that wants to participate in a drag operation can listen for these actions.

To begin dragging content in your activity, call startDrag() on a View, providing a ClipData object that represents the data to drag, a View.DragShadowBuilder to facilitate the "shadow" that users see under their fingers while dragging, and an Object that can share information about the drag object with views that may receive the object.

To accept a drag object in a View (receive the "drop"), register the view with an OnDragListener by calling setOnDragListener(). When a drag event occurs on the view, the system calls onDrag() for the OnDragListener, which receives a DragEvent describing the type of drag action has occurred (such as ACTION_DRAG_STARTEDACTION_DRAG_ENTERED, and ACTION_DROP). During a drag, the system repeatedly calls onDrag() for the view underneath the drag, to deliver a stream of drag events. The receiving view can inquire the event type delivered to onDragEvent() by calling getAction() on the DragEvent.

Note: Although a drag event may carry a ClipData object, this is not related to the system clipboard. A drag and drop operation should never put the dragged data in the system clipboard.

For more information, read the Dragging and Dropping documentation. You can also see an implementation of drag and drop in the API Demos application and the Honeycomb Gallery application.

App widgets

Android 3.0 supports several new widget classes for more interactive app widgets on the users Home screen, including: GridViewListViewStackViewViewFlipper, and AdapterViewFlipper.

More importantly, you can use the new RemoteViewsService to create app widgets with collections, using widgets such as GridViewListView, and StackView that are backed by remote data, such as from a content provider.

The AppWidgetProviderInfo class (defined in XML with an <appwidget-provider> element) also supports two new fields: autoAdvanceViewId and previewImage. The autoAdvanceViewId field lets you specify the view ID of the app widget subview that should be auto-advanced by the app widget’s host. The previewImage field specifies a preview of what the app widget looks like and is shown to the user from the widget picker. If this field is not supplied, the app widget's icon is used for the preview.

To help create a preview image for your app widget (to specify in the autoAdvanceViewId field), the Android emulator includes an application called "Widget Preview." To create a preview image, launch this application, select the app widget for your application and set it up how you'd like your preview image to appear, then save it and place it in your application's drawable resources.

You can see an implementation of the new app widget features in the StackView App Widget and Weather List Widget applications.

Status bar notifications

The Notification APIs have been extended to support more content-rich status bar notifications, plus a new Notification.Builder class allows you to easily create Notification objects.

New features include:

  • Support for a large icon in the notification, using setLargeIcon(). This is usually for social applications to show the contact photo of the person who is the source of the notification or for media apps to show an album thumbnail.
  • Support for custom layouts in the status bar ticker, using setTicker().
  • Support for custom notification layouts to include buttons with PendingIntents, for more interactive notification widgets. For example, a notification can control music playback without starting an activity.

Content loaders

New framework APIs facilitate asynchronous loading of data using the Loader class. You can use it in combination with UI components such as views and fragments to dynamically load data from worker threads. The CursorLoadersubclass is specially designed to help you do so for data backed by a ContentProvider.

All you need to do is implement the LoaderCallbacks interface to receive callbacks when a new loader is requested or the data has changed, then call initLoader() to initialize the loader for your activity or fragment.

For more information, read the Loaders documentation. You can also see example code using loaders in the FragmentListCursorLoader and LoaderThrottle samples.

Bluetooth A2DP and headset APIs

Android now includes APIs for applications to verify the state of connected Bluetooth A2DP and headset profile devices. For example, applications can identify when a Bluetooth headset is connected for listening to music and notify the user as appropriate. Applications can also receive broadcasts for vendor specific AT commands and notify the user about the state of the connected device, such as when the connected device's battery is low.

You can initialize the respective BluetoothProfile by calling getProfileProxy() with either the A2DP or HEADSET profile constant and a BluetoothProfile.ServiceListener to receive callbacks when the Bluetooth client is connected or disconnected.

Animation framework

An all new flexible animation framework allows you to animate arbitrary properties of any object (View, Drawable, Fragment, Object, or anything else). It allows you to define several aspects of an animation, such as:

  • Duration
  • Repeat amount and behavior
  • Type of time interpolation
  • Animator sets to play animations together, sequentially, or after specified delays
  • Frame refresh delay

You can define these animation aspects, and others, for an object's int, float, and hexadecimal color values, by default. That is, when an object has a property field for one of these types, you can change its value over time to affect an animation. To animate any other type of value, you tell the system how to calculate the values for that given type, by implementing the TypeEvaluator interface.

There are two animators you can use to animate the values of a property: ValueAnimator and ObjectAnimator. The ValueAnimator computes the animation values, but is not aware of the specific object or property that is animated as a result. It simply performs the calculations, and you must listen for the updates and process the data with your own logic. The ObjectAnimator is a subclass of ValueAnimator and allows you to set the object and property to animate, and it handles all animation work. That is, you give the ObjectAnimator the object to animate, the property of the object to change over time, and a set of values to apply to the property over time, then start the animation.

Additionally, the LayoutTransition class enables automatic transition animations for changes you make to your activity layout. To enable transitions for part of the layout, create a LayoutTransition object and set it on any ViewGroup by calling setLayoutTransition(). This causes default animations to run whenever items are added to or removed from the group. To specify custom animations, call setAnimator() on the LayoutTransition and provide a custom Animator, such as a ValueAnimator or ObjectAnimator discussed above.

For more information, see the Property Animation documentation. You can also see several samples using the animation APIs in the API Demos application.

Extended UI framework

  • Multiple-choice selection for ListView and GridView

    New CHOICE_MODE_MULTIPLE_MODAL mode for setChoiceMode() allows users to select multiple items from a ListView or GridView. When used in conjunction with the Action Bar, users can select multiple items and then select the action to perform from a list of options in the Action Bar (which has transformed into a Multi-choice Action Mode).

    To enable multiple-choice selection, call setChoiceMode(CHOICE_MODE_MULTIPLE_MODAL) and register a MultiChoiceModeListener with setMultiChoiceModeListener().

    When the user performs a long-press on an item, the Action Bar switches to the Multi-choice Action Mode. The system notifies the MultiChoiceModeListener when items are selected by calling onItemCheckedStateChanged().

    For an example of multiple-choice selection, see the List15. java class in the API Demos sample application.

  • New APIs to transform views

    New APIs allow you to easily apply 2D and 3D transformations to views in your activity layout. New transformations are made possible with a set of object properties that define the view's layout position, orientation, transparency and more.

    New methods to set the view properties include: setAlpha()setBottom()setLeft()setRight()setBottom()setPivotX()setPivotY()setRotationX()setRotationY()setScaleX()setScaleY()setAlpha(), and others.

    Some methods also have a corresponding XML attribute that you can specify in your layout file, to apply a default transformation. Available attributes include: translationXtranslationYrotationrotationXrotationYscaleX,scaleYtransformPivotXtransformPivotY, and alpha.

    Using some of these new view properties in combination with the new animation framework (discussed above), you can easily apply some fancy animations to your views. For example, to rotate a view on its y-axis, supply ObjectAnimator with the View, the "rotationY" property, and the start and end values:

    ObjectAnimator animator = ObjectAnimator.ofFloat(myView, "rotationY", 0, 360);
    animator
    .setDuration(2000);
    animator
    .start();
  • New holographic themes

    The standard system widgets and overall look have been redesigned and incorporate a new "holographic" user interface theme. The system applies the new theme using the standard style and theme system.

    Any application that targets the Android 3.0 platform—by setting either the android:minSdkVersion or android:targetSdkVersion value to "11"—inherits the holographic theme by default. However, if your application also applies its own theme, then your theme will override the holographic theme, unless you update your styles to inherit the holographic theme.

    To apply the holographic theme to individual activities or to inherit them in your own theme definitions, use one of several new Theme.Holo themes. If your application is compatible with version of Android lower than 3.0 and applies custom themes, then you should select a theme based on platform version.

  • New widgets
    • AdapterViewAnimator

      Base class for an AdapterView that performs animations when switching between its views.

    • AdapterViewFlipper

      Simple ViewAnimator that animates between two or more views that have been added to it. Only one child is shown at a time. If requested, it can automatically flip between each child at a regular interval.

    • CalendarView

      Allows users to select dates from a calendar by touching the date and can scroll or fling the calendar to a desired date. You can configure the range of dates available in the widget.

    • ListPopupWindow

      Anchors itself to a host view and displays a list of choices, such as for a list of suggestions when typing into an EditText view.

    • NumberPicker

      Enables the user to select a number from a predefined range. The widget presents an input field and up and down buttons for selecting a number. Touching the input field allows the user to scroll through values or touch again to directly edit the current value. It also allows you to map positions to strings, so that the corresponding string is displayed instead of the index position.

    • PopupMenu

      Displays a Menu in a modal popup window that's anchored to a view. The popup appears below the anchor view if there is room, or above it if there is not. If the IME (soft keyboard) is visible, the popup does not overlap the IME it until the user touches the menu.

    • SearchView

      Provides a search box that works in conjunction with the Search Manager (in the same manner as the traditional search dialog). It can also display recent query suggestions or custom suggestions as configured by the search provider. This widget is particularly useful for offering search in the Action Bar.

    • StackView

      A view that displays its children in a 3D stack and allows users to swipe through views like a rolodex.

Graphics

  • Hardware accelerated 2D graphics

    You can now enable the OpenGL renderer for your application by setting android:hardwareAccelerated="true" in your manifest element's <application> element or for individual <activity> elements.

    This flag helps applications by making them draw faster. This results in smoother animations, smoother scrolling, and overall better performance and response to user interaction.

  • View support for hardware and software layers

    By default, a View has no layer specified. You can specify that the view be backed by either a hardware or software layer, specified by values LAYER_TYPE_HARDWARE and LAYER_TYPE_SOFTWARE, using setLayerType() or thelayerType attribute.

    A hardware layer is backed by a hardware specific texture (generally Frame Buffer Objects or FBO on OpenGL hardware) and causes the view to be rendered using Android's hardware rendering pipeline, but only if hardware acceleration is turned on for the view hierarchy. When hardware acceleration is turned off, hardware layers behave exactly as software layers.

    A software layer is backed by a bitmap and causes the view to be rendered using Android's software rendering pipeline, even if hardware acceleration is enabled. Software layers should be avoided when the affected view tree updates often. Every update will require to re-render the software layer, which can potentially be slow.

    For more information, see the LAYER_TYPE_HARDWARE and LAYER_TYPE_SOFTWARE documentation.

  • Renderscript 3D graphics engine

    Renderscript is a runtime 3D framework that provides both an API for building 3D scenes as well as a special, platform-independent shader language for maximum performance. Using Renderscript, you can accelerate graphics operations and data processing. Renderscript is an ideal way to create high-performance 3D effects for applications, wallpapers, carousels, and more.

    For more information, see the 3D Rendering and Computation with Renderscript documentation.

Media

  • Time lapse video

    Camcorder APIs now support the ability to record time lapse video. The setCaptureRate() sets the rate at which frames should be captured.

  • Texture support for image streams

    New SurfaceTexture allows you to capture an image stream as an OpenGL ES texture. By calling setPreviewTexture() for your Camera instance, you can specify the SurfaceTexture upon which to draw video playback or preview frames from the camera.

  • HTTP Live streaming

    Applications can now pass an M3U playlist URL to the media framework to begin an HTTP Live streaming session. The media framework supports most of the HTTP Live streaming specification, including adaptive bit rate. See theSupported Media Formats document for more information.

  • EXIF data

    The ExifInterface includes new fields for photo aperture, ISO, and exposure time.

  • Camcorder profiles

    New hasProfile() method and several video quality profiles (such as QUALITY_1080PQUALITY_720PQUALITY_CIF, and others) allow you to determine camcorder quality options.

  • Digital media file transfer

    The platform includes built-in support for Media/Picture Transfer Protocol (MTP/PTP) over USB, which lets users easily transfer any type of media files between devices and to a host computer. Developers can build on this support, creating applications that let users create or manage rich media files that they may want to transfer or share across devices.

  • Digital rights management (DRM)

    New extensible digital rights management (DRM) framework for checking and enforcing digital rights. It's implemented in two architectural layers:

    • A DRM framework API, which is exposed to applications and runs through the Dalvik VM for standard applications.
    • A native code DRM manager that implements the framework API and exposes an interface for DRM plug-ins to handle rights management and decryption for various DRM schemes.

    For application developers, the framework offers an abstract, unified API that simplifies the management of protected content. The API hides the complexity of DRM operations and allows a consistent operation mode for both protected and unprotected content, and across a variety of DRM schemes.

    For device manufacturers, content owners, and Internet digital media providers the DRM framework?s plugin API provides a means of adding support for a DRM scheme of choice into the Android system, for secure enforcement of content protection.

    The preview release does not provide any native DRM plug-ins for checking and enforcing digital rights. However, device manufacturers may ship DRM plug-ins with their devices.

    You can find all of the DRM APIs in the android.drm package.

Keyboard support

  • Support for Control, Meta, Caps Lock, Num Lock and Scroll Lock modifiers. For more information, see META_CTRL_ON and related fields.
  • Support for full desktop-style keyboards, including support for keys such as Escape, Home, End, Delete and others. You can determine whether key events are coming from a full keyboard by querying getKeyboardType() and checking for KeyCharacterMap.FULL
  • TextView now supports keyboard-based cut, copy, paste, and select-all, using the key combinations Ctrl+X, Ctrl+C, Ctrl+V, and Ctrl+A. It also supports PageUp/PageDown, Home/End, and keyboard-based text selection.
  • KeyEvent adds several new methods to make it easier to check the key modifier state correctly and consistently. See hasModifiers(int)hasNoModifiers()metaStateHasModifiers()metaStateHasNoModifiers().
  • Applications can implement custom keyboard shortcuts by subclassing ActivityDialog, or View and implementing onKeyShortcut(). The framework calls this method whenever a key is combined with Ctrl key. When creating an Options Menu, you can register keyboard shortcuts by setting either the android:alphabeticShortcut or android:numericShortcut attribute for each <item> element (or with setShortcut()).
  • Android 3.0 includes a new "virtual keyboard" device with the id KeyCharacterMap.VIRTUAL_KEYBOARD. The virtual keyboard has a desktop-style US key map which is useful for synthesizing key events for testing input.

Split touch events

Previously, only a single view could accept touch events at one time. Android 3.0 adds support for splitting touch events across views and even windows, so different views can accept simultaneous touch events.

Split touch events is enabled by default when an application targets Android 3.0. That is, when the application has set either the android:minSdkVersion or android:targetSdkVersion attribute's value to "11".

However, the following properties allow you to disable split touch events across views inside specific view groups and across windows.

  • The android:splitMotionEvents attribute for view groups allows you to disable split touch events that occur between child views in a layout. For example:
    <LinearLayout android:splitMotionEvents="false" ... >
        ...
    </LinearLayout>

    This way, child views in the linear layout cannot split touch events—only one view can receive touch events at a time.

  • The android:windowEnableSplitTouch style property allows you to disable split touch events across windows, by applying it to a theme for the activity or entire application. For example:
    <style name="NoSplitMotionEvents" parent="android:Theme.Holo">
       
    <item name="android:windowEnableSplitTouch">false</item>
        ...
    </style>

    When this theme is applied to an <activity> or <application>, only touch events within the current activity window are accepted. For example, by disabling split touch events across windows, the system bar cannot receive touch events at the same time as the activity. This does not affect whether views inside the activity can split touch events—by default, the activity can still split touch events across views.

    For more information about creating a theme, read Applying Styles and Themes.

WebKit

  • New WebViewFragment class to create a fragment composed of a WebView.
  • New WebSettings methods:
    • setDisplayZoomControls() allows you to hide the on-screen zoom controls while still allowing the user to zoom with finger gestures (setBuiltInZoomControls() must be set true).
    • New WebSettings method, setEnableSmoothTransition(), allows you to enable smooth transitions when panning and zooming. When enabled, WebView will choose a solution to maximize the performance (for example, the WebView's content may not update during the transition).
  • New WebView methods:
    • onPause() callback, to pause any processing associated with the WebView when it becomes hidden. This is useful to reduce unnecessary CPU or network traffic when the WebView is not in the foreground.
    • onResume() callback, to resume processing associated with the WebView, which was paused during onPause().
    • saveWebArchive() allows you to save the current view as a web archive on the device.
    • showFindDialog() initiates a text search in the current view.

Browser

The Browser application adds the following features to support web applications:

  • Media capture

    As defined by the HTML Media Capture specification, the Browser allows web applications to access audio, image and video capture capabilities of the device. For example, the following HTML provides an input for the user to capture a photo to upload:

    <input type="file" accept="image/*;capture=camera" />

    Or by excluding the capture=camera parameter, the user can choose to either capture a new image with the camera or select one from the device (such as from the Gallery application).

  • Device Orientation

    As defined by the Device Orientation Event specification, the Browser allows web applications to listen to DOM events that provide information about the physical orientation and motion of the device.

    The device orientation is expressed with the x, y, and z axes, in degrees and motion is expressed with acceleration and rotation rate data. A web page can register for orientation events by calling window.addEventListener with event type "deviceorientation" and register for motion events by registering the "devicemotion" event type.

  • CSS 3D Transforms

    As defined by the CSS 3D Transform Module specification, the Browser allows elements rendered by CSS to be transformed in three dimensions.

JSON utilities

New classes, JsonReader and JsonWriter, help you read and write JSON streams. The new APIs complement the org.json classes, which manipulate a document in memory.

You can create an instance of JsonReader by calling its constructor method and passing the InputStreamReader that feeds the JSON string. Then begin reading an object by calling beginObject(), read a key name with nextName(), read the value using methods respective to the type, such as nextString() and nextInt(), and continue doing so while hasNext() is true.

You can create an instance of JsonWriter by calling its constructor and passing the appropriate OutputStreamWriter. Then write the JSON data in a manner similar to the reader, using name() to add a property name and an appropriate value() method to add the respective value.

These classes are strict by default. The setLenient() method in each class configures them to be more liberal in what they accept. This lenient parse mode is also compatible with the org.json's default parser.

New feature constants

The <uses-feature> manfest element should be used to inform external entities (such as Android Market) of the set of hardware and software features on which your application depends. In this release, Android adds the following new constants that applications can declare with this element:

  • "android.hardware.faketouch"

    When declared, this indicates that the application is compatible with a device that offers an emulated touchscreen (or better). A device that offers an emulated touchscreen provides a user input system that can emulate a subset of touchscreen capabilities. An example of such an input system is a mouse or remote control that drives an on-screen cursor. Such input systems support basic touch events like click down, click up, and drag. However, more complicated input types (such as gestures, flings, etc.) may be more difficult or impossible on faketouch devices (and multitouch gestures are definitely not possible).

    If your application does not require complicated gestures and you do not want your application filtered from devices with an emulated touchscreen, you should declare "android.hardware.faketouch" with a <uses-feature> element. This way, your application will be available to the greatest number of device types, including those that provide only an emulated touchscreen input.

    All devices that include a touchscreen also support "android.hardware.faketouch", because touchscreen capabilities are a superset of faketouch capabilities. Thus, unless you actually require a touchscreen, you should add a<uses-feature> element for faketouch.

New permissions

  • "android.permission.BIND_REMOTEVIEWS"

    This must be declared as a required permission in the <service> manifest element for an implementation of RemoteViewsService. For example, when creating an App Widget that uses RemoteViewsService to populate a collection view, the manifest entry may look like this:

    <service android:name=".widget.WidgetService"
       
    android:exported="false"
       
    android:permission="android.permission.BIND_REMOTEVIEWS" />

New platform technologies

  • Storage
    • ext4 file system support to enable onboard eMMC storage.
    • FUSE file system to support MTP devices.
    • USB host mode support to support keyboards and USB hubs.
    • Support for MTP/PTP
  • Linux Kernel
    • Upgraded to 2.6.36
  • Dalvik VM
    • New code to support and optimize for SMP
    • Various improvements to the JIT infrastructure
    • Garbage collector improvements:
      • Tuned for SMP
      • Support for larger heap sizes
      • Unified handling for bitmaps and byte buffers
  • Dalvik Core Libraries
    • New, much faster implementation of NIO (modern I/O library)
    • Improved exception messages
    • Correctness and performance fixes throughout

API differences report

For a detailed view of all API changes in Android 3.0 (API Level 11), see the API Differences Report.

API Level

The Android 3.0 platform delivers an updated version of the framework API. The Android 3.0 API is assigned an integer identifier — 11 — that is stored in the system itself. This identifier, called the "API Level", allows the system to correctly determine whether an application is compatible with the system, prior to installing the application.

To use APIs introduced in Android 3.0 in your application, you need compile the application against the Android library that is provided in the Android 3.0 SDK platform. Depending on your needs, you might also need to add anandroid:minSdkVersion="11" attribute to the <uses-sdk> element in the application's manifest. If your application is designed to run only on Android 2.3 and higher, declaring the attribute prevents the application from being installed on earlier versions of the platform.

For more information about how to use API Level, see the API Levels document.

Built-in Applications

The system image included in the downloadable platform provides these built-in applications:

  • API Demos
  • Browser
  • Calculator
  • Camera
  • Clock
  • Contacts
  • Custom Locale
  • Dev Tools
  • Downloads
  • Email
  • Gallery
  • Gestures Builder
  • Messaging
  • Music
  • Search
  • Settings
  • Spare Parts
  • Speech Recorder
  • Widget Preview

Locales

The system image included in the downloadable SDK platform provides a variety of built-in locales. In some cases, region-specific strings are available for the locales. In other cases, a default version of the language is used. The languages that are available in the Android 3.0 system image are listed below (with language_country/region locale descriptor).

  • Arabic, Egypt (ar_EG)
  • Arabic, Israel (ar_IL)
  • Bulgarian, Bulgaria (bg_BG)
  • Catalan, Spain (ca_ES)
  • Czech, Czech Republic (cs_CZ)
  • Danish, Denmark(da_DK)
  • German, Austria (de_AT)
  • German, Switzerland (de_CH)
  • German, Germany (de_DE)
  • German, Liechtenstein (de_LI)
  • Greek, Greece (el_GR)
  • English, Australia (en_AU)
  • English, Canada (en_CA)
  • English, Britain (en_GB)
  • English, Ireland (en_IE)
  • English, India (en_IN)
  • English, New Zealand (en_NZ)
  • English, Singapore(en_SG)
  • English, US (en_US)
  • English, Zimbabwe (en_ZA)
  • Spanish (es_ES)
  • Spanish, US (es_US)
  • Finnish, Finland (fi_FI)
  • French, Belgium (fr_BE)
  • French, Canada (fr_CA)
  • French, Switzerland (fr_CH)
  • French, France (fr_FR)
  • Hebrew, Israel (he_IL)
  • Hindi, India (hi_IN)
  • Croatian, Croatia (hr_HR)
  • Hungarian, Hungary (hu_HU)
  • Indonesian, Indonesia (id_ID)
  • Italian, Switzerland (it_CH)
  • Italian, Italy (it_IT)
  • Japanese (ja_JP)
  • Korean (ko_KR)
  • Lithuanian, Lithuania (lt_LT)
  • Latvian, Latvia (lv_LV)
  • Norwegian bokmål, Norway (nb_NO)
  • Dutch, Belgium (nl_BE)
  • Dutch, Netherlands (nl_NL)
  • Polish (pl_PL)
  • Portuguese, Brazil (pt_BR)
  • Portuguese, Portugal (pt_PT)
  • Romanian, Romania (ro_RO)
  • Russian (ru_RU)
  • Slovak, Slovakia (sk_SK)
  • Slovenian, Slovenia (sl_SI)
  • Serbian (sr_RS)
  • Swedish, Sweden (sv_SE)
  • Thai, Thailand (th_TH)
  • Tagalog, Philippines (tl_PH)
  • Turkish, Turkey (tr_TR)
  • Ukrainian, Ukraine (uk_UA)
  • Vietnamese, Vietnam (vi_VN)
  • Chinese, PRC (zh_CN)
  • Chinese, Taiwan (zh_TW)
  • Note: The Android platform may support more locales than are included in the SDK system image. All of the supported locales are available in the Android Open Source Project.

    Emulator Skins

    The downloadable platform includes the following emulator skin:

    • WXGA (1280x800, medium density, xlarge screen)

    For more information about how to develop an application that displays and functions properly on all Android-powered devices, see Supporting Multiple Screens.

    저작자 표시 비영리 동일 조건 변경 허락

    'Android > NEWS' 카테고리의 다른 글

    Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
    Update Android Developer Guide  (0) 2011/04/01
    Android 3.0 Version Note  (0) 2011/03/11
    Android 3.0 Platform Highlights  (0) 2011/01/27
    Google I/O 2009  (0) 2011/01/11
    Google I/O 2008  (0) 2011/01/11
    Posted by mirwing
    Android/NEWS2011/01/27 10:29

    Welcome to Android 3.0!

    The Android 3.0 platform introduces many new and exciting features for users and developers. This document provides a glimpse of some of the new features and technologies, as delivered in the Android 3.0 Preview SDK. For more information about the SDK or how to download it, please see the Preview SDK document.

    New User Features

    New UI designed from the ground up for tablets

    Android 3.0 is a new version of the Android platform that is specifically optimized for devices with larger screen sizes, particularly tablets. It introduces a brand new, truly virtual and “holographic” UI design, as well as an elegant, content-focused interaction model.

    Android 3.0 builds on the things people love most about Android — refined multitasking, rich notifications, Home screen customization, widgets, and more — and transforms them with a vibrant, 3D experience and deeper interactivity, making them familiar but even better than before.

    The new UI brings fresh paradigms for interaction, navigation, and customization and makes them available to all applications — even those built for earlier versions of the platform. Applications written for Android 3.0 are able to use an extended set of UI objects, powerful graphics, and media capabilities to engage users in new ways.

    System Bar, for global status and notifications

    Across the system and in all applications, users have quick access to notifications, system status, and soft navigation buttons in a System Bar, available at the bottom of the screen. The System Bar is always present and is a key touchpoint for users, but in a new "lights out mode" can also be dimmed for full-screen viewing, such as for videos.

    Action Bar, for application control

    In every application, users have access to contextual options, navigation, widgets, or other types of content in an Action Bar, displayed at the top of the screen. The Action Bar is always present when an application is in use, although its content, theme, and other properties are managed by the application rather than the system. The Action Bar is another key touchpoint for users, especially with action items and an overflow dropdown menu, which users frequently access in a similar manner in most applications.

    Customizable Home screens

    Five customizable Home screens give users instant access to all parts of the system from any context. Each screen offers a large grid that maintains spatial arrangement in all orientations. Users can select and manipulate Home screen widgets, app shortcuts, and wallpapers using a dedicated visual layout mode. Visual cues and drop shadows improve visibility when adjusting the layout of shortcuts and widgets. Each Home screen also offers a familiar launcher for access to all installed applications, as well as a Search box for universal search of apps, contacts, media files, web content, and more.

    Recent Apps, for easy visual multitasking

    Multitasking is a key strength of Android and it is central to the Android 3.0 experience. As users launch applications to handle various tasks, they can use the Recent Apps list in the System Bar to see the tasks underway and quickly jump from one application context to another. To help users rapidly identify the task associated with each app, the list shows a snapshot of its actual state when the user last viewed it.

    Redesigned keyboard

    The Android soft keyboard is redesigned to make entering text fast and accurate on larger screen sizes. The keys are reshaped and repositioned for improved targeting, and new keys have been added, such as a Tab key, to provide richer and more efficient text input. Users can touch-hold keys to access menus of special characters and switch text/voice input modes from a button in the System Bar.

    Improved text selection, copy and paste

    When entering or viewing text, a new UI lets users quickly select a word by press-hold and then adjust the selection area as needed by dragging a set of bounding arrows to new positions. Users can then select an action from the Action Bar, such as copy to the clipboard, share, paste, web search, or find.

    New connectivity options

    Android 3.0 includes new connectivity features that add versatility and convenience for users. Built-in support for Media/Photo Transfer Protocol lets users instantly sync media files with a USB-connected camera or desktop computer, without needing to mount a USB mass-storage device. Users can also connect full keyboards over either USB or Bluetooth, for a familiar text-input environment. For improved wi-fi connectivity, a new combo scan reduces scan times across bands and filters. New support for Bluetooth tethering means that more types of devices can share the network connection of an Android-powered device.

    Updated set of standard apps


    The Android 3.0 platform includes an updated set of standard applications that are designed for use on larger screen devices. The sections below highlight some of the new features.

    Browser

    The browser includes new features that let users navigate and organize more efficiently. Multiple tabs replace browser windows and a new “incognito” mode allows anonymous browsing. Bookmarks and history are presented and managed in a single unified view. Users can now choose to automatically sign into Google sites on the browser with a supplied account and sync bookmarks with Google Chrome. New multitouch support is now available to JavaScript and plugins. Users can enjoy a better browsing experience at non-mobile sites through an improved zoom and viewport model, overflow scrolling, support for fixed positioning, and more.

    Camera and Gallery

    The Camera application has been redesigned to take advantage of a larger screen for quick access to exposure, focus, flash, zoom, front-facing camera, and more. The Gallery application lets users view albums and other collections in full-screen mode, with easy access to thumbnails for other photos in the collection.

    Contacts

    The Contacts app uses a new two-pane UI and Fast Scroll to let users easily organize and locate contacts. The application offers improved formatting of international phone numbers as user types, based on home country and an international number parsing library. Contact information is presented in a card-like UI, making it easier for users to read and edit contacts.

    Email

    The Email application uses a new two-pane UI to make viewing and organizing messages more efficient. The app lets users select one or more messages, then select an action from the Action Bar, such as moving them to a folder. Users can sync attachments for later viewing and keep track of email using a home screen Widget.

    New Developer Features

    The Android 3.0 platform is designed specially to meet the unique needs of applications on devices with larger screen sizes. It offers all of the tools developers need to create incredible visual and interaction experiences on these devices.

    New UI Framework for creating great tablet apps

    Activity fragments, for greater control of content and design flexibility

    Starting with Android 3.0, developers can break the Activities of their applications into subcomponents called Fragments, then combine them in a variety of ways to create a richer, more interactive experience. For example, an application can use a set of Fragments to create a true multipane UI, with the user being able to interact with each pane independently. Fragments can be added, removed, replaced, and animated inside an Activity dynamically, and they are modular and reusable across multiple Activities. Because they are modular, Fragments also offer an efficient way for developers to write applications that can run properly on both larger screen as well as smaller screen devices.

    Redesigned UI widgets

    Android 3.0 offers an updated set of UI widgets that developers can use to quickly add new types of content to their applications. The new UI widgets are redesigned for use on larger screens such as tablets and incorporate the new holographic UI theme. Several new widget types are available, including a 3D stack, search box, a date/time picker, number picker, calendar, popup menu, and others. Most of the redesigned UI widgets can now be used as remote views in application widgets displayed on the home screen. Applications written for earlier versions can inherit the new Widget designs and themes.

    Expanded Home screen widgets

    Home screen widgets are popular with users because they offer fast access to application-specific data directly from the home screen. Android 3.0 lets developers take home screen widgets to the next level, offering more types of content and new modes of interaction with users. Developers can now use more standard UI widget types home screen widgets, including widgets that let users flip through collections of content as 3D stacks, grids, or lists. Users can interact with the home screen widgets in new ways, such as by using touch gestures to scroll and flip the content displayed in a widget.

    Persistent Action Bar

    The platform provides each application with its own instance of the Action Bar at the top of the screen, which the application can use to give the user quick access to contextual options, widgets, status, navigation, and more. The application can also customize the display theme of its Action Bar instance. The Action Bar lets developers expose more features of their applications to users in a familiar location, while also unifying the experience of using an application that spans multiple Activities or states.

    Richer notifications

    Notifications are a key part of the Android user experience because they let applications show key updates and status information to users in real time. Android 3.0 extends this capability, letting developers include richer content and control more properties. A new builder class lets developers quickly create notifications that include large and small icons, a title, a priority flag, and any properties already available in previous versions. Notifications can offer more types of content by building on the expanded set of UI Widgets that are now available as remote Views.

    Multiselect, clipboard, and drag-and-drop

    The platform offers convenient new interaction modes that developers can use. For managing collections of items in lists or grids, developers can offer a new multiselect mode that lets users choose multiple items for an action. Developers can also use a new system-wide Clipboard to let users easily copy any type of data into and out of their applications. To make it easier for users to manage and organize files, developers can now add drag-and-drop interaction through a DragEvent framework.

    High-performance 2D and 3D graphics

    New animation framework

    The platform includes a flexible new animation framework that lets developers easily animate the properties of UI elements such as Views, Widgets, Fragments, Drawables, or any arbitrary object. Animations can create fades or movement between states, loop an animated image or an existing animation, change colors, and much more. Adding animation to UI elements can add visual interest to an application and refine the user experience, to keep users engaged.

    Hardware-accelerated 2D graphics

    Android 3.0 offers a new hardware-accelerated OpenGL renderer that gives a performance boost to many common graphics operations for applications running in the Android framework. When the renderer is enabled, most operations in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated. Developers can control how hardware-acceleration is applied at every level, from enabling it globally in an application to enabling it in specific Activities and Views inside the application.

    Renderscript 3D graphics engine

    Renderscript is a runtime 3D framework that provides both an API for building 3D scenes as well as a special, platform-independent shader language for maximum performance. Using Renderscript, you can accelerate graphics operations and data processing. Renderscript is an ideal way to create high-performance 3D effects for applications, wallpapers, carousels, and more.

    Support for multicore processor architectures

    Android 3.0 is the first version of the platform designed to run on either single or multicore processor architectures. A variety of changes in the Dalvik VM, Bionic library, and elsewhere add support for symmetric multiprocessing in multicore environments. These optimizations can benefit all applications, even those that are single-threaded. For example, with two active cores, a single-threaded application might still see a performance boost if the Dalvik garbage collector runs on the second core. The system will arrange for this automatically.

    Rich multimedia and connectivity

    HTTP Live streaming

    Applications can now pass an M3U playlist URL to the media framework to begin an HTTP Live streaming session. The media framework supports most of the HTTP Live streaming specification, including adaptive bit rate.

    Pluggable DRM framework

    Android 3.0 includes an extensible DRM framework that lets applications manage protected content according to a variety of DRM mechanisms that may be available on the device. For application developers, the framework API offers an consistent, unified API that simplifies the management of protected content, regardless of the underlying DRM engines.

    Digital media file transfer

    The platform includes built-in support for Media/Picture Transfer Protocol (MTP/PTP) over USB, which lets users easily transfer any type of media files between devices and to a host computer. Developers can build on this support, creating applications that let users create or manage media files that they may want to transfer or share across devices.

    More types of connectivity

    The platform offers new connectivity that developers can build on. API support for Bluetooth A2DP and HSP profiles lets applications query Bluetooth profiles for connected devices, audio state, and more, then notify the user. For example, a music application can check connectivity and status and let the user know that music is playing through a stereo headset. Applications can also register to receive system broadcasts of pre-defined vendor-specific AT commands, such as Platronics Xevent. For example, an application could receive broadcasts that indicate a connected device's battery level and could notify the user or take other action as needed. Applications can also take advantage of the platform's new support for full keyboards connected by USB or Bluetooth.

    Enhancements for enterprise

    In Android 3.0, developers of device administration applications can support new types of policies, including policies for encrypted storage, password expiration, password history, and password complex characters required.

    Compatibility with existing apps

    Android 3.0 brings a new UI designed for tablets and other larger screen devices, but it also is fully compatible with applications developed for earlier versions of the platform, or for smaller screen sizes. Existing applications can seamlessly participate in the new holographic UI theme without code changes, by adding a single attribute in their manifest files. The platform emulates the Menu key, which is replaced by the overflow menu in the Action Bar in the new UI. Developers wanting to take fuller advantage of larger screen sizes can also create dedicated layouts and assets for larger screens and add them to their existing applications.

    More information

    For more information about the new developer APIs, see the Android 3.0 Platform notes in the SDK Preview documentation, available by download through the Android SDK Manager.

    For a video overview of platform features, see the Android 3.0 Sneak Peek.

    저작자 표시 비영리 동일 조건 변경 허락

    'Android > NEWS' 카테고리의 다른 글

    Update Android Developer Guide  (0) 2011/04/01
    Android 3.0 Version Note  (0) 2011/03/11
    Android 3.0 Platform Highlights  (0) 2011/01/27
    Google I/O 2009  (0) 2011/01/11
    Google I/O 2008  (0) 2011/01/11
    Android 2.3 Platform Highlights  (1) 2010/12/07
    Posted by mirwing
    TAG Honeycomb
    Android/NEWS2011/01/11 16:38

    Maps APIs & Mobile


    Building Applications with Google APIs
    Powering Mobile Apps with Social Data
    How Do I Code Thee? Let Me Count the Ways
    Pixel Perfect Code: How to Marry Interaction & Visual Design with Android
    Text-To-Speech & Eyes-Free Project:Android


    Mastering the Android Media Framework
    Writing Real-Time Games for Android
    Coding for Life -- Battery Life, That Is
    Turbo-charge your UI: How to Make your Android UI Fast and Efficient
    Debugging Arts of the Ninja Masters
    저작자 표시 비영리 동일 조건 변경 허락

    'Android > NEWS' 카테고리의 다른 글

    Android 3.0 Version Note  (0) 2011/03/11
    Android 3.0 Platform Highlights  (0) 2011/01/27
    Google I/O 2009  (0) 2011/01/11
    Google I/O 2008  (0) 2011/01/11
    Android 2.3 Platform Highlights  (1) 2010/12/07
    Android 2.3 Version Note  (0) 2010/12/07
    Posted by mirwing
    Android/NEWS2011/01/11 16:34

    Dalvik Virtual Machine Internals


    Inside the Android Application Framework


    Anatomy and Physiology of an Android


    저작자 표시 비영리 동일 조건 변경 허락

    'Android > NEWS' 카테고리의 다른 글

    Android 3.0 Platform Highlights  (0) 2011/01/27
    Google I/O 2009  (0) 2011/01/11
    Google I/O 2008  (0) 2011/01/11
    Android 2.3 Platform Highlights  (1) 2010/12/07
    Android 2.3 Version Note  (0) 2010/12/07
    Android 2.2 Version Note  (0) 2010/05/27
    Posted by mirwing