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