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