Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1 | page.title=Android KitKat |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 2 | |
| 3 | @jd:body |
| 4 | |
| 5 | |
| 6 | <style> |
| 7 | </style> |
| 8 | |
| 9 | <script> |
| 10 | function revealSection(hashy) { |
| 11 | if (hashy != "" && !$(hashy).is(":visible")) { |
| 12 | sectionId = $(hashy).closest(".version-section").attr("id"); |
| 13 | link = $("#title-tabs a[href$="+sectionId+"]"); |
| 14 | link.parent().addClass("selected"); |
| 15 | link.parent().siblings().removeClass("selected"); |
| 16 | |
| 17 | sectionDiv = $(".version-section"+link.attr("href")); |
| 18 | if (sectionDiv.length) { |
| 19 | $(".version-section").hide(); |
| 20 | sectionDiv.show(); |
| 21 | } |
| 22 | |
| 23 | $('html, body').animate({ |
| 24 | scrollTop: $(hashy).offset().top |
| 25 | }, 100); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | $(document).ready(function() { |
| 30 | $("#title-tabs li a").each(function() { |
| 31 | $(this).click(function(){ |
| 32 | $(this).parent().addClass("selected"); |
| 33 | $(this).parent().siblings().removeClass("selected"); |
| 34 | $(".version-section").hide(); |
| 35 | $($(this).attr("href")).show(); |
| 36 | return false; |
| 37 | }); |
| 38 | }); |
| 39 | |
| 40 | hashy = escapeHTML(location.hash); |
| 41 | revealSection(hashy); |
| 42 | }); |
| 43 | |
| 44 | window.onhashchange = function () { |
| 45 | revealSection(escapeHTML(location.hash)); |
| 46 | } |
| 47 | |
| 48 | </script> |
| 49 | |
| 50 | <style> |
| 51 | |
| 52 | </style> |
| 53 | |
| 54 | <!-- BEGIN ANDROID 4.4 --> |
| 55 | <div id="44-android-44" class="version-section"> |
| 56 | |
Dirk Dougherty | 56278b7 | 2013-12-04 13:43:48 -0800 | [diff] [blame] | 57 | <div style="padding:0px 0px 0px 60px;margin-top:-20px;float:right;"> |
| 58 | <img src="{@docRoot}images/kk-devices.png" alt="Android 4.4 on phone and tablet" width="380"> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 59 | </div> |
| 60 | |
| 61 | <div class="landing-docs" style="float:right;clear:both;margin:22px 0 2em 3em;"> |
| 62 | <div class="col-4 normal-links highlights" style="font-size:12px;"> |
| 63 | <h3 id="thisd" >Key Developer Features</h3> |
| 64 | <ul style="list-style-type:none;"> |
| 65 | <!--<li><a href="#44-ui">UI refresh</a></li>--> |
| 66 | <li><a href="#44-hce">Host Card Emulation</a></li> |
| 67 | <li><a href="#44-printing">Printing framework</a></li> |
| 68 | <li><a href="#44-storage-access">Storage access framework</a></li> |
| 69 | <li><a href="#44-sensors">Low-power sensors</a></li> |
| 70 | <li><a href="#44-sms-provider">SMS provider</a></li> |
| 71 | <li><a href="#44-immersive">Full-screen Immersive mode</a></li> |
| 72 | <li><a href="#44-transitions">Transitions framework</a></li> |
| 73 | <li><a href="#44-webview">Chromium WebView</a></li> |
| 74 | <li><a href="#44-screen-recording">Screen recording</a></li> |
| 75 | <li><a href="#44-renderscript-ndk">RenderScript NDK</a></li> |
| 76 | <li><a href="#44-bluetooth">Bluetooth HOGP and MAP</a></li> |
| 77 | <li><a href="#44-ir-blasters">IR Blasters</a></li> |
| 78 | <li><a href="#44-closed-captioning">Closed captioning settings</a></li> |
| 79 | <li><a href="#44-international-users">RTL features</a></li> |
| 80 | <li><a href="#44-security">Security enhancements</a></li> |
| 81 | <li><a href="#44-tools">Tools for analyzing memory use</a></li> |
| 82 | </ul> |
| 83 | </div> |
| 84 | </div> |
| 85 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 86 | <p>Welcome to Android 4.4 KitKat!</p> |
| 87 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 88 | <p> |
| 89 | Android KitKat brings all of Android's most innovative, most beautiful, and |
| 90 | most useful features to more devices everywhere. |
| 91 | </p> |
| 92 | |
| 93 | <p> |
| 94 | This document provides a glimpse of what's new for developers. |
| 95 | </p> |
| 96 | |
| 97 | <p> |
| 98 | Find out more about KitKat for consumers at <a href= |
| 99 | "http://www.android.com/versions/kit-kat-4-4/">www.android.com</a>. |
| 100 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 101 | |
| 102 | |
| 103 | <h2 id="svelte" style="line-height:1.25em;">Making Android for everyone</h2> |
| 104 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 105 | <p> |
| 106 | <span style="white-space:nowrap;">Android 4.4</span> is designed to run fast, |
| 107 | smooth, and responsively on a much broader range of devices than ever before |
| 108 | — including on millions of entry-level devices around the world that |
| 109 | have as little as <strong>512MB RAM</strong>. |
| 110 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 111 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 112 | <p> |
| 113 | KitKat streamlines every major component to reduce memory use and introduces |
| 114 | new APIs and tools to help you create innovative, responsive, |
| 115 | memory-efficient applications. |
| 116 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 117 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 118 | <p> |
| 119 | OEMs building the next generation of Android devices can take advantage of |
| 120 | <strong>targeted recommendations and options</strong> to run <span style= |
| 121 | "white-space:nowrap;">Android 4.4</span> efficiently, even on low-memory |
| 122 | devices. Dalvik JIT code cache tuning, kernel samepage merging (KSM), swap to |
| 123 | zRAM, and other optimizations help manage memory. New configuration options |
| 124 | let OEMs tune out-of-memory levels for processes, set graphics cache sizes, |
| 125 | control memory reclaim, and more. |
| 126 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 127 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 128 | <p> |
| 129 | In Android itself, changes across the system improve memory management and |
| 130 | reduce memory footprint. Core system processes are trimmed to <strong>use |
| 131 | less heap</strong>, and they now more <strong>aggressively protect system |
| 132 | memory</strong> from apps consuming large amounts of RAM. When multiple |
| 133 | services start at once — such as when network connectivity changes |
| 134 | — Android now <strong>launches the services serially</strong>, in small |
| 135 | groups, to avoid peak memory demands. |
| 136 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 137 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 138 | <p> |
| 139 | For developers, <span style="white-space:nowrap;">Android 4.4</span> helps |
| 140 | you deliver <strong>apps that are efficient and responsive</strong> on all |
| 141 | devices. A new API, <span style= |
| 142 | "font-size:11.5px;font-family:monospace;">ActivityManager.isLowRamDevice()</span>, |
| 143 | lets you tune your app's behavior to match the device's memory configuration. |
| 144 | You can modify or disable large-memory features as needed, depending on the |
| 145 | use-cases you want to support on entry-level devices. Learn more about |
Dirk Dougherty | 9a52d65 | 2013-11-04 10:15:46 -0800 | [diff] [blame] | 146 | optimizing your apps for low-memory devices <a |
| 147 | href="{@docRoot}training/articles/memory.html">here</a>. |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 148 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 149 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 150 | <p> |
| 151 | New tools give also give you powerful insight into your app's memory use. The |
| 152 | <strong>procstats tool</strong> details memory use over time, with run times |
| 153 | and memory footprint for foreground apps and background services. An |
| 154 | on-device view is also available as a new developer option. The |
| 155 | <strong>meminfo tool</strong> is enhanced to make it easier to spot memory |
| 156 | trends and issues, and it reveals additional memory overhead that hasn't |
| 157 | previously been visible. |
| 158 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 159 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 160 | |
| 161 | <h2 id="44-hce">New NFC capabilities through Host Card Emulation</h2> |
| 162 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 163 | <p> |
| 164 | <span style="white-space:nowrap;">Android 4.4</span> introduces new platform |
| 165 | support for secure NFC-based transactions through <strong>Host Card |
| 166 | Emulation</strong> (HCE), for payments, loyalty programs, card access, |
| 167 | transit passes, and other custom services. With HCE, any app on an Android |
| 168 | device can emulate an NFC smart card, letting users tap to initiate |
| 169 | transactions with an app of their choice — no provisioned secure |
| 170 | element (SE) in the device is needed. Apps can also use a new <strong>Reader |
| 171 | Mode</strong> to act as readers for HCE cards and other NFC-based |
| 172 | transactions. |
| 173 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 174 | |
| 175 | <div style="float:right;margin:32px;width:200px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 176 | <img src="{@docRoot}images/kk-contactless-card.png" alt="" width="200" style= |
| 177 | "margin-bottom:0;"> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 178 | </div> |
| 179 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 180 | <p> |
| 181 | Android HCE emulates ISO/IEC 7816 based smart cards that use the contactless |
| 182 | ISO/IEC 14443-4 (ISO-DEP) protocol for transmission. These cards are used by |
| 183 | many systems today, including the existing EMVCO NFC payment infrastructure. |
| 184 | Android uses Application Identifiers (AIDs) as defined in ISO/IEC 7816-4 as |
| 185 | the basis for routing transactions to the correct Android applications. |
| 186 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 187 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 188 | <p> |
| 189 | Apps declare the AIDs they support in their manifest files, along with a |
| 190 | category identifier that indicates the type of support available (for |
| 191 | example, "payments"). In cases where multiple apps support the same AID in |
| 192 | the same category, Android displays a dialog that lets the user choose which |
| 193 | app to use. |
| 194 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 195 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 196 | <p> |
| 197 | When the user taps to pay at a point-of-sale terminal, the system extracts |
| 198 | the preferred AID and routes the transaction to the correct application. The |
| 199 | app reads the transaction data and can use any local or network-based |
| 200 | services to verify and then complete the transaction. |
| 201 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 202 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 203 | <p> |
| 204 | Android HCE requires an NFC controller to be present in the device. Support |
| 205 | for HCE is already widely available on most NFC controllers, which offer |
| 206 | dynamic support for both HCE and SE transactions. <span style= |
| 207 | "white-space:nowrap;">Android 4.4</span> devices that support NFC will |
| 208 | include Tap & Pay for easy payments using HCE. |
| 209 | </p> |
| 210 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 211 | |
| 212 | <h2 id="44-printing">Printing framework</h2> |
| 213 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 214 | <p> |
| 215 | Android apps can now print any type of content over Wi-Fi or |
| 216 | cloud-hosted services such as Google Cloud Print. In print-enabled apps, |
| 217 | users can discover available printers, change paper sizes, choose specific |
| 218 | pages to print, and print almost any kind of document, image, or file. |
| 219 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 220 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 221 | <p> |
| 222 | <span style="white-space:nowrap;">Android 4.4</span> introduces native |
| 223 | platform support for printing, along with APIs for managing printing and |
| 224 | adding new types of printer support. The platform provides a print manager |
| 225 | that mediates between apps requesting printing and installed print services |
| 226 | that handle print requests. The print manager provides shared services and a |
| 227 | system UI for printing, giving users consistent control over printing from |
| 228 | any app. The print manager also ensures the security of content as it's |
| 229 | passed across processes, from an app to a print service. |
| 230 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 231 | |
| 232 | <div style="float:right;margin:22px 0px 0px 24px;width:490px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 233 | <img src="{@docRoot}images/kk-print-land-n5.jpg" alt="" width="471" style= |
| 234 | "margin-bottom:0;"> |
| 235 | <p class="img-caption" style= |
| 236 | "padding-top:1.5em;margin-left:6px;line-height:1.25em;width:480px;"> |
| 237 | You can add printing support to your apps or develop print services to |
| 238 | support specific types of printers. |
| 239 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 240 | </div> |
| 241 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 242 | <p> |
| 243 | Printer manufacturers can use new APIs to develop their own <strong>print |
| 244 | services</strong> — pluggable components that add vendor-specific logic |
| 245 | and services for communicating with specific types of printers. They can |
| 246 | build print services and distribute them through Google Play, making it easy |
| 247 | for users to find and install them on their devices. Just as with other apps, |
| 248 | you can update print services over-the-air at any time. |
| 249 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 250 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 251 | <p> |
| 252 | <strong>Client apps</strong> can use new APIs to add printing capabilities to |
| 253 | their apps with minimal code changes. In most cases, you would add a print |
| 254 | action to your Action Bar and a UI for choosing items to print. You would |
| 255 | also implement APIs to create print jobs, query the print manager for status, |
| 256 | and cancel jobs. This lets you print nearly any type of content, from local |
| 257 | images and documents to network data or a view rendered to a canvas. |
| 258 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 259 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 260 | <p> |
| 261 | For broadest compatibility, Android uses PDF as its primary file format for |
| 262 | printing. Before printing, your app needs to generate a properly paginated |
| 263 | PDF version of your content. For convenience, the printing API provides |
| 264 | native and WebView helper classes to let you create PDFs using standard |
| 265 | Android drawing APIs. If your app knows how to draw the content, it can |
| 266 | quickly create a PDF for printing. |
| 267 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 268 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 269 | <p> |
| 270 | Most devices running <span style="white-space:nowrap;">Android 4.4</span> |
| 271 | will include Google Cloud Print pre-installed as a print service, as well as |
| 272 | several Google apps that support printing, including Chrome, Drive, Gallery, |
| 273 | and QuickOffice. |
| 274 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 275 | |
| 276 | <h2 id="44-storage-access">Storage access framework</h2> |
| 277 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 278 | <p> |
| 279 | A new <strong>storage access framework</strong> makes it simple for users to |
| 280 | browse and open documents, images, and other files across all of their their |
| 281 | preferred document storage providers. A standard, easy-to-use UI lets users |
| 282 | browse files and access recents in a consistent way across apps and |
| 283 | providers. |
| 284 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 285 | |
| 286 | <div style="float:right;margin:22px 0px 0px 24px;width:490px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 287 | <img src="{@docRoot}images/kk-saf2-n5.jpg" alt="" width="240" style= |
| 288 | "margin-bottom:0;"> <img src="{@docRoot}images/kk-saf1-n5.jpg" alt="" width="240" |
| 289 | style="margin-bottom:0;padding-left:6px;"> |
| 290 | <p class="img-caption" style= |
| 291 | "padding-top:1.5em;margin-left:6px;line-height:1.25em;width:480px;"> |
| 292 | Box and others have integrated their services into the storage access |
| 293 | framework, giving users easy access to their documents from apps across the |
| 294 | system. |
| 295 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 296 | </div> |
| 297 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 298 | <p> |
| 299 | Cloud or local storage services can participate in this ecosystem by |
| 300 | implementing a new document provider class that encapsulates their services. |
| 301 | The provider class includes all of the APIs needed to register the provider |
| 302 | with the system and manage browsing, reading, and writing documents in the |
| 303 | provider. The document provider can give users access to any remote or local |
| 304 | data that can be represented as files — from text, photos, and |
| 305 | wallpapers to video, audio, and more. |
| 306 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 307 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 308 | <p> |
| 309 | If you build a <strong>document provider</strong> for a cloud or local |
| 310 | service, you can deliver it to users as part of your existing Android app. |
| 311 | After downloading and installing the app, users will have instant access to |
| 312 | your service from any app that participates in the framework. This can help |
| 313 | you gain exposure and user engagement, since users will find your services |
| 314 | more easily. |
| 315 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 316 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 317 | <p> |
| 318 | If you develop a <strong>client app</strong> that manages files or documents, |
| 319 | you can integrate with the storage access framework just by using new |
| 320 | <span style="font-size:11.5px;">CREATE_DOCUMENT</span> or <span style= |
| 321 | "font-size:11.5px;">OPEN_DOCUMENT</span> intents to open or create files |
| 322 | — the system automatically displays the standard UI for browsing |
| 323 | documents, including all available document providers. |
| 324 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 325 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 326 | <p> |
| 327 | You can integrate your client app one time, for all providers, without any |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 328 | vendor-specific code. As users add or remove providers, they’ll continue to |
| 329 | have access to their preferred services from your app, without changes or |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 330 | updates needed in your code. |
| 331 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 332 | |
| 333 | <p> |
| 334 | The storage access framework is integrated with the existing <span style= |
| 335 | "font-size:11.5px;">GET_CONTENT</span> intent, so users also have access to |
| 336 | all of their previous content and data sources from the new system UI for |
| 337 | browsing. Apps can continue using <span style= |
| 338 | "font-size:11.5px;">GET_CONTENT</span> as a way to let users import data. The |
| 339 | storage access framework and system UI for browsing make it easier for users |
| 340 | to find and import their data from a wider range of sources. |
| 341 | </p> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 342 | <p> |
| 343 | Most devices running <span style="white-space:nowrap;">Android 4.4</span> |
| 344 | will include Google Drive and local storage pre-integrated as document |
| 345 | providers, and Google apps that work with files also use the new framework. |
| 346 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 347 | |
| 348 | |
| 349 | <h2 id="44-sensors">Low-power sensors</h2> |
| 350 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 351 | <h4 id="44-sensor-batching">Sensor batching</h4> |
| 352 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 353 | <p> |
| 354 | <span style="white-space:nowrap;">Android 4.4</span> introduces platform |
| 355 | support for <strong>hardware sensor batching</strong>, a new optimization |
| 356 | that can dramatically reduce power consumed by ongoing sensor activities. |
| 357 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 358 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 359 | <p> |
| 360 | With sensor batching, Android works with the device hardware to collect and |
| 361 | deliver sensor events efficiently in batches, rather than individually as |
| 362 | they are detected. This lets the device's application processor remain in a |
| 363 | low-power idle state until batches are delivered. You can request batched |
| 364 | events from any sensor using a standard event listener, and you can control |
| 365 | the interval at which you receive batches. You can also request immediate |
| 366 | delivery of events between batch cycles. |
| 367 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 368 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 369 | <p> |
| 370 | Sensor batching is ideal for low-power, long-running use-cases such as |
| 371 | fitness, location tracking, monitoring, and more. It can makes your app more |
| 372 | efficient and it lets you track sensor events continuously — even while |
| 373 | the screen is off and the system is asleep. |
| 374 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 375 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 376 | <p> |
| 377 | Sensor batching is currently available on Nexus 5, and we're working with our |
| 378 | chipset partners to bring it to more devices as soon as possible. |
| 379 | </p> |
| 380 | |
Dirk Dougherty | 79fbed0 | 2013-10-31 09:49:00 -0700 | [diff] [blame] | 381 | <div style="float:right;margin:1em 0em 0em 3em;width:490px;clear:both"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 382 | <img src="{@docRoot}images/kk-sensors-moves-n5.jpg" alt="" width="240" style= |
| 383 | "margin-bottom:0;"> <img src="{@docRoot}images/kk-sensors-runtastic-n5.jpg" alt="" |
| 384 | width="240" style="margin-bottom:0;padding-left:4px;"> |
| 385 | <p class="img-caption" style= |
| 386 | "padding-top:1.5em;margin-left:6px;line-height:1.25em;"> |
| 387 | <strong>Moves</strong> and <strong>Runtastic Pedometer</strong> are using |
| 388 | the hardware step-detector to offer long-running, low-power services. |
| 389 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 390 | </div> |
| 391 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 392 | <h4 id="44-step-detector">Step Detector and Step Counter</h4> |
| 393 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 394 | <p> |
| 395 | <span style="white-space:nowrap;">Android 4.4</span> also adds platform |
| 396 | support for two new composite sensors — step detector |
| 397 | and step counter — that let your app track steps when |
| 398 | the user is walking, running, or climbing stairs. These new sensors are |
| 399 | implemented in hardware for low power consumption. |
| 400 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 401 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 402 | <p> |
| 403 | The step detector analyzes accelerometer input to recognize when the user has |
| 404 | taken a step, then triggers an event with each step. The step counter tracks |
| 405 | the total number of steps since the last device reboot and triggers an event |
| 406 | with each change in the step count. Because the logic and sensor management |
| 407 | is built into the platform and underlying hardware, you don't need to |
| 408 | maintain your own detection algorithms in your app. |
| 409 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 410 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 411 | <p> |
| 412 | Step detector and counter sensors are available on Nexus 5, and we're working |
| 413 | with our chipset partners to bring them to new devices as soon as possible. |
| 414 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 415 | |
| 416 | |
| 417 | <h2 id="44-sms-provider">SMS provider</h2> |
| 418 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 419 | <p> |
| 420 | If you develop a messaging app that uses SMS or MMS, you can now use a |
| 421 | <strong>shared SMS provider and new APIs</strong> to manage your app's |
| 422 | message storage and retrieval. The new SMS provider and APIs define a |
| 423 | standardized interaction model for all apps that handle SMS or MMS messages. |
| 424 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 425 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 426 | <p> |
| 427 | Along with the new provider and APIs, <span style= |
| 428 | "white-space:nowrap;">Android 4.4</span> introduces <strong>new |
| 429 | semantics</strong> for receiving messages and writing to the provider. When a |
| 430 | message is received, the system routes it directly to the user's default |
| 431 | messaging app using the new <span style= |
| 432 | "font-size:11.5px;">SMS_DELIVER</span> intent. Other apps can still listen |
| 433 | for incoming messages using the <span style= |
| 434 | "font-size:11.5px;">SMS_RECEIVED</span> intent. Also, the system now allows |
| 435 | only the default app to write message data to the provider, although other |
| 436 | apps can read at any time. Apps that are not the user's default can still |
| 437 | send messages — the system handles writing those messages to the |
| 438 | provider on behalf of the app, so that users can see them in the default app. |
| 439 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 440 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 441 | <p> |
| 442 | The new provider and semantics help to improve the user's experience when |
| 443 | multiple messaging apps are installed, and they help you to build new |
| 444 | messaging features with fully-supported, forward-compatible APIs. |
| 445 | </p> |
| 446 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 447 | |
| 448 | <h2 id="44-beautiful-apps">New ways to build beautiful apps</h2> |
| 449 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 450 | <div style="float:right;margin:14px 0px 0px 24px;width:246px;"> |
| 451 | <img src="{@docRoot}images/kk-immersive-n5.jpg" alt="" width="240" style= |
| 452 | "margin-bottom:0;"> |
| 453 | <p class="img-caption" style= |
| 454 | "padding-top:1.5em;margin-left:6px;line-height:1.25em;"> |
| 455 | A new <strong>immersive mode</strong> lets apps use every pixel on the |
| 456 | screen to show content and capture touch events. |
| 457 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 458 | </div> |
| 459 | |
| 460 | <h4 id="44-immersive">Full-screen Immersive mode</h4> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 461 | <p> |
| 462 | Now your apps can use <strong>every pixel on the device screen</strong> to |
| 463 | showcase your content and capture touch events. <span style= |
| 464 | "white-space:nowrap;">Android 4.4</span> adds a new full-screen immersive |
| 465 | mode that lets you create full-bleed UIs reaching from edge to edge on phones |
| 466 | and tablets, <strong>hiding all system UI</strong> such as the status bar and |
| 467 | navigation bar. It's ideal for rich visual content such as photos, videos, |
| 468 | maps, books, and games. |
| 469 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 470 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 471 | <p> |
| 472 | In the new mode, the system UI stays hidden, even while users are interacting |
| 473 | with your app or game — you can capture touch events from anywhere |
| 474 | across the screen, even areas that would otherwise be occupied by the system |
| 475 | bars. This gives you a great way to create a larger, richer, more immersive |
| 476 | UI in your app or game and also reduce visual distraction. |
| 477 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 478 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 479 | <p> |
| 480 | To make sure that users always have easy, consistent access to system UI from |
| 481 | full-screen immersive mode, <span style="white-space:nowrap;">Android |
| 482 | 4.4</span> supports a new gesture — in immersive mode, an edge swipe |
| 483 | from the top or bottom of the screen now reveals the system UI. |
| 484 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 485 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 486 | <p> |
| 487 | To return to immersive mode, users can touch the screen outside of the bar |
| 488 | bounds or wait for a short period for the bars to auto-hide. For a consistent |
| 489 | user experience, the new gesture also works with previous methods of hiding |
| 490 | the status bar. |
| 491 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 492 | |
| 493 | <h4 id="44-transitions">Transitions framework for animating scenes</h4> |
| 494 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 495 | <p> |
| 496 | Most apps structure their flows around several key UI states that expose |
| 497 | different actions. Many apps also use animation to help users understand |
| 498 | their progress through those states and the actions available in each. To |
| 499 | make it easier to create <strong>high-quality animations</strong> in your |
| 500 | app, <span style="white-space:nowrap;">Android 4.4</span> introduces a new |
| 501 | transitions framework. |
| 502 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 503 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 504 | <p> |
| 505 | The transitions framework lets you define <strong>scenes</strong>, typically |
| 506 | view hierarchies, and transitions, which describe how to animate or transform |
| 507 | the scenes when the user enters or exits them. You can use several predefined |
| 508 | transition types to animate your scenes based on specific properties, such as |
| 509 | layout bounds, or visibility. There's also an auto-transition type that |
| 510 | automatically fades, moves, and resizes views during a scene change. In |
| 511 | addition, you can define custom transitions that animate the properties that |
| 512 | matter most to your app, and you can plug in your own animation styles if |
| 513 | needed. |
| 514 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 515 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 516 | <p> |
| 517 | With the transitions framework you can also <strong>animate changes to your |
| 518 | UI on the fly</strong>, without needing to define scenes. For example, you |
| 519 | can make a series of changes to a view hierarchy and then have the |
| 520 | TransitionManager automatically run a delayed transition on those changes. |
| 521 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 522 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 523 | <p> |
| 524 | Once you've set up transitions, it's straightforward to invoke them from your |
| 525 | app. For example, you can call a single method to begin a transition, make |
| 526 | various changes in your view hierarchy, and on the next frame animations will |
| 527 | automatically begin that animate the changes you specified. |
| 528 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 529 | |
| 530 | <div style="float:right;margin:0px 0px 22px 32px;width:340px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 531 | <img src="{@docRoot}images/kk-home.jpg" alt="translucent system UI" widtdh="340" |
| 532 | style="margin-bottom:0"> |
| 533 | <p class="img-caption" style= |
| 534 | "padding-top:1.5em;line-height:1.25em;margin-bottom:0;"> |
| 535 | Apps can use new window styles to request translucent system bars. |
| 536 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 537 | </div> |
| 538 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 539 | <p> |
| 540 | For custom control over the transitions that run between specific scenes in |
| 541 | your application flow, you can use the TransitionManager. The |
| 542 | TransitionManager lets you define the relationship between scenes and the |
| 543 | transitions that run for specific scene changes. |
| 544 | </p> |
| 545 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 546 | <h4 id="44-translucent-system-ui">Translucent system UI styling</h4> |
| 547 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 548 | <p> |
| 549 | To get the most impact out of your content, you can now use new window styles |
| 550 | and themes to request <strong>translucent system UI</strong>, including both |
| 551 | the status bar and navigation bar. To ensure the legibility of navigation bar |
| 552 | buttons or status bar information, subtle gradients is shown behind the |
| 553 | system bars. A typical use-case would be an app that needs to show through to |
| 554 | a wallpaper. |
| 555 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 556 | |
| 557 | <h4 id="44-notification-access">Enhanced notification access</h4> |
| 558 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 559 | <p> |
| 560 | Notification listener services can now see <strong>more information about |
| 561 | incoming notifications</strong> that were constructed using the notification |
| 562 | builder APIs. Listener services can access a notification's actions as well |
| 563 | as new extras fields — text, icon, picture, progress, chronometer, and |
| 564 | many others — to extract cleaner information about the notification and |
| 565 | present the information in a different way. |
| 566 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 567 | |
| 568 | <div style="float:left;margin:1em 2em 1em 2em;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 569 | <a href=""><img src="{@docRoot}images/kk-chromium-icon.png" alt="" height="160" style= |
| 570 | "margin-bottom:0em;"></a> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 571 | </div> |
| 572 | |
| 573 | <h4 id="44-webview">Chromium WebView</h4> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 574 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 575 | <p> |
| 576 | <span style="white-space:nowrap;">Android 4.4</span> includes a completely |
| 577 | new implementation of WebView that's based on <a href= |
| 578 | "http://www.chromium.org/Home" class="external-link">Chromium</a>. The new |
| 579 | Chromium WebView gives you the latest in standards support, performance, and |
| 580 | compatibility to build and display your web-based content. |
| 581 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 582 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 583 | <p> |
| 584 | Chromium WebView provides broad support for HTML5, CSS3, and JavaScript. It |
| 585 | supports most of the HTML5 features available in Chrome for Android 30. It |
| 586 | also brings an updated version of the JavaScript Engine (V8) that delivers |
| 587 | dramatically improved JavaScript performance. |
| 588 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 589 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 590 | <p stydle="clear:both;"> |
| 591 | In addition, the new Chromium WebView supports remote debugging using |
| 592 | <a class="external-link" href= |
Dirk Dougherty | f385d2f | 2013-11-01 10:51:59 -0700 | [diff] [blame] | 593 | "https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 594 | Chrome DevTools</a>. For example, you can use Chrome DevTools on your |
| 595 | development machine to inspect, debug, and analyze your WebView content live |
| 596 | on a mobile device. |
| 597 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 598 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 599 | <p> |
| 600 | The new Chromium WebView is included on all compatible devices running |
| 601 | <span style="white-space:nowrap;">Android 4.4</span> and higher. You can take |
| 602 | advantage of the new WebView right away, and with minimum modifications to |
| 603 | existing apps and content. In most cases, your content will migrate to the |
| 604 | new implementation seamlessly. |
| 605 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 606 | |
| 607 | |
| 608 | <h2 id="44-media">New media capabilities</h2> |
| 609 | |
| 610 | <h4 id="44-screen-recording">Screen recording</h4> |
| 611 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 612 | <p> |
| 613 | Now it's easy to create high-quality video of your app, directly from your |
| 614 | Android device. <span style="white-space:nowrap;">Android 4.4</span> adds |
| 615 | support for screen recording and provides a <strong>screen recording |
Dirk Dougherty | 9a52d65 | 2013-11-04 10:15:46 -0800 | [diff] [blame] | 616 | utility</strong> that lets you start and stop recording on a device that's |
| 617 | connected to your Android SDK environment over USB. It's a great new way to |
| 618 | create walkthroughs and tutorials for your app, testing materials, marketing |
| 619 | videos, and more. |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 620 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 621 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 622 | <p> |
Dirk Dougherty | 9a52d65 | 2013-11-04 10:15:46 -0800 | [diff] [blame] | 623 | With the screen recording utility, you can capture video of your device screen |
| 624 | contents and store the video as an MP4 file on the device. You can record at any |
| 625 | device-supported resolution and bitrate you want, and the output retains the |
| 626 | aspect ratio of the display. By default, the utility selects a resolution |
| 627 | equal or close to the device's display resolution in the current orientation. |
| 628 | When you are done recording, you can share the video directly from your |
| 629 | device or pull the MP4 file to your host computer for post-production. |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 630 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 631 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 632 | <p> |
| 633 | If your app plays video or other protected content that you don’t want to be |
| 634 | captured by the screen recorder, you can use <span style= |
| 635 | "font-size:11.5px;font-family:monospace;white-space:nowrap;">SurfaceView.setSecure()</span> |
| 636 | to mark the content as secure. |
| 637 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 638 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 639 | <p> |
| 640 | You can access screen recording through the adb tool included in the Android |
| 641 | SDK, using the command <span style= |
| 642 | "font-size:11.5px;font-family:monospace;white-space:nowrap;">adb shell |
| 643 | screenrecord</span>. You can also launch it through the DDMS panel in Android |
| 644 | Studio. |
| 645 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 646 | |
| 647 | <h4 id="44-adaptive-playback">Resolution switching through adaptive playback</h4> |
| 648 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 649 | <p> |
| 650 | <span style="white-space:nowrap;">Android 4.4</span> brings formal support |
| 651 | for adaptive playback into the Android media framework. Adaptive playback is |
| 652 | an optional feature of video decoders for MPEG-DASH and other formats that |
| 653 | enables <strong>seamless change in resolution during playback</strong>. The |
| 654 | client can start to feed the decoder input video frames of a new resolution |
| 655 | and the resolution of the output buffers change automatically, and without a |
| 656 | significant gap. |
| 657 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 658 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 659 | <p> |
| 660 | Resolution switching in <span style="white-space:nowrap;">Android 4.4</span> |
| 661 | lets media apps offer a significantly better streaming video experience. Apps |
| 662 | can check for adaptive playback support at runtime using existing APIs and |
| 663 | implement resolution-switching using new APIs introduced in <span style= |
| 664 | "white-space:nowrap;">Android 4.4</span>. |
| 665 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 666 | |
| 667 | <h4 id="44-cenc">Common Encryption for DASH</h4> |
| 668 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 669 | <p> |
| 670 | Android now supports the <strong>Common Encryption (CENC)</strong> for |
| 671 | MPEG-DASH, providing a standard, multiplatform DRM scheme for managing |
| 672 | protecting content. Apps can take advantage of CENC through Android's modular |
| 673 | DRM framework and platform APIs for supporting DASH. |
| 674 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 675 | |
| 676 | <h4 id="44-hls">HTTP Live Streaming</h4> |
| 677 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 678 | <p> |
| 679 | <span style="white-space:nowrap;">Android 4.4</span> updates the platform's |
| 680 | HTTP Live Streaming (HLS) support to a superset of version 7 of the HLS |
| 681 | specification (version 4 of the protocol). See the <a href= |
| 682 | "http://tools.ietf.org/html/draft-pantos-http-live-streaming-07" class= |
| 683 | "external-link">IETF draft</a> for details. |
| 684 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 685 | <h4 id="44-audio-tunneling">Audio Tunneling to DSP</h4> |
| 686 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 687 | <p> |
| 688 | For high-performance, lower-power audio playback, <span style= |
| 689 | "white-space:nowrap;">Android 4.4</span> adds platform support for |
| 690 | audio tunneling to a digital signal processor (DSP) in the |
| 691 | device chipset. With tunneling, audio decoding and output effects are |
| 692 | off-loaded to the DSP, waking the application processor less often and using |
| 693 | less battery. |
| 694 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 695 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 696 | <p> |
| 697 | Audio tunneling can <strong>dramatically improve battery life</strong> for |
| 698 | use-cases such as listening to music over a headset with the screen off. For |
| 699 | example, with audio tunneling, Nexus 5 offers a total off-network audio |
| 700 | playback time of up to 60 hours, an increase of over 50% over non-tunneled |
| 701 | audio. |
| 702 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 703 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 704 | <p> |
| 705 | Media applications can take advantage of audio tunneling on supported devices |
| 706 | without needing to modify code. The system applies tunneling to optimize |
| 707 | audio playback whenever it's available on the device. |
| 708 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 709 | |
| 710 | <div style="float:right;padding-top:1em;width:372px;margin-left:2em;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 711 | <img src="{@docRoot}images/kk-loudnessEnhancerAnnotated.png" alt= |
| 712 | "Visualizer showing loudness enhancer audio effect" width="360" height="252" |
| 713 | style="border:1px solid #ddd;border-radius: 6px;"> |
| 714 | <p class="img-caption" style="margin-left:6px;line-height:1.25em;"> |
| 715 | Visualization of how the LoudnessEnhancer effect can make speech content |
| 716 | more audible. |
| 717 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 718 | </div> |
| 719 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 720 | <p> |
| 721 | Audio tunneling requires support in the device hardware. Currently audio |
| 722 | tunneling is available on Nexus 5 and we're working with our chipset partners |
| 723 | to make it available on more devices as soon as possible. |
| 724 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 725 | |
| 726 | <h4 id="44-audio-monitoring">Audio monitoring</h4> |
| 727 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 728 | <p> |
| 729 | Apps can use new monitoring tools in the Visualizer effect to get updates on |
| 730 | the <strong>peak and RMS levels</strong> of any currently playing audio on |
| 731 | the device. For example, you could use this creatively in music visualizers |
| 732 | or to implement playback metering in a media player. |
| 733 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 734 | |
| 735 | <h4 id="44-loudness">Loudness enhancer</h4> |
| 736 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 737 | <p> |
| 738 | Media playback applications can <strong>increase the loudness of spoken |
| 739 | content</strong> by using the new LoudnessEnhancer effect, which acts as |
| 740 | compressor with time constants that are specifically tuned for speech. |
| 741 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 742 | |
| 743 | <h4 id="44-audio-timestamps">Audio timestamps for improved AV sync</h4> |
| 744 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 745 | <p> |
| 746 | The audio framework can now report <strong>presentation timestamps</strong> |
| 747 | from the audio output HAL to applications, for better audio-video |
| 748 | synchronization. Audio timestamps let your app determine when a specific |
| 749 | audio frame will be (or was) presented off-device to the user; you can use |
| 750 | the timestamp information to more accurately synchronize audio with video |
| 751 | frames. |
| 752 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 753 | |
| 754 | <h4 id="44-miracast">Wi-Fi CERTIFIED Miracastâ„¢</h4> |
| 755 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 756 | <p> |
| 757 | <span style="white-space:nowrap;">Android 4.4</span> devices can now be |
| 758 | certified to the Wi-Fi Alliance Wi-Fi Display Specification as Miracast |
| 759 | compatible. To help with testing, a new Wireless Display developer option |
| 760 | exposes advanced configuration controls and settings for Wireless Display |
| 761 | certification. You can access the option at <strong>Settings > Developer |
| 762 | options > Wireless display certification</strong>. Nexus 5 is a Miracast |
| 763 | certified wireless display device. |
| 764 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 765 | |
| 766 | <h2 id="44-renderscript">RenderScript Compute</h2> |
| 767 | |
| 768 | <div style="float:right;padding-top:1em;width:372px;margin-left:2em;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 769 | <img src="{@docRoot}images/kk-rs-chart-versions.png" alt= |
| 770 | "Renderscipt optimizations chart" width="360" height="252" style= |
| 771 | "border:1px solid #ddd;border-radius: 6px;"> |
| 772 | <p class="img-caption" style="margin-left:6px;line-height:1.25em;"> |
| 773 | Performance benchmarks for Android 4.4 relative to Android 4.3, |
| 774 | run on the same devices (Nexus 7, Nexus 10). |
| 775 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 776 | </div> |
| 777 | |
| 778 | <h4>Ongoing performance improvements</strong></h4> |
| 779 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 780 | <p> |
| 781 | When your apps use RenderScript, they'll benefit from <strong>ongoing |
| 782 | performance tuning</strong> in the RenderScript runtime itself, without the |
| 783 | need for recompilation. The chart at right shows performance gains in Android |
| 784 | 4.4 on two popular chipsets. |
| 785 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 786 | |
| 787 | <h4>GPU acceleration</h4> |
| 788 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 789 | <p> |
| 790 | Any app using RenderScript on a supported device benefits from GPU |
| 791 | acceleration, without code changes or recompiling. Since the Nexus 10 first |
| 792 | debuted RenderScript GPU acceleration, various other hardware partners have |
| 793 | added support. |
| 794 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 795 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 796 | <p> |
| 797 | Now with <span style="white-space:nowrap;">Android 4.4</span>, GPU |
| 798 | acceleration is available on the Nexus 5, as well as the Nexus 4, Nexus 7 |
| 799 | (2013), and Nexus 10, and we're working with our partners to bring it to more |
| 800 | devices as soon as possible. |
| 801 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 802 | |
| 803 | <h4 id="44-renderscript-ndk">RenderScript in the Android NDK</h4> |
| 804 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 805 | <p> |
| 806 | Now you can take advantage of RenderScript <strong>directly from your native |
| 807 | code</strong>. A new C++ API in the Android Native Development Kit (NDK) lets |
| 808 | you access the same RenderScript functionality available through the |
| 809 | framework APIs, including script intrinsics, custom kernels, and more. |
| 810 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 811 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 812 | <p> |
| 813 | If you have large, performance-intensive tasks to handle in native code, you |
| 814 | can perform those tasks using RenderScript and integrate them with your |
| 815 | native code. RenderScript offers great performance across a wide range of |
| 816 | devices, with automatic support for multi-core CPUs, GPUs, and other |
| 817 | processors. |
| 818 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 819 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 820 | <p> |
| 821 | When you build an app that uses the RenderScript through the NDK, you can |
| 822 | distribute it to any device running Android 2.2 or or higher, just like with |
| 823 | the RenderScript support library available for framework APIs. |
| 824 | </p> |
| 825 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 826 | |
| 827 | <h2 id="44-graphics">Graphics</h2> |
| 828 | |
| 829 | <h4 id="44-surfaceflinger">GLES2.0 SurfaceFlinger</h4> |
| 830 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 831 | <p> |
| 832 | <span style="white-space:nowrap;">Android 4.4</span> upgrades its |
Dirk Dougherty | 9399d91 | 2013-11-04 17:03:45 -0800 | [diff] [blame] | 833 | SurfaceFlinger from OpenGL ES 1.0 to OpenGL ES 2.0. |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 834 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 835 | |
| 836 | <h4 id="44-composer">New Hardware Composer support for virtual displays</h4> |
| 837 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 838 | <p> |
| 839 | The latest version of Android Hardware Composer, HWComposer 1.3, supports |
| 840 | hardware composition of one virtual display in addition to the primary, |
| 841 | external (e.g. HDMI) display, and has improved OpenGL ES interoperability. |
| 842 | </p> |
| 843 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 844 | |
| 845 | <h2 id="44-connectivity">New Types of Connectivity</h2> |
| 846 | |
| 847 | <h4 id="44-bluetooth">New Bluetooth profiles</h4> |
| 848 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 849 | <p> |
| 850 | <span style="white-space:nowrap;">Android 4.4</span> support for two new |
| 851 | Bluetooth profiles to let apps support a broader range of low-power and media |
| 852 | interactions. <strong>Bluetooth HID over GATT</strong> (HOGP) gives apps a |
| 853 | low-latency link with low-power peripheral devices such as mice, joysticks, |
| 854 | and keyboards. <strong>Bluetooth MAP</strong> lets your apps exchange |
| 855 | messages with a nearby device, for example an automotive terminal for |
| 856 | handsfree use or another mobile device. As an <strong>extension to Bluetooth |
| 857 | AVRCP 1.3</strong>, users can now set absolute volume on the system from |
| 858 | their Bluetooth devices. |
| 859 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 860 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 861 | <p> |
| 862 | Platform support for HOGP, MAP, and AVRCP is built on the Bluedroid Bluetooth |
| 863 | stack introduced by Google and Broadcom in Android 4.2. Support is available |
| 864 | right away on Nexus devices and other Android-compatible devices that offer |
| 865 | compatible Bluetooth capabilities. |
| 866 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 867 | |
| 868 | <h4 id="44-ir-blasters">IR Blasters</h4> |
| 869 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 870 | <p> |
| 871 | <span style="white-space:nowrap;">Android 4.4</span> introduces platform |
| 872 | support for built-in <strong>IR blasters</strong>, along with a new API and |
| 873 | system service that let you create apps to take advantage them. |
| 874 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 875 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 876 | <p> |
| 877 | Using the new API, you can build apps that let users remotely control nearby |
| 878 | TVs, tuners, switches, and other electronic devices. The API lets your app |
| 879 | check whether the phone or tablet has an infrared emitter, query it's carrier |
| 880 | frequencies, and then send infrared signals. |
| 881 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 882 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 883 | <p> |
| 884 | Because the API is standard across Android devices running <span style= |
| 885 | "white-space:nowrap;">Android 4.4</span> or higher, your app can support the |
| 886 | broadest possible range of vendors without writing custom integration code. |
| 887 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 888 | |
| 889 | <h4 id="44-wifi-tdls">Wi-Fi TDLS support</h4> |
| 890 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 891 | <p> |
| 892 | <span style="white-space:nowrap;">Android 4.4</span> introduces a seamless |
| 893 | way to stream media and other data faster between devices already on the same |
| 894 | Wi-Fi network by supporting Wi-Fi Tunneled Direct Link Setup (TDLS). |
| 895 | </p> |
| 896 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 897 | |
| 898 | <h2 id="44-accessibility">Accessibility</h2> |
| 899 | |
| 900 | <h4 id="44-closed-captioning">System-wide settings for closed captioning</h4> |
| 901 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 902 | <p> |
| 903 | <span style="white-space:nowrap;">Android 4.4</span> now supports a better |
| 904 | accessibility experience across apps by adding system-wide preferences for |
| 905 | Closed Captioning. Users can go to <strong>Settings</strong> > |
| 906 | <strong>Accessibility</strong> > <strong>Captions</strong> to set global |
| 907 | captioning preferences, such as whether to show captions and what language, |
| 908 | text size, and text style to use. |
| 909 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 910 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 911 | <p> |
| 912 | Apps that use video can now access the user's captioning settings and |
| 913 | <strong>adjust presentation to meet the user's preferences</strong>. A new |
| 914 | captioning manager API lets you check and monitor the user's captioning |
| 915 | preferences. The captioning manager provides you with the user's preferred |
| 916 | captioning state as well as preferred locale, scaling factor, and text style. |
| 917 | The text style includes foreground and background colors, edge properties, |
| 918 | and typeface. |
| 919 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 920 | |
| 921 | <div style="float:right;margin:22px 0px 0px 24px;width:490px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 922 | <img src="{@docRoot}images/kk-captions-n5.jpg" alt="" width="471" style= |
| 923 | "margin-bottom:0;"> |
| 924 | <p class="img-caption" style= |
| 925 | "padding-top:1.5em;margin-left:6px;line-height:1.25em;width:480px;"> |
| 926 | Apps can now refer to the user's <strong>system-wide captions |
| 927 | preferences</strong>. An example of the expected display style is shown |
| 928 | right in the settings. |
| 929 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 930 | </div> |
| 931 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 932 | <p> |
| 933 | In addition, apps that use <strong>VideoView</strong> can use a new API to |
| 934 | pass a captioning stream along with a video stream for rendering. The system |
| 935 | automatically handles the display of the captions on video frames according |
| 936 | to the user's systemwide settings. Currently, VideoView supports auto-display |
| 937 | of captions in WebVTT format only. |
| 938 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 939 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 940 | <p> |
| 941 | <strong>All apps that show captions</strong> should make sure to check the |
| 942 | user's systemwide captioning preferences and render captions as closely as |
| 943 | possible to those preferences. For more insight into how specific |
| 944 | combinations of settings should look, you can look at a preview of captions |
| 945 | in different languages, sizes, and styles right in the Settings app. |
| 946 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 947 | |
| 948 | <h4 id="44-enhanced-apis">Enhanced Accessibility APIs</h4> |
| 949 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 950 | <p> |
| 951 | <span style="white-space:nowrap;">Android 4.4</span> extends the |
| 952 | accessibility APIs to support <strong>more precise structural and semantic |
| 953 | description</strong> and observation of onscreen elements. With the new APIs, |
| 954 | developers can improve the quality of accessible feedback by providing |
| 955 | accessibility services with more information about on-screen elements. |
| 956 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 957 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 958 | <p> |
| 959 | In accessibility nodes, developers can now determine whether a node is a |
| 960 | popup, get its input type, and more. You can also use new APIs to work with |
| 961 | nodes that contain grid-like information, such as lists and tables. For |
| 962 | example, you can now specify new supported actions, collection information, |
| 963 | live region modes, and more. |
| 964 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 965 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 966 | <p> |
| 967 | New accessibility events let developers more closely follow the changes that |
| 968 | are taking place in window content, and they can now listen for changes in |
| 969 | the touch exploration mode on the device. |
| 970 | </p> |
| 971 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 972 | |
| 973 | <h2 id="44-international-users">Support for international Users</h2> |
| 974 | |
| 975 | <h4 id="44-drawable-mirroring">Drawable mirroring for RTL locales</h4> |
| 976 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 977 | <p> |
| 978 | If your app is targeting users who use RTL scripts, you can use a new API to |
| 979 | declare that a <strong>drawable should be auto-mirrored</strong> when the |
| 980 | user's locale setting includes an RTL language. |
| 981 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 982 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 983 | <p> |
| 984 | Declaring a drawable as auto-mirrored helps you <strong>prevent duplication |
| 985 | of assets</strong> in your app and reduces the the size of your APK. When you |
| 986 | have drawables that are the reusable for both LTR and RTL presentations, you |
| 987 | can declare the default versions as auto-mirrored and then omit those |
| 988 | Drawables from your RTL resources. |
| 989 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 990 | |
| 991 | <div style="float:right;margin:16px 12px 0px 32px;width:260px;clear:both;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 992 | <img src="{@docRoot}images/kk-pseudolocale-rtl.png" alt="" width="260" style= |
| 993 | "margin-bottom:0;"> |
| 994 | <p class="img-caption" style="padding-top:1.5em;line-height:1.25em;"> |
Dirk Dougherty | a5f542a | 2013-11-05 11:00:58 -0800 | [diff] [blame] | 995 | The <strong>Force RTL layout</strong> option makes it easier to test your app's localization. |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 996 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 997 | </div> |
| 998 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 999 | <p> |
| 1000 | You can declare various types of drawables as auto-mirrored in your |
| 1001 | application code, such as bitmap, nine-patch, layer, state list, and other |
| 1002 | drawables. You can also declare a drawable as auto-mirrored in your resource |
| 1003 | files by using a new attribute. |
| 1004 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1005 | |
Dirk Dougherty | a5f542a | 2013-11-05 11:00:58 -0800 | [diff] [blame] | 1006 | <h4 id="44-pseudolocale-rtl">Force RTL Layout</h4> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1007 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1008 | <p> |
Dirk Dougherty | 2705c8b | 2013-11-10 18:07:24 -0800 | [diff] [blame] | 1009 | To make it easier to test and debug layout mirroring issues without switching |
| 1010 | to an RTL language, Android includes a new developer option to force RTL layout |
| 1011 | direction in all apps. |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1012 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1013 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1014 | <p> |
Dirk Dougherty | a5f542a | 2013-11-05 11:00:58 -0800 | [diff] [blame] | 1015 | The Force RTL layout option switches the device to RTL layout for all locales and |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1016 | displays text in your current language. This can help you find layout issues |
| 1017 | across your app, without having to display the app in an RTL language. You |
Dirk Dougherty | 347b6fc | 2013-11-07 09:22:52 -0800 | [diff] [blame] | 1018 | can access the option in <strong>Settings > Developer |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1019 | options > Force RTL layout direction</strong>. |
| 1020 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1021 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1022 | |
| 1023 | <h2 id="44-security">Security enhancements</h2> |
| 1024 | |
| 1025 | <h4 id="44-selinux">SELinux (enforcing mode)</h4> |
| 1026 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1027 | <p> |
| 1028 | <span style="white-space:nowrap;">Android 4.4</span> updates its SELinux |
| 1029 | configuration from "permissive" to "enforcing." This means potential policy |
| 1030 | violations within a SELinux domain that has an enforcing policy will be |
| 1031 | blocked. |
| 1032 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1033 | |
| 1034 | <h4 id="44-crytpo">Improved cryptographic algorithms</h4> |
| 1035 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1036 | <p> |
| 1037 | Android has improved its security further by adding support for two more |
| 1038 | cryptographic algorithms. Elliptic Curve Digital Signature Algorithm (ECDSA) |
| 1039 | support has been added to the keystore provider improving security of digital |
| 1040 | signing, applicable to scenarios such as signing of an application or a data |
| 1041 | connection. The Scrypt key derivation function is implemented to protect the |
| 1042 | cryptographic keys used for full-disk encryption. |
| 1043 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1044 | |
| 1045 | <h4 id="44-other">Other enhancements</h4> |
| 1046 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1047 | <p> |
| 1048 | On multiuser devices, VPNs are now applied per user. This can allow a user to |
| 1049 | route all network traffic through a VPN without affecting other users on the |
| 1050 | device. Also, Android now supports FORTIFY_SOURCE level 2, and all code is |
| 1051 | compiled with those protections. FORTIFY_SOURCE has been enhanced to work |
| 1052 | with clang. |
| 1053 | </p> |
| 1054 | |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1055 | |
| 1056 | <h2 id="44-tools">Tools for analyzing memory use</h2> |
| 1057 | |
| 1058 | <h4 id="44-procstats">Procstats</h4> |
| 1059 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1060 | <p> |
| 1061 | A new tool called <strong>procstats</strong> helps you analyze the memory |
| 1062 | resources your app uses, as well as the resources used by other apps and |
| 1063 | services running on the system. |
| 1064 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1065 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1066 | <p> |
| 1067 | Procstats keeps track of <strong>how apps are running over time</strong>, |
| 1068 | providing data about their execution durations and memory use to help |
| 1069 | determine how efficiently they are performing. This is most important for |
| 1070 | apps that start services that run in the background, since it lets you |
| 1071 | monitor how long they are running and how much RAM they are using while doing |
| 1072 | so. Procstats will also collect data for foreground applications about memory |
| 1073 | use over time to determine the overall memory profile of the app. |
| 1074 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1075 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1076 | <p> |
| 1077 | Procstats can help you identify background services started by your app. You |
| 1078 | can keep track of how long those services continue running and how much RAM |
| 1079 | they use while doing so. Procstats also lets you profile your app while it's |
| 1080 | in the foreground, using its memory use over time to determine its overall |
| 1081 | memory profile. |
| 1082 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1083 | |
| 1084 | <div style="margin:2em 0em;width:780px;"> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1085 | <div style="float:left;width:390px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1086 | <img src="{@docRoot}images/kk-procstats.png" alt="" width="360" style= |
| 1087 | "margin-bottom:0;box-shadow: 3px 10px 18px 1px #eee;border:1px solid #ddd;border-radius: 6px;"> |
| 1088 | <p class="img-caption" style= |
| 1089 | "padding-top:1.5em;line-height:1.25em;width:360px;"> |
| 1090 | The new <strong>procstats</strong> tool lets you check the memory use of |
| 1091 | apps and services over time. |
| 1092 | </p> |
| 1093 | </div> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1094 | |
| 1095 | <div style="float:right;width:390px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1096 | <img src="{@docRoot}images/kk-meminfo.png" alt="" width="360" style= |
| 1097 | "margin-bottom:0;box-shadow: 3px 10px 12px 1px #eee;border:1px solid #ddd;border-radius: 6px;"> |
| 1098 | <p class="img-caption" style= |
| 1099 | "padding-top:1.5em;line-height:1.25em;width:360px;"> |
| 1100 | The enhanced <strong>meminfo</strong> tool lets you see details of memory |
| 1101 | use for an app. |
| 1102 | </p> |
| 1103 | </div> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1104 | </div> |
| 1105 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1106 | <p style="clear:both;"> |
| 1107 | You can access procstats from the adb tool included in the Android SDK, |
| 1108 | <span style="font-size:11.5px;font-family:monospace;white-space:nowrap;">adb |
| 1109 | shell dumpsys procstats</span>. Also, for on-device profiling, see the |
| 1110 | Process Stats developer option, below. |
| 1111 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1112 | |
| 1113 | |
| 1114 | <h4 id="44-procstats-ondevice" style="clear:both">On-device memory status and profiling</h4> |
| 1115 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1116 | <p> |
| 1117 | <span style="white-space:nowrap;">Android 4.4</span> includes a new developer |
| 1118 | option to make it easier to analyze your app's memory profile while it's |
| 1119 | running on any device or emulator. It's especially useful to get a view of |
| 1120 | how your app uses memory and performs on devices with low RAM. You can access |
| 1121 | the option at <strong>Settings > Developer options > Process |
| 1122 | stats</strong> |
| 1123 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1124 | |
| 1125 | <div style="float:right;margin:22px 0px 0px 24px;width:490px;"> |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1126 | <img src="{@docRoot}images/kk-proc-device-overview-n5.jpg" alt="" width="240" style= |
| 1127 | "margin-bottom:0;"> <img src="{@docRoot}images/kk-proc-device-detail-n5.jpg" alt="" |
| 1128 | width="240" style="margin-bottom:0;padding-left:6px;"> |
| 1129 | <p class="img-caption" style= |
| 1130 | "padding-top:1.5em;margin-left:6px;line-height:1.25em;width:480px;"> |
| 1131 | <strong>Process stats</strong> is a convenient way to check your app's |
| 1132 | memory use. You can see how your app compares to other apps and zoom in on |
| 1133 | specific data about your app or it's background services. |
| 1134 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1135 | </div> |
| 1136 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1137 | <p> |
| 1138 | The <strong>Process Stats</strong> option shows you a variety of high-level |
| 1139 | metrics on your app's memory use, based on data collected using the new |
| 1140 | procstats service. On the main screen you can see a summary of system memory |
| 1141 | status. Green indicates relative amount of time spent with low RAM usage, |
| 1142 | yellow indicates moderate RAM usage, and red indicates high (critical) RAM |
| 1143 | usage |
| 1144 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1145 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1146 | <p> |
| 1147 | Below the summary is a list summarizing each app's <strong>memory load on the |
| 1148 | system</strong>. For each app, a blue bar indicates the relative computed |
| 1149 | memory load (runtime x avg_pss) of its process, and a percentage number |
| 1150 | indicates the relative amount of time spent in the background. You can filter |
| 1151 | the list to show only foreground, background, or cached processes, and you |
| 1152 | can include or exclude system processes. You can also change the duration of |
| 1153 | the data collected to 3, 6, 12, or 24 hours, and you can include or exclude |
| 1154 | uss memory. |
| 1155 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1156 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1157 | <p> |
| 1158 | To take a closer look at a specific app's memory usage in isolation, tap the |
| 1159 | app. For each app, you can now see a summary of the memory consumed and the |
| 1160 | percentage of the collection interval that the app has been running. You can |
| 1161 | also see the average and maximum usage over the collection period, and below |
| 1162 | the app's services and the percentage of time they've been running. |
| 1163 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1164 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1165 | <p> |
| 1166 | Analyzing your app using the data in Process Stats can reveal issues and |
| 1167 | suggest possible optimizations for your app. For example, if your app is |
| 1168 | running longer than it should or using too much memory over a period of time, |
| 1169 | there could be bugs in your code that you can resolve to improve your app's |
| 1170 | performance, especially when running on a device with low RAM. |
| 1171 | </p> |
Dirk Dougherty | 790f918 | 2013-10-25 23:41:20 -0700 | [diff] [blame] | 1172 | |
Dirk Dougherty | b08447b | 2013-10-31 02:31:42 -0700 | [diff] [blame] | 1173 | </div><!-- END ANDROID 4.4 --> |