blob: 4237c9868a091e96643e0d8772ece27d44c7f695 [file] [log] [blame]
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001page.title=Android KitKat
Dirk Dougherty790f9182013-10-25 23:41:20 -07002
3@jd:body
4
5
6<style>
7</style>
8
9<script>
10function 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
44window.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 Dougherty56278b72013-12-04 13:43:48 -080057 <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 Dougherty790f9182013-10-25 23:41:20 -070059 </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 Dougherty790f9182013-10-25 23:41:20 -070086<p>Welcome to Android 4.4 KitKat!</p>
87
Dirk Doughertyb08447b2013-10-31 02:31:42 -070088<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 Dougherty790f9182013-10-25 23:41:20 -0700101
102
103<h2 id="svelte" style="line-height:1.25em;">Making Android for everyone</h2>
104
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700105<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 &mdash; including on millions of entry-level devices around the world that
109 have as little as <strong>512MB RAM</strong>.
110</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700111
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700112<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 Dougherty790f9182013-10-25 23:41:20 -0700117
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700118<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 Dougherty790f9182013-10-25 23:41:20 -0700127
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700128<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 &mdash; such as when network connectivity changes
134 &mdash; Android now <strong>launches the services serially</strong>, in small
135 groups, to avoid peak memory demands.
136</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700137
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700138<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 Dougherty9a52d652013-11-04 10:15:46 -0800146 optimizing your apps for low-memory devices <a
147 href="{@docRoot}training/articles/memory.html">here</a>.
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700148</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700149
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700150<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 Dougherty790f9182013-10-25 23:41:20 -0700159
Dirk Dougherty790f9182013-10-25 23:41:20 -0700160
161<h2 id="44-hce">New NFC capabilities through Host Card Emulation</h2>
162
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700163<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 &mdash; 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 Dougherty790f9182013-10-25 23:41:20 -0700174
175<div style="float:right;margin:32px;width:200px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700176 <img src="{@docRoot}images/kk-contactless-card.png" alt="" width="200" style=
177 "margin-bottom:0;">
Dirk Dougherty790f9182013-10-25 23:41:20 -0700178</div>
179
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700180<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 Dougherty790f9182013-10-25 23:41:20 -0700187
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700188<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 Dougherty790f9182013-10-25 23:41:20 -0700195
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700196<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 Dougherty790f9182013-10-25 23:41:20 -0700202
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700203<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 &amp; Pay for easy payments using HCE.
209</p>
210
Dirk Dougherty790f9182013-10-25 23:41:20 -0700211
212<h2 id="44-printing">Printing framework</h2>
213
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700214<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 Dougherty790f9182013-10-25 23:41:20 -0700220
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700221<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 Dougherty790f9182013-10-25 23:41:20 -0700231
232<div style="float:right;margin:22px 0px 0px 24px;width:490px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700233 <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 Dougherty790f9182013-10-25 23:41:20 -0700240</div>
241
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700242<p>
243 Printer manufacturers can use new APIs to develop their own <strong>print
244 services</strong> &mdash; 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 Dougherty790f9182013-10-25 23:41:20 -0700250
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700251<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 Dougherty790f9182013-10-25 23:41:20 -0700259
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700260<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 Dougherty790f9182013-10-25 23:41:20 -0700268
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700269<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 Dougherty790f9182013-10-25 23:41:20 -0700275
276<h2 id="44-storage-access">Storage access framework</h2>
277
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700278<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 Dougherty790f9182013-10-25 23:41:20 -0700285
286<div style="float:right;margin:22px 0px 0px 24px;width:490px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700287 <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 Dougherty790f9182013-10-25 23:41:20 -0700296</div>
297
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700298<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 &mdash; from text, photos, and
305 wallpapers to video, audio, and more.
306</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700307
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700308<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 Dougherty790f9182013-10-25 23:41:20 -0700316
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700317<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 &mdash; the system automatically displays the standard UI for browsing
323 documents, including all available document providers.
324</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700325
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700326<p>
327 You can integrate your client app one time, for all providers, without any
Dirk Dougherty790f9182013-10-25 23:41:20 -0700328 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 Doughertyb08447b2013-10-31 02:31:42 -0700330 updates needed in your code.
331</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700332
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 Doughertyb08447b2013-10-31 02:31:42 -0700342<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 Dougherty790f9182013-10-25 23:41:20 -0700347
348
349<h2 id="44-sensors">Low-power sensors</h2>
350
Dirk Dougherty790f9182013-10-25 23:41:20 -0700351<h4 id="44-sensor-batching">Sensor batching</h4>
352
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700353<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 Dougherty790f9182013-10-25 23:41:20 -0700358
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700359<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 Dougherty790f9182013-10-25 23:41:20 -0700368
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700369<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 &mdash; even while
373 the screen is off and the system is asleep.
374</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700375
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700376<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 Dougherty79fbed02013-10-31 09:49:00 -0700381<div style="float:right;margin:1em 0em 0em 3em;width:490px;clear:both">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700382 <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 Dougherty790f9182013-10-25 23:41:20 -0700390</div>
391
Dirk Dougherty790f9182013-10-25 23:41:20 -0700392<h4 id="44-step-detector">Step Detector and Step Counter</h4>
393
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700394<p>
395 <span style="white-space:nowrap;">Android 4.4</span> also adds platform
396 support for two new composite sensors &mdash; step detector
397 and step counter &mdash; 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 Dougherty790f9182013-10-25 23:41:20 -0700401
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700402<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 Dougherty790f9182013-10-25 23:41:20 -0700410
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700411<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 Dougherty790f9182013-10-25 23:41:20 -0700415
416
417<h2 id="44-sms-provider">SMS provider</h2>
418
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700419<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 Dougherty790f9182013-10-25 23:41:20 -0700425
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700426<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 &mdash; 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 Dougherty790f9182013-10-25 23:41:20 -0700440
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700441<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 Dougherty790f9182013-10-25 23:41:20 -0700447
448<h2 id="44-beautiful-apps">New ways to build beautiful apps</h2>
449
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700450<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 Dougherty790f9182013-10-25 23:41:20 -0700458</div>
459
460<h4 id="44-immersive">Full-screen Immersive mode</h4>
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700461<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 Dougherty790f9182013-10-25 23:41:20 -0700470
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700471<p>
472 In the new mode, the system UI stays hidden, even while users are interacting
473 with your app or game &mdash; 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 Dougherty790f9182013-10-25 23:41:20 -0700478
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700479<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 &mdash; in immersive mode, an edge swipe
483 from the top or bottom of the screen now reveals the system UI.
484</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700485
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700486<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 Dougherty790f9182013-10-25 23:41:20 -0700492
493<h4 id="44-transitions">Transitions framework for animating scenes</h4>
494
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700495<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 Dougherty790f9182013-10-25 23:41:20 -0700503
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700504<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 Dougherty790f9182013-10-25 23:41:20 -0700515
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700516<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 Dougherty790f9182013-10-25 23:41:20 -0700522
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700523<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 Dougherty790f9182013-10-25 23:41:20 -0700529
530<div style="float:right;margin:0px 0px 22px 32px;width:340px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700531 <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 Dougherty790f9182013-10-25 23:41:20 -0700537</div>
538
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700539<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 Dougherty790f9182013-10-25 23:41:20 -0700546<h4 id="44-translucent-system-ui">Translucent system UI styling</h4>
547
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700548<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 Dougherty790f9182013-10-25 23:41:20 -0700556
557<h4 id="44-notification-access">Enhanced notification access</h4>
558
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700559<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 &mdash; text, icon, picture, progress, chronometer, and
564 many others &mdash; to extract cleaner information about the notification and
565 present the information in a different way.
566</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700567
568<div style="float:left;margin:1em 2em 1em 2em;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700569 <a href=""><img src="{@docRoot}images/kk-chromium-icon.png" alt="" height="160" style=
570 "margin-bottom:0em;"></a>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700571</div>
572
573<h4 id="44-webview">Chromium WebView</h4>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700574
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700575<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 Dougherty790f9182013-10-25 23:41:20 -0700582
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700583<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 Dougherty790f9182013-10-25 23:41:20 -0700589
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700590<p stydle="clear:both;">
591 In addition, the new Chromium WebView supports remote debugging using
592 <a class="external-link" href=
Dirk Doughertyf385d2f2013-11-01 10:51:59 -0700593 "https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700594 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 Dougherty790f9182013-10-25 23:41:20 -0700598
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700599<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 Dougherty790f9182013-10-25 23:41:20 -0700606
607
608<h2 id="44-media">New media capabilities</h2>
609
610<h4 id="44-screen-recording">Screen recording</h4>
611
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700612<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 Dougherty9a52d652013-11-04 10:15:46 -0800616 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 Doughertyb08447b2013-10-31 02:31:42 -0700620</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700621
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700622<p>
Dirk Dougherty9a52d652013-11-04 10:15:46 -0800623 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 Doughertyb08447b2013-10-31 02:31:42 -0700630</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700631
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700632<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 Dougherty790f9182013-10-25 23:41:20 -0700638
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700639<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 Dougherty790f9182013-10-25 23:41:20 -0700646
647<h4 id="44-adaptive-playback">Resolution switching through adaptive playback</h4>
648
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700649<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 Dougherty790f9182013-10-25 23:41:20 -0700658
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700659<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 Dougherty790f9182013-10-25 23:41:20 -0700666
667<h4 id="44-cenc">Common Encryption for DASH</h4>
668
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700669<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 Dougherty790f9182013-10-25 23:41:20 -0700675
676<h4 id="44-hls">HTTP Live Streaming</h4>
677
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700678<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 Dougherty790f9182013-10-25 23:41:20 -0700685<h4 id="44-audio-tunneling">Audio Tunneling to DSP</h4>
686
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700687<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 Dougherty790f9182013-10-25 23:41:20 -0700695
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700696<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 Dougherty790f9182013-10-25 23:41:20 -0700703
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700704<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 Dougherty790f9182013-10-25 23:41:20 -0700709
710<div style="float:right;padding-top:1em;width:372px;margin-left:2em;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700711 <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 Dougherty790f9182013-10-25 23:41:20 -0700718</div>
719
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700720<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 Dougherty790f9182013-10-25 23:41:20 -0700725
726<h4 id="44-audio-monitoring">Audio monitoring</h4>
727
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700728<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 Dougherty790f9182013-10-25 23:41:20 -0700734
735<h4 id="44-loudness">Loudness enhancer</h4>
736
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700737<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 Dougherty790f9182013-10-25 23:41:20 -0700742
743<h4 id="44-audio-timestamps">Audio timestamps for improved AV sync</h4>
744
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700745<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 Dougherty790f9182013-10-25 23:41:20 -0700753
754<h4 id="44-miracast">Wi-Fi CERTIFIED Miracastâ„¢</h4>
755
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700756<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 &gt; Developer
762 options &gt; Wireless display certification</strong>. Nexus 5 is a Miracast
763 certified wireless display device.
764</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700765
766<h2 id="44-renderscript">RenderScript Compute</h2>
767
768<div style="float:right;padding-top:1em;width:372px;margin-left:2em;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700769 <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&nbsp;4.4 relative to Android&nbsp;4.3,
774 run on the same devices (Nexus 7, Nexus 10).
775 </p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700776</div>
777
778<h4>Ongoing performance improvements</strong></h4>
779
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700780<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 Dougherty790f9182013-10-25 23:41:20 -0700786
787<h4>GPU acceleration</h4>
788
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700789<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 Dougherty790f9182013-10-25 23:41:20 -0700795
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700796<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 Dougherty790f9182013-10-25 23:41:20 -0700802
803<h4 id="44-renderscript-ndk">RenderScript in the Android NDK</h4>
804
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700805<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 Dougherty790f9182013-10-25 23:41:20 -0700811
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700812<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 Dougherty790f9182013-10-25 23:41:20 -0700819
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700820<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 Dougherty790f9182013-10-25 23:41:20 -0700826
827<h2 id="44-graphics">Graphics</h2>
828
829<h4 id="44-surfaceflinger">GLES2.0 SurfaceFlinger</h4>
830
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700831<p>
832 <span style="white-space:nowrap;">Android 4.4</span> upgrades its
Dirk Dougherty9399d912013-11-04 17:03:45 -0800833 SurfaceFlinger from OpenGL ES 1.0 to OpenGL ES 2.0.
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700834</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700835
836<h4 id="44-composer">New Hardware Composer support for virtual displays</h4>
837
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700838<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 Dougherty790f9182013-10-25 23:41:20 -0700844
845<h2 id="44-connectivity">New Types of Connectivity</h2>
846
847<h4 id="44-bluetooth">New Bluetooth profiles</h4>
848
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700849<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 Dougherty790f9182013-10-25 23:41:20 -0700860
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700861<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 Dougherty790f9182013-10-25 23:41:20 -0700867
868<h4 id="44-ir-blasters">IR Blasters</h4>
869
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700870<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 Dougherty790f9182013-10-25 23:41:20 -0700875
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700876<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 Dougherty790f9182013-10-25 23:41:20 -0700882
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700883<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 Dougherty790f9182013-10-25 23:41:20 -0700888
889<h4 id="44-wifi-tdls">Wi-Fi TDLS support</h4>
890
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700891<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 Dougherty790f9182013-10-25 23:41:20 -0700897
898<h2 id="44-accessibility">Accessibility</h2>
899
900<h4 id="44-closed-captioning">System-wide settings for closed captioning</h4>
901
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700902<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> &gt;
906 <strong>Accessibility</strong> &gt; <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 Dougherty790f9182013-10-25 23:41:20 -0700910
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700911<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 Dougherty790f9182013-10-25 23:41:20 -0700920
921<div style="float:right;margin:22px 0px 0px 24px;width:490px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700922 <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 Dougherty790f9182013-10-25 23:41:20 -0700930</div>
931
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700932<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 Dougherty790f9182013-10-25 23:41:20 -0700939
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700940<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 Dougherty790f9182013-10-25 23:41:20 -0700947
948<h4 id="44-enhanced-apis">Enhanced Accessibility APIs</h4>
949
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700950<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 Dougherty790f9182013-10-25 23:41:20 -0700957
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700958<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 Dougherty790f9182013-10-25 23:41:20 -0700965
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700966<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 Dougherty790f9182013-10-25 23:41:20 -0700972
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 Doughertyb08447b2013-10-31 02:31:42 -0700977<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 Dougherty790f9182013-10-25 23:41:20 -0700982
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700983<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 Dougherty790f9182013-10-25 23:41:20 -0700990
991<div style="float:right;margin:16px 12px 0px 32px;width:260px;clear:both;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700992 <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 Doughertya5f542a2013-11-05 11:00:58 -0800995 The <strong>Force RTL layout</strong> option makes it easier to test your app's localization.
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700996 </p>
Dirk Dougherty790f9182013-10-25 23:41:20 -0700997</div>
998
Dirk Doughertyb08447b2013-10-31 02:31:42 -0700999<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 Dougherty790f9182013-10-25 23:41:20 -07001005
Dirk Doughertya5f542a2013-11-05 11:00:58 -08001006<h4 id="44-pseudolocale-rtl">Force RTL Layout</h4>
Dirk Dougherty790f9182013-10-25 23:41:20 -07001007
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001008<p>
Dirk Dougherty2705c8b2013-11-10 18:07:24 -08001009 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 Doughertyb08447b2013-10-31 02:31:42 -07001012</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -07001013
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001014<p>
Dirk Doughertya5f542a2013-11-05 11:00:58 -08001015 The Force RTL layout option switches the device to RTL layout for all locales and
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001016 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 Dougherty347b6fc2013-11-07 09:22:52 -08001018 can access the option in <strong>Settings &gt; Developer
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001019 options &gt; Force RTL layout direction</strong>.
1020</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -07001021
Dirk Dougherty790f9182013-10-25 23:41:20 -07001022
1023<h2 id="44-security">Security enhancements</h2>
1024
1025<h4 id="44-selinux">SELinux (enforcing mode)</h4>
1026
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001027<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 Dougherty790f9182013-10-25 23:41:20 -07001033
1034<h4 id="44-crytpo">Improved cryptographic algorithms</h4>
1035
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001036<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 Dougherty790f9182013-10-25 23:41:20 -07001044
1045<h4 id="44-other">Other enhancements</h4>
1046
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001047<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 Dougherty790f9182013-10-25 23:41:20 -07001055
1056<h2 id="44-tools">Tools for analyzing memory use</h2>
1057
1058<h4 id="44-procstats">Procstats</h4>
1059
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001060<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 Dougherty790f9182013-10-25 23:41:20 -07001065
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001066<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 Dougherty790f9182013-10-25 23:41:20 -07001075
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001076<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 Dougherty790f9182013-10-25 23:41:20 -07001083
1084<div style="margin:2em 0em;width:780px;">
Dirk Dougherty790f9182013-10-25 23:41:20 -07001085 <div style="float:left;width:390px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001086 <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 Dougherty790f9182013-10-25 23:41:20 -07001094
1095 <div style="float:right;width:390px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001096 <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 Dougherty790f9182013-10-25 23:41:20 -07001104</div>
1105
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001106<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 Dougherty790f9182013-10-25 23:41:20 -07001112
1113
1114<h4 id="44-procstats-ondevice" style="clear:both">On-device memory status and profiling</h4>
1115
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001116<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 &gt; Developer options &gt; Process
1122 stats</strong>
1123</p>
Dirk Dougherty790f9182013-10-25 23:41:20 -07001124
1125<div style="float:right;margin:22px 0px 0px 24px;width:490px;">
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001126 <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 Dougherty790f9182013-10-25 23:41:20 -07001135</div>
1136
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001137<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 Dougherty790f9182013-10-25 23:41:20 -07001145
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001146<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 Dougherty790f9182013-10-25 23:41:20 -07001156
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001157<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 Dougherty790f9182013-10-25 23:41:20 -07001164
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001165<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 Dougherty790f9182013-10-25 23:41:20 -07001172
Dirk Doughertyb08447b2013-10-31 02:31:42 -07001173</div><!-- END ANDROID 4.4 -->