Write Once Test Everywhere

Today, Android can be found in a bewildering array of mobile phones, tablets, and other devices. This is both a blessing and a curse. It's a blessing for consumers because they can choose between Android-powered devices of different shapes, sizes, and prices. But for developers, it can be a curse to try to support all those variations.

To complicate things, the rapid pace of Android development has left a fragmented trail of devices running different versions of the platform in its wake. The following table shows all the versions of Android ever

released:1

Version

Code name2

API

Released

Comments

1.0

BASE

1

Oct. 2008

No longer in use

1.1

BASE_1_1

2

Feb. 2009

No longer in use

1.5

CUPCAKE

3

May 2009

Widgets

1.6

DONUT

4

Sept. 2009

High- and low-density

displays

2.0

ECLAIR

5

Nov. 2009

No longer in use

2.0.1

ECLAIR_0_1

6

Dec. 2009

Multi-touch, no longer in

use

2.1

ECLAIR_MR1

7

Jan. 2010

Live wallpaper

2.2

FROYO

8

May 2010

SD card installs

This chapter will cover how to support multiple Android versions and screen resolutions in one program. The first step is testing.

1. See http://d.android.com/resources/dashboard/platform-versions.html for an up-to-date chart showing the percentage of devices running each version of Android.

2. Android version codes and API levels are specified in the Build.VERSION_CODES class.

0 0

Post a comment