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