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