Home | History | Annotate | Download | only in versions
      1 page.title=Android Lollipop
      2 
      3 @jd:body
      4 
      5 
      6 
      7 
      8 
      9 
     10 
     11 
     12 
     13 
     14   <div style="padding:0px 0px 0px 20px;float:right;margin:0 -10px 0 0">
     15     <img src="{@docRoot}images/home/l-hero_2x.png" srcset="{@docRoot}images/home/l-hero.png 1x, {@docRoot}images/home/l-hero_2x.png 2x" width="460" height="300" >
     16   </div>
     17 
     18   <div class="landing-docs" style="float:right;clear:both;margin:68px 0 2em 3em;">
     19   <div class="col-4 normal-links highlights" style="font-size:12px;">
     20     <h3 id="thisd" >Key Developer Features</h3>
     21     <ul style="list-style-type:none;">
     22   <li><a href="#Material">Material design</a></li>
     23   <li><a href="#Perf">Performance focus</a></li>
     24   <li><a href="#Notifications">Notifications</a></li>
     25   <li><a href="#TV">Your apps on the big screen</a></li>
     26   <li><a href="#Documents">Document-centric apps</a></li>
     27   <li><a href="#Connectivity">Advanced connectivity</a></li>
     28   <li><a href="#Graphics">High-performance graphics</a></li>
     29   <li><a href="#Audio">More powerful audio</a></li>
     30   <li><a href="#Camera">Enhanced camera & video</a></li>
     31   <li><a href="#Work">Android in the workplace</a></li>
     32   <li><a href="#ScreenCapture">Screen capturing and sharing</a></li>
     33   <li><a href="#Sensors">New types of sensors</a></li>
     34   <li><a href="#WebView">Chromium WebView</a></li>
     35   <li><a href="#Accessibility">Accessibility & input</a></li>
     36   <li><a href="#Battery">Tools for battery-efficient apps</a></li>
     37     </ul>
     38   </div>
     39 </div>
     40 
     41 
     42 
     43 
     44 
     45 
     46 
     47 <p>Welcome to Android 5.0 Lollipop&mdash;the largest and most ambitious release for Android yet!</p>
     48 
     49 <p>This release is packed with new features for users and thousands of new APIs for developers. It extends Android even further, from phones, tablets, and wearables, to TVs and cars.</p>
     50 
     51 <p>For a closer look at the new developer APIs, see the
     52 <a href="{@docRoot}about/versions/android-5.0.html">Android
     53 5.0 API Overview</a>. Or, read more
     54 about Android 5.0 for consumers at
     55 <a href="http://www.android.com/versions/lollipop-5-0/"
     56 >www.android.com</a>.</p>
     57 
     58 
     59 
     60 <p style="
     61     padding: 10px;
     62     background: #eee;
     63     width: 250px;
     64     border: 1px solid #ccc;
     65     margin-top: 20px;
     66 ">To test your apps on a real device, flash a Nexus 5 or Nexus 7 with the <br>
     67 <a href="/preview/index.html#Start"><b>ANDROID PREVIEW SYSTEM IMAGE</b></a>.</p>
     68 
     69 
     70 <h2 id="Material">Material design</h2>
     71 
     72 <p>Android 5.0 brings <a href="http://www.google.com/design/spec">Material design</a> to Android and gives you an expanded UI toolkit for integrating the new design patterns easily in your apps.  </p>
     73 
     74 
     75 
     76 <p>New <strong>3D views</strong> let you set a z-level to raise elements off of the view hierarchy and cast <strong>realtime shadows</strong>, even as they move.</p>
     77 
     78 
     79 <p>Built-in <strong>activity transitions</strong> take the user seamlessly from one state to another with beautiful, animated motion. The material theme adds transitions for your activities, including the ability to use <strong>shared visual elements</strong> across activities.</p>
     80 
     81 
     82 
     83 <div style="width:290px;margin-right:35px;float:left">
     84   <div class="framed-nexus5-port-span-5">
     85   <video class="play-on-hover" autoplay="">
     86     <source src="/design/material/videos/ContactsAnim.mp4">
     87     <source src="/design/videos/ContactsAnim.webm">
     88     <source src="/design/videos/ContactsAnim.ogv">
     89   </video>
     90   </div>
     91   <div style="font-size:10pt;margin-left:20px;margin-bottom:30px">
     92     <em>To replay the movie, click on the device screen</em>
     93   </div>
     94 </div>
     95 
     96 
     97 <p>Ripple animations are available for buttons, checkboxes, and other touch controls in your app. 
     98 
     99 <p>You can also define vector drawables in XML and animate them in a variety of ways. Vector drawables scale without losing definition, so they are perfect for single-color in-app icons.</p>
    100 
    101 <p>A new system-managed processing thread called <strong>RenderThread</strong> keeps animations smooth even when there are delays in the main UI thread. </p>
    102 
    103 
    104 <h2 id="Perf">Performance focus</h2>
    105 
    106 <p>Android 5.0 provides a faster, smoother and more powerful computing experience.</p>
    107 
    108 <p>Android now runs exclusively on the new <strong>ART runtime</strong>, built from the ground up to support a mix of ahead-of-time (AOT), just-in-time (JIT), and interpreted code. Its supported on ARM, x86, and MIPS architectures and is fully 64-bit compatible.</p>
    109 
    110 <p>ART improves app performance and responsiveness. Efficient garbage collection reduces the number and duration of pauses for GC events, which fit comfortably within the v-sync window so your app doesnt skip frames. ART also dynamically moves memory to optimize performance for foreground uses. </p>
    111 
    112 <p>Android 5.0 introduces platform support for <strong>64-bit architectures</strong>&mdash;used by the Nexus 9's NVIDIA Tegra K1. Optimizations provide larger address space and improved performance for certain compute workloads. Apps written in the Java language run as 64-bit apps automatically&mdash;no modifications are needed. If your app uses native code, weve extended the NDK to support new ABIs for ARM v8, and x86-64, and MIPS-64.</p>
    113 
    114 <p>Continuing the focus on smoother performance, Android 5.0 offers improved A/V sync. The audio and graphics pipelines have been instrumented for more accurate timestamps, enabling
    115 video apps and games to display smooth synchronized content.</p>
    116 
    117 
    118 <h2 id="Notifications">Notifications</h2>
    119 
    120 <p>Notifications in Android 5.0 are more visible, accessible, and configurable. </p>
    121 
    122 <img src="{@docRoot}images/versions/notification-headsup.png" style="float:right; margin:0 0 40px 60px" width="300" height="224" />
    123 
    124 <p>Varying notification details may appear <strong>on the lock screen</strong> if desired by the user. Users may elect to allow none, some, or all notification content to be shown on a secure lock screen. </p>
    125 
    126 <p>Key notification alerts such as incoming calls appear in a <strong>heads-up notification</strong>&mdash;a small floating window that allows the user to respond or dismiss without leaving the current app.</p>
    127 
    128 <p>You can now add <strong>new metadata</strong> to notifications to collect associated contacts (for ranking), category, and priority.</p>
    129 
    130 <p>A new media notification template provides consistent media controls for notifications with up to 6 action buttons, including custom controls such as "thumbs up"&mdash;no more need for RemoteViews!</p>
    131 
    132 
    133 
    134 <h2 id="TV">Your apps on the big screen</h2>
    135 
    136 <p><a href="http://developer.android.com/tv/index.html">Android TV</a> provides a complete TV platform for your app's big screen experience. Android TV is centered around a simplified home screen experience that allows users to discover content easily, with personalized recommendations and voice search.</p>
    137 
    138 <p>With Android TV you can now <strong>create big, bold experiences</strong> for your app or game content and support interactions with game controllers and other input devices. To help you build cinematic, 10-foot UIs for television, Android provides a <strong>leanback UI framework</strong> in the <a href="{@docRoot}tools/support-library/features.html#v17-leanback">v17 support library</a>.</p>
    139 
    140 <p>The <strong>Android TV Input Framework</strong> (TIF) allows TV apps to handle video streams from sources such as HDMI inputs, TV tuners, and IPTV receivers. It also enables live TV search and recommendations via metadata published by the TV Input and includes an HDMI-CEC Control Service to handle multiple devices with a single remote. </p>
    141 
    142 <p>The TV Input Framework provides access to a wide variety of live TV input sources and brings them together in a single user interface for users to browse, view, and enjoy content. Building a TV input service for your content can help make your content more accessible on TV devices.</p>
    143 
    144 
    145 
    146 <img src="{@docRoot}images/versions/recents_screen_2x.png" srcset="{@docRoot}images/versions/recents_screen.png 1x, {@docRoot}images/versions/recents_screen_2x.png 2x" style="float:right; margin:0 0 40px 60px" width="300" height="521" />
    147 
    148 <h2 id="Documents">Document-centric apps</h2>
    149 
    150 <p>Android 5.0 introduces a redesigned Overview space (formerly called Recents) thats more versatile and useful for multitasking.</p>
    151 
    152 <p>New APIs allow you to show separate activities in your app as individual documents alongside other recent screens.</p>
    153 
    154 <p>You can take advantage of concurrent documents to provide users instant access to more of your content or services. For example, you might use concurrent documents to represent files in a productivity app, player matches in a game, or chats in a messaging app. </p>
    155 
    156 
    157 
    158 <h2 id="Connectivity">Advanced connectivity</h2>
    159 
    160 <p>Android 5.0 adds new APIs that allow apps to perform concurrent operations with <strong>Bluetooth Low Energy</strong> (BLE), allowing both scanning (central mode) and advertising (peripheral mode).</p>
    161 
    162 <p>New <strong>multi-networking</strong> features allow apps to query available networks for available features such as whether they are Wi-Fi, cellular, metered, or provide certain network features. Then the app can request a connection and respond to connectivity loss or other network changes.</p>
    163 
    164 <p><strong>NFC</strong> APIs now allow apps to register an NFC application ID (AID) dynamically. They can also set the preferred card emulation service per active service and create an NDEF record containing UTF-8 text data.</p>
    165 
    166 
    167 
    168 <h2 id="Graphics">High-performance graphics</h2>
    169 
    170 <p>Support for <strong><a href="http://www.khronos.org/opengles/3_X/">Khronos OpenGL ES 3.1</a></strong> now provides games and other apps the highest-performance 2D and 3D graphics capabilities on supported devices. </p>
    171 
    172 <p>OpenGL ES 3.1 adds compute shaders, stencil textures, accelerated visual effects, high quality ETC2/EAC texture compression, advanced texture rendering, standardized texture size and render-buffer formats, and more.</p>
    173 
    174 
    175 <div class="figure" style="width:350px; margin:0 0 0 60px">
    176 <img src="{@docRoot}images/versions/rivalknights.png" style="float:right;" width="350" height="525" />
    177 <p class="img-caption">Gameloft's Rival Knights uses ASTC (Adaptive Scalable Texture Compression) from AEP and Compute Shaders from ES 3.1 to deliver HDR (High Dynamic Range) Bloom effects and provide more graphical detail.</p>
    178 </div>
    179 
    180 <p>Android 5.0 also introduces the <strong>Android Extension Pack</strong> (AEP), a set of OpenGL ES extensions that give you access to features like tessellation shaders, geometry shaders, ASTC texture compression, per-sample interpolation and shading, and other advanced rendering capabilities. With AEP you can deliver high-performance graphics across a range of GPUs.</p>
    181 
    182 
    183 <h2 id="Audio">More powerful audio</h2>
    184 
    185 <p>A new audio-capture design offers <strong>low-latency audio input</strong>. The new design includes: a fast capture thread that never blocks except during a read; fast track capture clients at native sample rate, channel count, and bit depth; and normal capture clients offer resampling, up/down channel mix, and up/down bit depth.</p>
    186 
    187 <p>Multi-channel <strong>audio stream mixing</strong> allows professional audio apps to mix up to eight channels including 5.1 and 7.1 channels.</p>
    188 
    189 <p>Apps can expose their media content and <strong>browse media</strong> from other apps, then request playback. Content is exposed through a queryable interface and does not need to reside on the device.</p>
    190 
    191 <p>Apps have finer-grain control over <strong>text-to-speech synthesis</strong> through voice profiles that are associated with specific locales, quality and latency rating. New APIs also improve support for synthesis error checking, network synthesis, language discovery, and network fallback.</p>
    192 
    193 <p>Android now includes support for standard <strong>USB audio</strong> peripherals, allowing users to connect USB headsets, speakers, microphones, or other high performance digital peripherals. Android 5.0 also adds support for <strong>Opus</strong> audio codecs.</p>
    194 
    195 <p>New <strong>{@link android.media.session.MediaSession}</strong> APIs for controlling media playback now make it easier to provide consistent media controls across screens and other controllers.</p>
    196 
    197 
    198 <h2 id="Camera">Enhanced camera &amp; video</h2>
    199 
    200 <p>Android 5.0 introduces <strong>all new camera APIs</strong> that let you capture raw formats such as YUV and Bayer RAW, and control parameters such as exposure time, ISO sensitivity, and frame duration on a per-frame basis. The new fully-synchronized camera pipeline allows you to capture uncompressed full-resolution YUV images at 30 FPS on supported devices.</p>
    201 
    202 <p>Along with images, you can also capture metadata like noise models and optical information from the camera.</p>
    203 
    204 <p>Apps sending video streams over the network can now take advantage of H.265 <strong>High Efficiency Video Coding (HEVC)</strong> for optimized encoding and decoding of video data. </p>
    205 
    206 <p>Android 5.0 also adds support for <strong>multimedia tunneling</strong> to provide the best experience for ultra-high definition (4K) content and the ability to play compressed audio and video data together. </p>
    207 
    208 
    209 <!--
    210 <div class="figure" style="width:320px; margin:1em 0 0 20px;padding-left:2em;">
    211 <img style="float:right; margin:0 1em 1em 2em"
    212     src="{@docRoot}images/android-5.0/managed_apps_launcher@2x.png"
    213     srcset="{@docRoot}images/android-5.0/managed_apps_launcher@2x.png 2x"
    214     alt="" width="300" />
    215 <p class="img-caption">Android Work users have a unified view of their personal and work apps, which are badged for easy identification.</p>
    216 </div>
    217 -->
    218 
    219 <h2 id="Work">Android in the workplace</h2>
    220 
    221 <p>To enable bring-your-own-device for enterprise environments, a new
    222 <a href="{@docRoot}about/versions/android-5.0.html#Enterprise">managed provisioning process</a>
    223 creates a secure work profile on the device. In the launcher, apps are shown with a Work badge to
    224 indicate that the app and its data are administered inside of the work profile by an IT
    225 administrator.</p>
    226 
    227 <p>Notifications for both the personal and work profile are visible in a unified view. The data
    228 for each profile is always kept separate and secure from each other, including when the same
    229 app is used by both profiles.</p>
    230 
    231 <p>For company-owned devices, IT administrators can start with a new device and configure it with a
    232 <a href="{@docRoot}about/versions/android-5.0.html#DeviceOwner">device owner</a>. Employers can
    233 issue these devices with a device owner app already installed that
    234 can configure global device settings.</p>
    235 
    236 
    237 
    238 <h2 id="ScreenCapture">Screen capturing and sharing</h2>
    239 
    240 <p>Android 5.0 lets you add screen capturing and screen sharing capabilities to your app. </p>
    241 
    242 <p>With user permission, you can capture non-secure video from the display and deliver it over the network if you choose.</p>
    243 
    244 
    245 <h2 id="Sensors">New types of sensors</h2>
    246 
    247 <p>In Android 5.0, a new <strong>tilt detector</strong> sensor helps improve activity recognition on supported devices, and a <strong>heart rate sensor</strong> reports the heart rate of the person touching the device. </p>
    248 
    249 <p>New <strong>interaction composite sensors</strong> are now available to detect special interactions such as a <em>wake up</em> gesture, a <em>pick up</em> gesture, and a <em>glance</em> gesture.</p>
    250 
    251 
    252 
    253 <h2 id="WebView">Chromium WebView</h2>
    254 
    255 <div style="float:right;margin:1em 2em 1em 2em;">
    256   <img src="/images/kk-chromium-icon.png" alt="" height="160" style="margin-bottom:0em;">
    257 </div>
    258 
    259 <p>The initial release for Android 5.0 includes a version of Chromium for {@link android.webkit.WebView} based on the Chromium M37 release, adding support for <strong>WebRTC</strong>, <strong>WebAudio</strong>, and <strong>WebGL</strong>. </p>
    260 
    261 <p>Chromium M37 also includes native support for all of the <strong>Web Components</strong> specifications: Custom Elements, Shadow DOM, HTML Imports, and Templates. This means you can use <a href="http://polymer-project.org/">Polymer</a> and its <a href="https://www.polymer-project.org/docs/elements/material.html">material design elements</a> in a WebView without needing polyfills.</p>
    262 
    263 <p>Although WebView has been based on Chromium since Android 4.4, the Chromium layer is now updatable from Google Play.</p>
    264 
    265 <p>As new versions of Chromium become available, users can update from Google Play to ensure they get the latest enhancements and bug fixes for WebView, providing the latest web APIs and bug fixes for apps using WebView on Android 5.0 and higher.</p>
    266 
    267 
    268 
    269 <h2 id="Accessibility">Accessibility &amp; input</h2>
    270 
    271 <p>New accessibility APIs can retrieve detailed information about the properties of windows on the screen that sighted users can interact with and define standard or customized input actions for UI elements.</p>
    272 
    273 <p>New Input method editor (IME) APIs enable faster switching to other IMEs directly from the input method.</p>
    274 
    275 
    276 
    277 <h2 id="Battery">Tools for building battery-efficient apps</h2>
    278 
    279 <p>New <strong>job scheduling</strong> APIs allow you optimize battery life by deferring jobs for the system to run at a later time or under specified conditions, such as when the device is charging or connected to Wi-Fi.</p>
    280 
    281 <p>A new <code>dumpsys batterystats</code> command generates <strong>battery usage statistics</strong> that you can use to understand system-wide power use and understand the impact of your app on the device battery. You can look at a history of power events, approximate power use per UID and system component, and more.</p>
    282 
    283 <img src="{@docRoot}images/versions/battery_historian.png" srcset="{@docRoot}images/versions/battery_historian@2x.png 2x" alt="" width="760" height="462" />
    284 <p class="img-caption">Battery Historian is a new tool to convert the statistics from <code>dumpsys batterystats</code> into a visualization for battery-related debugging. You can find it at <a href="https://github.com/google/battery-historian"
    285 >https://github.com/google/battery-historian</a>.</p>
    286