blob: dfa82b31662687ecef152c6ff3dc0d25c1370aff [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}
102.toggleable.closed .toggleme {
103 display:none;
104}
105#jd-content .toggle-img {
106 margin:0;
107}
108</style>
109
110<div class="toggleable opened">
111 <a href="#" onclick="return toggleDiv(this)">
112 <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
113 Android 2.1, Revision 1</a> <em>(January 2010)</em></a>
114 <div class="toggleme">
115<dl>
116<dt>Dependencies:</dt>
117<dd>
118<p>Requires SDK Tools r4 or higher.</p>
119</dd>
120</dl>
121 </div>
122</div>
123
Scott Mainb149ee82009-12-15 10:47:31 -0800124<h2 id="apps">Built-in Applications</h2>
125
126<p>The system image included in the downloadable platform provides these
127built-in applications:</p>
128
129<table style="border:0;padding-bottom:0;margin-bottom:0;">
130<tr>
131<td style="border:0;padding-bottom:0;margin-bottom:0;">
132 <ul>
133 <li>Alarm Clock</li>
134 <li>Browser</li>
135 <li>Calculator</li>
Scott Mainb149ee82009-12-15 10:47:31 -0800136 <li>Camera</li>
137 <li>Contacts</li>
138 <li>Custom Locale (developer app)</li>
139 <li>Dev Tools (developer app)</li>
Dirk Dougherty5bc32d32010-01-11 16:16:36 -0800140 <li>Email</li>
Scott Mainb149ee82009-12-15 10:47:31 -0800141 </ul>
142</td>
143<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
144 <ul>
Dirk Dougherty5bc32d32010-01-11 16:16:36 -0800145
Scott Mainb149ee82009-12-15 10:47:31 -0800146 <li>Gallery</li>
Dirk Dougherty5bc32d32010-01-11 16:16:36 -0800147 <li>IMEs for Japanese, Chinese, and Latin text input</li>
Scott Mainb149ee82009-12-15 10:47:31 -0800148 <li>Messaging</li>
149 <li>Music</li>
Dirk Dougherty5bc32d32010-01-11 16:16:36 -0800150 <li>Phone</li>
Scott Mainb149ee82009-12-15 10:47:31 -0800151 <li>Settings</li>
152 <li>Spare Parts (developer app)</li>
153 </ul>
154</td>
155</tr>
156</table>
157
Dirk Dougherty5bc32d32010-01-11 16:16:36 -0800158
Scott Mainb149ee82009-12-15 10:47:31 -0800159<h2 id="locs" style="margin-top:.75em;">Locales</h2>
160
161<p>The system image included in the downloadable platform provides a variety of
162built-in locales. In some cases, region-specific strings are available for the
163locales. In other cases, a default version of the language is used. The
164languages that are available in the Android {@sdkPlatformVersion} system
165image are listed below (with <em>language</em>_<em>country/region</em> locale
166descriptor).</p>
167
168<table style="border:0;padding-bottom:0;margin-bottom:0;">
169<tr>
170<td style="border:0;padding-bottom:0;margin-bottom:0;">
171<ul>
172<li>Chinese, PRC (zh_CN)</li>
173<li>Chinese, Taiwan (zh_TW)</li>
174<li>Czech (cs_CZ)</li>
175<li>Dutch, Netherlands (nl_NL)</li>
176<li>Dutch, Belgium (nl_BE)</li>
177<li>English, US (en_US)</li>
178<li>English, Britain (en_GB)</li>
179<li>English, Canada (en_CA)</li>
180<li>English, Australia (en_AU)</li>
181<li>English, New Zealand (en_NZ)</li>
182<li>English, Singapore(en_SG)</li>
183<li>French, France (fr_FR)</li>
184<li>French, Belgium (fr_BE)</li>
185</ul>
186</td>
187<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
188<li>French, Canada (fr_CA)</li>
189<li>French, Switzerland (fr_CH)</li>
190<li>German, Germany (de_DE)</li>
191<li>German, Austria (de_AT)</li>
192<li>German, Switzerland (de_CH)</li>
193<li>German, Liechtenstein (de_LI)</li>
194<li>Italian, Italy (it_IT)</li>
195<li>Italian, Switzerland (it_CH)</li>
196<li>Japanese (ja_JP)</li>
197<li>Korean (ko_KR)</li>
198<li>Polish (pl_PL)</li>
199<li>Russian (ru_RU)</li>
200<li>Spanish (es_ES)</li>
201</td>
202</tr>
203</table>
204
205<p>Localized UI strings match the locales that are accessible
206through Settings.</p>
207
208<h2 id="skins">Emulator Skins</h2>
209
210<p>The downloadable platform includes a set of emulator skins that you can use
211for modeling your application in different screen sizes and resolutions. The
212emulator skins are:</p>
213
214<ul>
215 <li>
216 QVGA (240x320, low density, small screen)
217 </li>
218 <li>
219 WQVGA (240x400, low density, normal screen)
220 </li>
221 <li>
222 FWQVGA (240x432, low density, normal screen)
223 </li>
224 <li>
225 HVGA (320x480, medium density, normal screen)
226 </li>
227 <li>
228 WVGA800 (480x800, high density, normal screen)
229 </li>
230 <li>
231 WVGA854 (480x854 high density, normal screen)
232 </li>
233</ul>
234
235<p>For more information about how to develop an application that displays
236and functions properly on all Android-powered devices, see <a
237href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
238Screens</a>.</p>
239
240<h2 id="api">Framework API</h2>
241
242<p>The sections below provide information about changes made to the application
243framework API provided by the Android {@sdkPlatformVersion} platform.</p>
244
245
246<h3 id="api-level">API level</h3>
247
248<p>The Android {@sdkPlatformVersion} platform delivers an updated version of
249the framework API. The Android {@sdkPlatformVersion} API
250is assigned an integer identifier &mdash;
251<strong>{@sdkPlatformApiLevel}</strong> &mdash; that is
252stored in the system itself. This identifier, called the "API Level", allows the
253system to correctly determine whether an application is compatible with
254the system, prior to installing the application. </p>
255
256<p>To use APIs introduced in Android {@sdkPlatformVersion} in your
257application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the
258attributes of the <code>&lt;uses-sdk&gt;</code> element in your application's
259manifest. </p>
260
261<p>For more information about how to use API Level, see the <a
262href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
263
264
265<h3 id="api-changes">API changes summary</h3>
266
267<p>The following is a summary of some notable changes to the framework APIs.</p>
268
269<h4>Live Wallpapers</h4>
270
Scott Main354261e2009-12-16 15:25:35 -0800271<p>The following additions provide APIs for you to develop animated wallpapers:</p>
Scott Mainb149ee82009-12-15 10:47:31 -0800272<ul>
273<li>New {@link android.service.wallpaper} package.</li>
274<li>New {@link android.app.WallpaperInfo} class.</li>
275<li>Updated {@link android.app.WallpaperManager}.</li>
276</ul>
277
Dirk Dougherty95b528e2010-01-22 16:52:34 -0800278<p>Additionally, if your application uses or provides Live Wallpapers, you must
279remember to add a <a
280href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature></code></a>
281 element to the application's manifest, declaring the attribute
282<code>android:name="android.software.live_wallpaper"</code>. For example:</p>
283
284<pre class="no-pretty-print">
285&lt;uses-feature android:name="android.software.live_wallpaper" />
286</pre>
287
288<p>When you've published your application, Android Market checks for the
289presence of this element and uses it as a filter, ensuring that your application
290is not made available to users whose devices do not support Live Wallpapers.
291</p>
292
Scott Mainb149ee82009-12-15 10:47:31 -0800293<h4>Telephony</h4>
294
295<ul>
296<li>New {@link android.telephony.SignalStrength} class provides information
297about the device's current network signal. This can be acquired from the
298new {@link
299android.telephony.PhoneStateListener#onSignalStrengthsChanged(SignalStrength)}
300callback.</li>
301
302<li>New {@link
303android.telephony.PhoneStateListener#onDataConnectionStateChanged(int,int)}
304callback.</li>
305</ul>
306
307<h4>Views</h4>
308
309<ul>
310<li>New {@link android.view.View} methods {@link android.view.View#isOpaque()}
311and {@link android.view.View#onDrawScrollBars(Canvas)}.</li>
312
313<li>New {@link android.widget.RemoteViews} methods {@link
314android.widget.RemoteViews#addView(int,RemoteViews)} and {@link
315android.widget.RemoteViews#removeAllViews(int)}.</li>
316
317<li>New {@link android.view.ViewGroup} methods {@link
318android.view.ViewGroup#isChildrenDrawingOrderEnabled()} and {@link
319android.view.ViewGroup#setChildrenDrawingOrderEnabled(boolean)}.</li>
320</ul>
321
322<h4>WebKit</h4>
323
324<ul>
325<li>New {@link android.webkit.WebStorage} methods to manipulate web
326storage databases.</li>
327
328<li>New {@link android.webkit.GeolocationPermissions} methods to
329get Geolocation permissions from, and set them on the WebView.</li>
330
331<li>New {@link android.webkit.WebSettings} methods to manage settings for
332app cache, web storage, and zooming based on screen density.</li>
333
334<li>New {@link android.webkit.WebChromeClient} methods for handling video,
335browsing history, custom Views, app cache limits, and more.</li>
336</ul>
337
338</ul>
339
340<!--
341<h3 id="behavior-changes">Behavior changes</h3>
342
343<h3 id="bug-fixes">Bug fixes</h3>
344-->
345
346<h3 id="api-diff">API differences report</h3>
347
348<p>For a detailed view of all API changes in Android {@sdkPlatformVersion} (API
349Level {@sdkPlatformApiLevel}), as compared to API Level 6, see the <a
350href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
351Differences Report</a>.</p>
352