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