• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Android 2.3.3 APIs
2sdk.platform.version=2.3.3
3sdk.platform.apiLevel=10
4
5
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="#api">API Overview</a></li>
14  <li><a href="#api-level">API Level</a></li>
15</ol>
16
17<h2>Reference</h2>
18<ol>
19<li><a
20href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
21Differences Report &raquo;</a> </li>
22</ol>
23
24</div>
25</div>
26
27<p>
28<em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
29
30<p>Android 2.3.3 ({@link android.os.Build.VERSION_CODES#GINGERBREAD_MR1})
31is a small feature release that adds several improvements
32and APIs to the Android 2.3 platform.</p>
33
34<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
35downloadable component for the Android SDK. The downloadable platform includes
36an Android library and system image, as well as a set of emulator skins and
37more. To get started developing or testing against Android {@sdkPlatformVersion},
38use the Android SDK Manager to download the platform into your SDK.</p>
39
40
41
42<h2 id="api">API Overview</h2>
43
44<p>The sections below provide a technical overview of what's new for developers
45in {@sdkPlatformVersion}, including new features and changes in the framework
46API since the previous version.</p>
47
48<h3 id="nfc">Near Field Communications (NFC)</h3>
49
50<p>Android 2.3.3 provides improved and extended support for NFC, to allow
51applications to interact with more types of tags in new ways.</p>
52
53<p>A new, comprehensive set of APIs give applications read and write access
54to a wider range of standard tag technologies, including:</p>
55
56<ul>
57<li>NFC-A (ISO 14443-3A)</li>
58<li>NFC-B (ISO 14443-3B)</li>
59<li>NFC-F (JIS 6319-4)</li>
60<li>NFC-V (ISO 15693)</li>
61<li>ISO-DEP (ISO 14443-4)</li>
62<li>MIFARE Classic</li>
63<li>MIFARE Ultralight</li>
64<li>NFC Forum NDEF tags</li>
65</ul>
66
67<p>The platform also provides a limited peer-to-peer communication protocol
68and API. Foreground Activities can use the API to register an NDEF
69message that will get pushed to other NFC devices when they connect.</p>
70
71<p>Advanced tag dispatching now gives applications more control over how and
72when they are launched, when an NFC tag is discovered. Previously, the platform
73used a single-step intent dispatch to notify interested applications that a tag
74was discovered. The platform now uses a four-step process that enables the
75foreground application to take control of a tag event before it is passed to any
76other applications (<code>android.nfc.NfcAdapter.enableForegroundDispatch()</code>).
77
78The new dispatch process also lets apps listen for specific tag content and
79tag technologies, based on two new intent actions &mdash;
80<code>android.nfc.action.NDEF_DISCOVERED</code> and
81<code>android.nfc.action.TECH_DISCOVERED</code>.</p>
82
83<p>The NFC API is available in the {@link android.nfc} and
84{@link android.nfc.tech} packages. The key classes are: </p>
85
86<ul>
87<li>{@link android.nfc.NfcAdapter}, which represents the NFC hardware on the device.</li>
88<li>{@link android.nfc.NdefMessage}, which represents an NDEF data message,
89the standard format in which "records" carrying data are transmitted between
90devices and tags. An NDEF message certain many NDEF records of different types.
91Applications can receive these messages from
92{@link android.nfc.NfcAdapter#ACTION_NDEF_DISCOVERED NDEF_DISCOVERED},
93{@link android.nfc.NfcAdapter#ACTION_TECH_DISCOVERED TECH_DISCOVERED}, or
94{@link android.nfc.NfcAdapter#ACTION_TAG_DISCOVERED TAG_DISCOVERED} Intents.</li>
95<li>{@link android.nfc.NdefRecord}, delivered in an
96{@link android.nfc.NdefMessage}, which describes the type of data being shared
97and carries the data itself.</li>
98<li>{@link android.nfc.Tag}, which represents a tag scanned by the device.
99Multiple types of tags are supported, based on the underlying tag
100technology.</li>
101<li>{@link android.nfc.tech.TagTechnology}, an interface that gives applications
102access to tag properties and I/O operations based on the technologies present
103in the tag. For a full list of tag technologies supported in Android 2.3.3, see
104{@link android.nfc.tech}.</li>
105</ul>
106
107<p>NFC communication relies on wireless technology in the device hardware, and
108is not present in all Android devices. Android devices that do not support
109NFC will return a null object when
110{@link android.nfc.NfcAdapter#getDefaultAdapter(android.content.Context)
111getDefaultAdapter(Context)} is called, and
112<code>context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC)</code>
113will return <code>false</code>. The NFC API is always present, however, regardless of
114underlying hardware support.</p>
115
116<p>To use the NFC API, applications must request permission from the user by
117declaring <code>&lt;uses-permission
118android:name="android.permission.NFC"&gt;</code> in their manifest files.</p>
119
120<p>Additionally, developers can request filtering on Google Play, such that
121their applications are not discoverable to users whose devices do not support
122NFC. To request filtering, add
123<code>&lt;uses-feature android:name="android.hardware.nfc"
124android:required="true"&gt;</code> to the application's manifest.</p>
125
126<p class="note">For more information, read the
127  <a href="{@docRoot}guide/topics/connectivity/nfc/index.html">NFC</a> developer guide.</p>
128
129<h3 id="bluetooth">Bluetooth</h3>
130
131<p>Android 2.3.3 adds platform and API support for Bluetooth nonsecure socket
132connections. This lets applications communicate with simple devices that may not
133offer a UI for authentication. See
134{@link android.bluetooth.BluetoothDevice#createInsecureRfcommSocketToServiceRecord(java.util.UUID)} and
135{@link android.bluetooth.BluetoothAdapter#listenUsingInsecureRfcommWithServiceRecord(java.lang.String, java.util.UUID)}
136for more information. </p>
137
138<h3 id="graphics">Graphics</h3>
139
140<ul>
141<li>A new {@link android.graphics.BitmapRegionDecoder} class lets applications
142decode a rectangle region from an image. The API is particularly useful when an
143original image is large and and the application only need parts of the image.
144</li>
145<li>A new {@link
146android.graphics.BitmapFactory.Options#inPreferQualityOverSpeed} field in {@link
147android.graphics.BitmapFactory.Options} allows applications to use a more accurate
148but slightly slower IDCT method in JPEG decode. This in turn improves the
149quality of the reconstructed image.</li>
150</ul>
151
152
153<h3 id="media">Media framework</h3>
154
155<ul>
156<li>A new {@link android.media.MediaMetadataRetriever} class provides a unified
157interface for retrieving frame and metadata from an input media file.</li>
158<li>{@link android.media.MediaRecorder.AudioEncoder} and {@link
159android.media.MediaRecorder.OutputFormat} include new fields for specifying AMR
160Wideband and AAC formats. </li>
161</ul>
162
163
164<h3 id="speech">Speech recognition</h3>
165
166<p>The speech-recognition API includes new constants to let you manage voice
167search results in new ways. Although the new constants are not needed for normal
168use of speech recognition, you could use them to offer a different view of voice
169search results in your application. For information, see {@link
170android.speech.RecognizerResultsIntent}.</p>
171
172
173<h2 id="api-level">API Level</h2>
174
175<p>The Android {@sdkPlatformVersion} platform delivers an updated version of
176the framework API. The Android {@sdkPlatformVersion} API
177is assigned an integer identifier &mdash;
178<strong>{@sdkPlatformApiLevel}</strong> &mdash; that is
179stored in the system itself. This identifier, called the "API Level", allows the
180system to correctly determine whether an application is compatible with
181the system, prior to installing the application. </p>
182
183<p>To use APIs introduced in Android {@sdkPlatformVersion} in your application,
184you need compile the application against the Android library that is provided in
185the Android {@sdkPlatformVersion} SDK platform. Depending on your needs, you might
186also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code>
187attribute to the <code>&lt;uses-sdk&gt;</code> element in the application's
188manifest. If your application is designed to run only on Android 2.3 and higher,
189declaring the attribute prevents the application from being installed on earlier
190versions of the platform.</p>
191
192<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
193Level?</a></p>