Home | History | Annotate | Download | only in versions
      1 page.title=Android 2.1 Platform
      2 excludeFromSuggestions=true
      3 sdk.platform.version=2.1
      4 sdk.platform.apiLevel=7
      5 sdk.platform.majorMinor=minor
      6 
      7 @jd:body
      8 
      9 <div id="qv-wrapper">
     10 <div id="qv">
     11 
     12 <h2>In this document</h2>
     13 <ol>
     14   <li><a href="#features">Platform Highlights</a></li>
     15   <li><a href="#relnotes">Revisions</a></li>
     16   <li><a href="#api-level">API Level</a></li>
     17   <li><a href="#api">Framework API Changes</a>
     18   <li><a href="#apps">Built-in Applications</a></li>
     19   <li><a href="#locs">Locales</a></li>
     20   <li><a href="#skins">Emulator Skins</a></li>
     21 
     22     </ol>
     23   </li>
     24 </ol>
     25 
     26 <h2>Reference</h2>
     27 <ol>
     28 <li><a
     29 href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
     30 Differences Report &raquo;</a> </li>
     31 </ol>
     32 
     33 </div>
     34 </div>
     35 
     36 <p>
     37 <em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
     38 
     39 <p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
     40 deployable to Android-powered handsets starting in January 2010.
     41 This release includes new API
     42 changes and bug fixes. For information on changes, see the <a href="#api">Framework API</a>
     43 section.</p>
     44 
     45 <p>For developers, the Android {@sdkPlatformVersion} platform is available as a
     46 downloadable component for the Android SDK. The downloadable platform includes a
     47 fully compliant Android library and system image, as well as a set of emulator
     48 skins, sample applications, and more. The downloadable platform
     49 includes no external libraries. </p>
     50 
     51 <p>To get started developing or testing against the Android
     52 {@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
     53 download the platform into your SDK.</p>
     54 
     55 
     56 <h2 id="features">Platform Highlights</h2>
     57 
     58 <p>Android {@sdkPlatformVersion} does not add significant user features, see the <a
     59 href="http://developer.android.com/about/versions/android-2.0-highlights.html">Android
     60 2.0 Platform Highlights</a> document for the latest user features.</p>
     61 
     62 <h2 id="relnotes">Revisions</h2>
     63 
     64 <p>The sections below provide notes about successive releases of
     65 the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
     66 revision number. To determine what revision(s) of the Android
     67 {@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
     68 the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
     69 
     70 
     71 <div class="toggle-content opened" style="padding-left:1em;">
     72 
     73 <p><a href="#" onclick="return toggleContent(this)">
     74   <img src="{@docRoot}assets/images/styles/disclosure_up.png"
     75 class="toggle-content-img" alt="" />
     76   Android {@sdkPlatformVersion}, Revision 3</a> <em>(July 2011)</em>
     77 </a></p>
     78 
     79 <div class="toggle-content-toggleme" style="padding-left:2em;">
     80 
     81 <dl>
     82 <dt>Dependencies:</dt>
     83 <dd>
     84 <p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r12</a> or
     85 higher.</p>
     86 </dd>
     87 <dt>Notes:</dt>
     88 <dd>
     89 <p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
     90 Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
     91 bugs in the previous rendering library. It also unlocks several editor features that were added in
     92 ADT 12.</p>
     93 </dd>
     94 </dl>
     95 
     96 </div>
     97 </div>
     98 
     99 <div class="toggle-content closed" style="padding-left:1em;">
    100 
    101 <p><a href="#" onclick="return toggleContent(this)">
    102   <img src="{@docRoot}assets/images/styles/disclosure_down.png"
    103 class="toggle-content-img" alt="" />
    104   Android {@sdkPlatformVersion}, Revision 2</a> <em>(May 2010)</em>
    105 </a></p>
    106 
    107 <div class="toggle-content-toggleme" style="padding-left:2em;">
    108 <dl>
    109 <dt>Dependencies:</dt>
    110 <dd>
    111 <p>Requires SDK Tools r6 or higher.</p>
    112 </dd>
    113 
    114 <dt>Tools:</dt>
    115 <dd>
    116 <ul> 
    117 <li>Adds support for library projects in the Ant build system.</li>
    118 <li>Adds improved layout rendering in ADTs visual layout editor.</li>
    119 </ul> 
    120 </dd>
    121 
    122 </dl>
    123  </div>
    124 </div>
    125 
    126 <div class="toggle-content closed" style="padding-left:1em;">
    127 
    128 <p><a href="#" onclick="return toggleContent(this)">
    129   <img src="{@docRoot}assets/images/styles/disclosure_down.png"
    130 class="toggle-content-img" alt="" />
    131   Android {@sdkPlatformVersion}, Revision 1</a> <em>(January 2010)</em>
    132 </a></p>
    133 
    134 <div class="toggle-content-toggleme" style="padding-left:2em;">
    135 <dl>
    136 <dt>Dependencies:</dt>
    137 <dd>
    138 <p>Requires SDK Tools r4 or higher.</p>
    139 </dd>
    140 </dl>
    141  </div>
    142 </div>
    143 
    144 
    145 <h2 id="api-level">API Level</h2>
    146 
    147 <p>The Android {@sdkPlatformVersion} platform delivers an updated version of
    148 the framework API. The Android {@sdkPlatformVersion} API
    149 is assigned an integer identifier &mdash;
    150 <strong>{@sdkPlatformApiLevel}</strong> &mdash; that is
    151 stored in the system itself. This identifier, called the "API Level", allows the
    152 system to correctly determine whether an application is compatible with
    153 the system, prior to installing the application. </p>
    154 
    155 <p>To use APIs introduced in Android {@sdkPlatformVersion} in your
    156 application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the
    157 <code>android:minSdkVersion</code> attributes of the <code>&lt;uses-sdk&gt;</code>
    158 element in your application's manifest. </p>
    159 
    160 <p>For more information about how to use API Level, see the <a
    161 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p>
    162 
    163 
    164 <h2 id="api">Framework API Changes</h2>
    165 
    166 <p>The sections below provide information about changes made to the application
    167 framework API provided by the Android {@sdkPlatformVersion} platform.</p>
    168 
    169 <h3>Live Wallpapers</h3>
    170 
    171 <p>The following additions provide APIs for you to develop animated wallpapers:</p>
    172 <ul>
    173 <li>New {@link android.service.wallpaper} package.</li>
    174 <li>New {@link android.app.WallpaperInfo} class.</li>
    175 <li>Updated {@link android.app.WallpaperManager}.</li>
    176 </ul>
    177 
    178 <p>Additionally, if your application uses or provides Live Wallpapers, you must
    179 remember to add a <a
    180 href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature></code></a>
    181  element to the application's manifest, declaring the attribute
    182 <code>android:name="android.software.live_wallpaper"</code>. For example:</p>
    183 
    184 <pre class="no-pretty-print">
    185 &lt;uses-feature android:name="android.software.live_wallpaper" />
    186 </pre>
    187 
    188 <p>When you've published your application, Google Play checks for the
    189 presence of this element and uses it as a filter, ensuring that your application
    190 is not made available to users whose devices do not support Live Wallpapers.
    191 </p>
    192 
    193 <h3>Telephony</h3>
    194 
    195 <ul>
    196 <li>New {@link android.telephony.SignalStrength} class provides information
    197 about the device's current network signal. This can be acquired from the
    198 new {@link
    199 android.telephony.PhoneStateListener#onSignalStrengthsChanged(SignalStrength)}
    200 callback.</li>
    201 
    202 <li>New {@link
    203 android.telephony.PhoneStateListener#onDataConnectionStateChanged(int,int)}
    204 callback.</li>
    205 </ul>
    206 
    207 <h3>Views</h3>
    208 
    209 <ul>
    210 <li>New {@link android.view.View} methods {@link android.view.View#isOpaque()}
    211 and {@link android.view.View#onDrawScrollBars(Canvas)}.</li>
    212 
    213 <li>New {@link android.widget.RemoteViews} methods {@link
    214 android.widget.RemoteViews#addView(int,RemoteViews)} and {@link
    215 android.widget.RemoteViews#removeAllViews(int)}.</li>
    216 
    217 <li>New {@link android.view.ViewGroup} methods {@link
    218 android.view.ViewGroup#isChildrenDrawingOrderEnabled()} and {@link
    219 android.view.ViewGroup#setChildrenDrawingOrderEnabled(boolean)}.</li>
    220 </ul>
    221 
    222 <h3>WebKit</h3>
    223 
    224 <ul>
    225 <li>New {@link android.webkit.WebStorage} methods to manipulate web
    226 storage databases.</li>
    227 
    228 <li>New {@link android.webkit.GeolocationPermissions} methods to
    229 get Geolocation permissions from, and set them on the WebView.</li>
    230 
    231 <li>New {@link android.webkit.WebSettings} methods to manage settings for
    232 app cache, web storage, and zooming based on screen density.</li>
    233 
    234 <li>New {@link android.webkit.WebChromeClient} methods for handling video,
    235 browsing history, custom Views, app cache limits, and more.</li>
    236 </ul>
    237 
    238 </ul>
    239 
    240 <!--
    241 <h3 id="behavior-changes">Behavior changes</h3>
    242 
    243 <h3 id="bug-fixes">Bug fixes</h3>
    244 -->
    245 
    246 <h3 id="api-diff">API differences report</h3>
    247 
    248 <p>For a detailed view of all API changes in Android {@sdkPlatformVersion} (API
    249 Level {@sdkPlatformApiLevel}), as compared to API Level 6, see the <a
    250 href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
    251 Differences Report</a>.</p>
    252 
    253 <h2 id="apps">Built-in Applications</h2>
    254 
    255 <p>The system image included in the downloadable platform provides these
    256 built-in applications:</p>
    257 
    258 <table style="border:0;padding-bottom:0;margin-bottom:0;">
    259 <tr>
    260 <td style="border:0;padding-bottom:0;margin-bottom:0;">
    261 	<ul>
    262 	<li>Alarm Clock</li>
    263 	<li>Browser</li>
    264 	<li>Calculator</li>
    265 	<li>Camera</li>
    266 	<li>Contacts</li>
    267 	<li>Custom Locale (developer app)</li>
    268 	<li>Dev Tools (developer app)</li>
    269     <li>Email</li>
    270 	</ul>
    271 </td>
    272 <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
    273 	<ul>
    274 
    275 	<li>Gallery</li>
    276 	<li>IMEs for Japanese, Chinese, and Latin text input</li>
    277 	<li>Messaging</li>
    278 	<li>Music</li>
    279 	<li>Phone</li>
    280 	<li>Settings</li>
    281 	<li>Spare Parts (developer app)</li>
    282 	</ul>
    283 </td>
    284 </tr>
    285 </table>
    286 
    287 
    288 <h2 id="locs" style="margin-top:.75em;">Locales</h2>
    289 
    290 <p>The system image included in the downloadable platform provides a variety of
    291 built-in locales. In some cases, region-specific strings are available for the
    292 locales. In other cases, a default version of the language is used. The
    293 languages that are available in the Android {@sdkPlatformVersion} system
    294 image are listed below (with <em>language</em>_<em>country/region</em> locale
    295 descriptor).</p>
    296 
    297 <table style="border:0;padding-bottom:0;margin-bottom:0;">
    298 <tr>
    299 <td style="border:0;padding-bottom:0;margin-bottom:0;">
    300 <ul>
    301 <li>Chinese, PRC (zh_CN)</li>
    302 <li>Chinese, Taiwan (zh_TW)</li>
    303 <li>Czech (cs_CZ)</li>
    304 <li>Dutch, Netherlands (nl_NL)</li>
    305 <li>Dutch, Belgium (nl_BE)</li>
    306 <li>English, US (en_US)</li>
    307 <li>English, Britain (en_GB)</li>
    308 <li>English, Canada (en_CA)</li>
    309 <li>English, Australia (en_AU)</li>
    310 <li>English, New Zealand (en_NZ)</li>
    311 <li>English, Singapore(en_SG)</li>
    312 <li>French, France (fr_FR)</li>
    313 <li>French, Belgium (fr_BE)</li>
    314 </ul>
    315 </td>
    316 <td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
    317 <li>French, Canada (fr_CA)</li>
    318 <li>French, Switzerland (fr_CH)</li>
    319 <li>German, Germany (de_DE)</li>
    320 <li>German, Austria (de_AT)</li>
    321 <li>German, Switzerland (de_CH)</li>
    322 <li>German, Liechtenstein (de_LI)</li>
    323 <li>Italian, Italy (it_IT)</li>
    324 <li>Italian, Switzerland (it_CH)</li>
    325 <li>Japanese (ja_JP)</li>
    326 <li>Korean (ko_KR)</li>
    327 <li>Polish (pl_PL)</li>
    328 <li>Russian (ru_RU)</li>
    329 <li>Spanish (es_ES)</li>
    330 </td>
    331 </tr>
    332 </table>
    333 
    334 <p>Localized UI strings match the locales that are accessible
    335 through Settings.</p>
    336 
    337 <h2 id="skins">Emulator Skins</h2>
    338 
    339 <p>The downloadable platform includes a set of emulator skins that you can use
    340 for modeling your application in different screen sizes and resolutions. The
    341 emulator skins are:</p>
    342 
    343 <ul>
    344   <li>
    345     QVGA (240x320, low density, small screen)
    346   </li>
    347   <li>
    348     WQVGA (240x400, low density, normal screen)
    349   </li>
    350   <li>
    351     FWQVGA (240x432, low density, normal screen)
    352   </li>
    353   <li>
    354     HVGA (320x480, medium density, normal screen)
    355   </li>
    356   <li>
    357     WVGA800 (480x800, high density, normal screen)
    358   </li>
    359   <li>
    360     WVGA854 (480x854 high density, normal screen)
    361   </li>
    362 </ul>
    363 
    364 <p>For more information about how to develop an application that displays
    365 and functions properly on all Android-powered devices, see <a
    366 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
    367 Screens</a>.</p>
    368