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