page.title=Android 3.0 Preview SDK @jd:body

Android 3.0 is the next major release of the Android platform and is optimized for tablet devices. We're offering a Preview SDK so you can get a head-start developing applications for it or simply optimize your existing application for upcoming tablets.

What is the Preview SDK?

The Android 3.0 Preview SDK is an early look at the upcoming version of Android 3.0, for developers only.

The Preview SDK includes:

Be aware that:

About emulator performance

Because the Android emulator must simulate the ARM instruction set architecture on your computer and the WXGA screen is significantly larger than what the emulator normally handles, emulator performance is much slower than usual.

In particular, initializing the emulator can be slow and can take several minutes, depending on your hardware. When the emulator is booting there is limited user feedback, so please be patient and continue waiting until you see the home screen appear.

We're working hard to resolve the performance issues in the emulator and it will improve in future releases. In the meantime, we wanted to give developers access to new APIs and an basic test environment as early as possible.

Keeping in mind that performance on the emulator does not reflect the speed or performance of apps on actual devices running Android 3.0, developing and testing on the emulator is still an important tool in evaluating your application's appearance and functionality on the new platform.

What can I do with the preview?

The Preview SDK is intended for testing existing applications on the new platform and developing new applications with new Android 3.0 APIs.

If you have an existing Android application, you don't have to do anything. Android applications are always forward-compatible. If your application is a good citizen of the Android APIs, your app should work fine on devices running Android 3.0 without any additional work. However, in order to ensure proper performance and provide users a better experience when running your application on an Android 3.0 tablet, we recommend that you perform the following:

  1. Test your application on Android 3.0

    Simply install the Android 3.0 preview in your Android SDK, create an AVD using the Android 3.0 system image, install your application, and run some tests.

    As mentioned above, your application should perform as expected. You might, however, discover that your activity layouts are less than ideal on a large screen or some other aspects of your application don't behave the way you expect.

  2. Inherit the new "Holographic" theme

    Android 3.0 offers an updated set of UI widgets that are redesigned for use on larger screens such as tablets and incorporate the new holographic theme. Your existing application can inherit the new design simply by setting the {@code <uses-sdk>} element's {@code android:targetSdkVersion} attribute to {@code "Honeycomb"}.

    If you do not update the {@code android:targetSdkVersion} attribute and the {@code android:minSdkVersion} is set to "9" or lower, then your application uses the widget designs from Android 2.3 and does not inherit the holographic theme.

    In order for your application to match the rest of the system UI, we highly recommend you make this change to inherit the new widget styles and system theme. However, beware that doing so might conflict with color or text designs you applied to your application based on the previous system theme, so you should be sure to inspect your application UI when using the holographic theme.

  3. Provide alternative layouts for extra large screens

    As discussed in the guide to Supporting Multiple Screens, Android 2.3 and above support the xlarge resource qualifier, which you should use to supply alternative layouts for extra large screens.

    By providing alternative layouts for some of your activities when running on extra large screens, you can improve the user experience of your application on a tablet without using any new APIs.

    For example, here are some things to consider when creating a new layout for tables:

    Note: You can add alternative resources for xlarge screens without changing your {@code minSdkVersion}. For example, if you add alternative layouts in res/layout-xlarge/ and your application is compatible with older versions, such as Android 1.5—which doesn't support xlarge screens—this layout directory is simply ignored by those devices.

Otherwise, if you want to develop a new application or upgrade your existing application to use APIs added in Android 3.0, we encourage you to get started by developing against the Android 3.0 preview platform. You can get started the same way as you would for any other version of Android.

To get started—whether testing an existing application or creating a new one—follow the procedure in the following section to install the Preview SDK.

How do I get it?

To get the Preview SDK, you can download it using the Android SDK and AVD Manager.

If you're new to Android development, start by downloading the Android SDK starter package.

Launch the Android SDK and AVD Manager and install the following:

Note: Be sure to install the documentation component for the Honeycomb Preview SDK. The API reference for the Android 3.0 API is not available online.

Once you have installed these components, open your SDK directory and navigate to {@code docs/sdk/} and open {@code index.html} in your browser.

Known issues

The following known issues occur for Android 3.0 AVDs that are loaded in the emulator:

For an overview of new features in Android 3.0, read the Platform Highlights.