chet haase: good afternoon, andwelcome to the first session, right? what's new in android? the session that i liketo think of as the android keynote for the peoplethat couldn't actually
Android hosts file, wake up that early. so congratulations foractually waking up this early. we'll see how it goes. [applause]
yes, well done. give yourselves a hand. absolutely. this is a talkthat traditionally has been done byme and romain guy, who could not make it this yearbecause we didn't ask him to. though we did get anappropriate stand-in for romain. we found someone that canfake a decent french accent. dan sandler: [speaking french]eiffel tower.
chet haase: so with that,let's introduce ourselves, because obviously youhave no idea who we are. i am chet haase. i am on the ui toolkitteam in android. dan sandler: i'm dan sandler. i'm on the androidsystem ui team. chet haase: that accentdidn't last very long. dan sandler: it didn't. i couldn't.
chet haase: all right, so oneof the questions that comes up-- it just came up atlunchtime, actually, down in the cafeteria-- isok, so there's an l release. what does l stand for? and i'm here totell you-- can we have like, a drumroll, or something? [audience attempts drum roll] l if i know. but for today, we are callingthis the l developer preview
release. we heard about thisin the keynote, and we can see by the graphicson the screen that aren't quite professionally done thatit is not a final release. it is instead a preview releasewhere things work pretty well, but it's not done yet. we're hard at workfinishing the l release. and in the meantime,we're exposing it to you to actually use in the meantime,get your apps running and happy
on it, and mostimportantly, to send us feedback about what's notworking exactly perfectly so that we can actuallynail that down by the time we ship it. so in the meantimetoday, we wanted to give a session talkingabout all the bits that are new inthis preview release that you can get yourhands on and play with, and there's a lotof material in here.
we'll see how fast-- dan sandler: we have aboutsix hours of material to cover in 45 minutes, soyou're gonna have to hang on. chet haase: sofirst of all, let's start with graphicsand ui, because i like to start withgraphics and ui, and i usually like toend with that as well. so we heard about the materialdesign stuff in the keynote, and we wanted to touch ona couple of those elements
in here. i also want to pointout, i'll give you references at theend of this section, about where to gofor more information during the conference. in fact, one of the wholepoints of this session is to give you just a littlebit more detailed info on all of the feature areas thatwe find interesting to talk about, and also thereferences to what
other sessions and what othervideos you should check out, or sandboxes that havefurther information, or where you can simplyfind diane on the show floor if you want to ask her directly. so in the material area,we have a new theme, we have some newwidgets for you, and we also havesome new apis, which you can use at your option. the theme exposes new colors.
there's an ideain material design that all the assets areby default grayscale, and then they can be tinted. so it's very easy tobrand your application, or your applicationstate, with colors, as opposed to baking the colorsdirectly into the assets. so that's much easier now. there's new icons out there. some of them areanimated, part of
the rich interactiveexperience that we have. with material design, wehave touch feedback ripples. we'll see a little bitmore about-- give the user a sense of interactingwith the ui and knowing exactly what'sgoing on in the ui at all times. and also, activity transitionswith shared hero elements. we'll see a littlebit more about that. in the widget space,we have a couple of widgets thatare very important.
one of them is minor. it's cardview. there's not a lot there. it's basically a containerwith rounded corners, and it's raised up off the viewhierarchy plane a little bit to give a shadowed look to it. this is not something that'stoo hard to do in your own code, but having cardview thereallows you to have this look and feel in a consistent waythat other applications are
using it as well. recyclerview is alittle bit larger. if we can actually justdo an informal poll of who has actually used listview? ok. if i can just count. hang on. ok, so that was basicallyeveryone in the audience. now if we can get acount of the people
who have enjoyedthat experience? i count two, which is actuallyone more than i expected. so you can think ofrecyclerview as being listview2. this is more extensible,more flexible. we have layout managersthat you can plug in to get different layouts. it's amazing. you can actuallylinearly lay out both verticallyand horizontally.
incredible. [cheering] dan sandler: absolutely. chet haase: becauseon the android team, we think not only about why,but also about x. so we have-- [groaning] we have a linear--why the groan? we have a linear layoutmanager in there right now. we have some otherlayout managers
that we're working on thatwill come out with it, or you can write your owncustom layout manager. there's also animationsbaked into it. some very simple add removeanimations right now. i don't know ifanybody has actually tried to implementanimations in listview. i know i personally havedone several videos trying to explain how to do thisnearly impossible task. what we'd like is for thatto simply be automatic,
so we've started downthe road for that. and both of these,most importantly, unlike a lot of the newapis, which are obviously just part of the lrelease, these widgets are actually in thesupport library in v7. so you can use those-- dan sandler: how muchdid you pay them? we're getting a lot ofapplause lines here. chet haase: i actually don'tknow what they're clapping at.
it has nothing to dowith what i'm saying. something else is going on-- dan sandler: world cup. chet haase: so you can use thosein your material applications, in your l applications,but you can also use them in code forearlier releases as well. so have at it. also, in the graphics area, wehave real time soft shadows. we heard a little bitabout that in the keynote.
we'll hear more tomorrowin some sessions tomorrow. it's the ability to giveelevation to views to pop them up off the view hierarchy plane. not only giving themelevation and z value, and then allowing them to casta shadow, a soft shadow based on that elevation, but alsoto draw outside their bounds. one of the tricky parts aboutdoing things like shadows is, or if you want toscale that view, well, then you need totell the containment
hierarchy of thatview not to clip it. well, giving it elevation popsit into-- what you can picture is like an aquarium,a 3d volume that sits on top of theview hierarchy. and all of a sudden, you'vegot much more flexibility about how that thing isdrawn, about how it's clipped, and about the ordering withwhich it and its shadow is drawn in the hierarchy. we have animations.
yay, more animation stuff. the biggest one in this areais activity transitions-- in particular, theability to share elements between activities. so we've seen some work. i think it was last year at i/othere was an animation talk, and there was some"devbytes" around this where we showed techniquesfor passing information between activities such thatyou could pass information
about elements, and you couldsort of fake this animation to look like ittransitions seamlessly from one activity to another. so that technique has beenbaked into the platform, so there's a standardapi way for you to say this is my shared[inaudible] element, or a set of sharedelements, and you can pass thosebetween activities, and they can share them.
they can animate thembetween the activities. you can animate other items inand out between the activities, and you can customizethe entire experience, making it all part of thematerial idea of making all the transitionsseamless for the user as they go from state to stateto state in their application, or in your application. also, there's new animationcurve capabilities, both motion and timing curves,so you can have
a much more custom path-basedcurve in the timing area. you can also movethings in x and y along a curve, whichis a little bit tricky. possible, but tricky before. and finally, there'sanimated reveal capabilities. so you can reveal the nextstate of an activity or a view by having a circular revealthat exposes it over time. and i think there's a videoof some of this stuff. so this is sort of anepilepsy-causing animation
here that i looped, just showingsome of the shared element transition stuff where we'repopping the view in and out. if you look closely,you can see a shadow that's popped aswe're elevating it. and then as it goes backdown to the view hierarchy, we launch the next activityand pass that view over as the shared element betweenthese two separate activities. we have some newicon capabilities. there's a coupleof different ways
of animating states in icons. one of them you see in thecheck boxes and radio buttons, the ability to basicallyanimate key frames, or these images thatrepresent an animation from one state to another. and there's another onecalled statelistanimator, where when you go fromone state to another, you can specify acustom animation that will animateproperties over time.
and then finally, we havetouch feedback ripples, which gives the user indicationof what's going on in the ui when they press that button. it's not simply goingfrom unpressed to pressed, but it's actuallygiving them information about the gradual statechange that's occurring, as well as possibly wherethat state change occurred. so if we look at thevideo here, let's see if-- that is reallyhard to see on this screen.
there's some subtle rippleson the button down below, and you can see theripples are actually emanating from thetouch point that i had when i touched thisbeautiful button in my ui. and then the check boxup at the top, that's one of the animatedpng animations that we have for theanimatedstatelistdrawable. and render thread. so this is kind of animplementation detail,
but it's a reallyinteresting one, so i'm going to talkabout it anyway. and it's also important, andprobably increasingly important as we go forward,for performance. one of the issues that wehave with ui and graphics animations, and performancein uis in general and android, is that everything needs to stayon the ui toolkit thread, which means if you're doingsomething silly like querying a web service on your uithread, a, don't, and b,
you're going to freeze your ui. and c, see a before. don't do that. but you can get yourselfinto these positions, in some casesnecessarily, because that is an operation we need toperform in the ui toolkit thread, and thereforeeverything else happening halts. a really great example of thatis when you launch an activity, then we need to inflatethat new activity
if you're in the same processon the ui toolkit thread. well, in the meantime, ifyou're running an animation that also needs to run inthe ui toolkit thread, then that animationis going to stop while the activity launches. so we came along with therender thread technology to be able to break apart thetwo processes of rendering. there's the creating thedisplay list of what we actually want to render, andthen there's actually
executing that displaylist and telling the gpu how to draw this stuff. and we broke these two apart. so we create it onthe ui toolkit thread, where it necessarilyhas to be, and then we pass that information overthe wall to the render thread to let it actually executeand talk to the gpu on a separate thread. in particular,what we want to do
is take these atomicanimations and send them over so they can perform completelyautonomously on the render thread so that now you're notbeholden to the state of the ui toolkit thread if youare inflating an activity or doing an expensive operation,because the animations can happen asynchronouslyat the same time. so we've started downthat path right now. there's going to be morework going forward on that. a great visualexample of that right
now is the touchfeedback ripples, which happen onthe render thread, and they happen completelyautonomous of the ui toolkit thread, which is why whenyou click on something that launches a new activity, theripple continues to actually animate while the newactivity window is coming up. there's some importanti/o talks where we go into a lot more gorydetail in a lot of this stuff, so i would suggest thatyou check those out.
some of them are, ofcourse, the material design talks themselves. they're scatteredthroughout the conference, and i frankly didn't lookup the names and titles, so they're not on this slide. there are twosessions in particular that go into themore techie details. one is called materialscience-- this is tomorrow morning at11:00-- and the other
is material witness. material science isan overview of sort of the entire space, kind ofa deeper dive of everything i've just talked about. and material witnessis a use case where romain and i wroteparticular apps using these apis and then talkabout how they were actually implemented and howthe technology works. the sessions inyour schedule right
now probably havedifferent names because we werewithholding the material name until after the keynote,but the real names will be out there very soon. so check those out,and there's also an i/o byte on activitytransitions in particular that you can check out as well. in support lib, there's therecyclerview and the cardview stuff that i talked about.
there's also other capabilities,including palette capabilities for doing color sampling stuff. this was mentionedin the keynote. matias was talkingabout that this morning. there's roundedbitmapdrawable. this comes into play inthings like cardview. it's very useful. viewpropertyanimator. this was done as moreof an implementation
detail of getting recyclerviewanimations to work. and notificationcompat isuseful for android wear stuff. and we're onto webview, wherewe have updated to chromium, build m36, which enablesvarious useful web standards, so you now have webgl,and the other things listed on the slide. check out the i/obyte "what's new in webview" for moredetailed information. on the graphic side,there is an update
to opengl es 3.1 with newcompute shaders and new shader language capabilities. we have bindings inthe sdk as well as ndk, and obviously it's backwardcompatible with opengl es 2 and 3, as they usually are. and you can say usefeature in your manifest to specify this version exactly. the other importantthing to mention was also mentioned bydave burke in the keynote.
it's the android extension pack. we basically collected a bunchof extensions that are really useful and powerful together andsort of bring the platform up to the current state of,say, console gaming hardware. and all of thesecome as a bundle, and we're working withpartners to enable one and all of theseextensions together. and there will probably bea mechanism in the future for you to ask for thisparticular capability, which
basically gives you thewhole sandbox of capabilities altogether. lots of useful stuff inthere, including tessellation, enhanced geometry shaders,and texture compression would be nice. camera and audio space. there's a couple of talksi would suggest you go to for the actual detailson this, but some image processing capabilities, alsosome audio data type buffering
information that icouldn't possibly address, because i don't know. so i would suggest that yougo to the talks instead. and in the meantime,listen to dan. dan sandler: you cantake a breath now. chet haase: yay. dan sandler: right. so related to the audiois a whole new set of apis to effectively replaceremotecontrolclient.
if you've everbuilt a media player and you've dealt withtransport controls, you know aboutremotecontrolclient. here to the rescue ismediasession and its friend mediacontroller. these are two new classesand a bunch of other support code in the platform to allowyou to make multiple playback sources, and multipletransport controllers, and wire them all together.
the nice thing aboutmediacontroller is that it works froma non-ui process, so you can be running thisentirely in the background if you need to do control ofan ongoing playback stream from there, extractmetadata, things like that. and we use that inthe system ui as well. we'll talk about that alittle bit later in the talk. mediasession hooks upto your playback stream and essentially handles thosetransport control requests
in much the same way thatyou're already accustomed to. and you'll talk to themediasession manager to work with those. great new tools, all onandroid.media.session. so you want to check those out. i will segue from here intoall the other good stuff that's in the framework, if it doesn'tfall under the green category. chet haase: it's thenon-visual framework stuff. dan sandler: that'sright, except that i'm
sure there's going tosome visual stuff here, like right hereat the beginning. so recent documents and tasks. you saw this in the keynote. our recent apps interface in thesystem ui is not just for apps anymore. we're now encouragingyour app to break apart different componentsof the experience into differenttasks or documents.
we sort of call this a moredocument-centric interface. so you see in thescreen shot here we've got a couple ofdifferent web sessions, essentially web documentsthat are showing up as different cards inthe recents experience. and so this gives the usera much greater ability to shift back and forth betweendifferent tasks on one device. go ahead. chet haase: yeah,i was gonna say,
this came up in the keynote whenthey were talking about chrome. there was a websession where they were talking about differenttabs in the recents, and this is the capabilitythat enables that. dan sandler: that's right. so you can start a newdocument at any time by throwing inflag_activity_new_document into that intent. you can also mark your activitythat way in the manifest
to say this is always goingto start a new document. lots of other apis thatwe didn't have room for on the slide. you should definitelycheck it out. also in the systemui, you can now do more with the status bar. in kitkat, we introduceda translucent status bar, which was great for wallpaperexperiences and things that wanted to go full bleed.
the problem thatwe struggled with was that gradient that we put inthere to protect the status bar and navigation icons didn'twork great in every situation. it's not a lot of space. we didn't want tooverlap the app window. we didn't know what was goingto be in the app window region. so in the l developerpreview, you'll be able to see that youcan do a lot of things with the status bar thatyou couldn't do before,
particularly changethe color to something that matches your application'scolor branding, and so forth. you can use a solidcolor there, or you can use a completelytransparent status bar, and then it's upto you to make sure that all the status bar icons,all the navigation bar icons still look great. but as you can see herein the screen shot, that gives us the opportunityin google now launcher
to create a nice, long gradientthat both protects the icon so the user can seethem and gives you a really nice transitioninto the content. check it out. you heard about powera bunch in the keynote. and we'll talk a littlebit about it here. there's so much more tolook into under the heading of project volta. the first thing you'll see isthat there's a battery stat
service that you canask from adb to give you all kinds of gory detailsabout where the power is going on the system,what kind of power events there have been, andbreak it down by uid, as well as lookingat the global story. there's a tool in the sdkcalled battery historian, which i believe dave burkementioned, that gives you sort of a trace viewlike html graph output. you feed it a bug report, andit will tell you essentially
what happened toall of the power in that deviceover that session. it's incredibly,incredibly useful. just a quick example of howto talk to these things, you can talk to batterystatsand say, oh, you want to turn it on, you wantto enable the full history, clear out all the stats,take a bug report, and then you stuff itinto the historian, and you get out thisgreat piece of graphics
that you can use to understandwhere those coulombs went. another thing thathelps with power, and this was also touched ona little bit in the keynote, is jobscheduler. we're going to go alittle bit deeper here. it's pretty commonthat you've got an app that wants todo some work later-- sometime in the background,sometime when it's plugged in, sometime when you have accessto an unmetered high speed
network. so you can do allthis today, right? you probably do in your app. you wake up periodically,check the conditions, and then go back to sleep ifthe situation isn't right. that's not superefficient because you are waking up the devicejust to check to see if it's a good timeto wake up the device. jobscheduler is here to help.
it wraps it allup into something that the system cando and essentially call back your job whencertain conditions are met. and you see a littlebit of code here. the interesting parthere is that you specify the capabilitiesyou need, and then you just give ita component name, and you'll get thatcomponent name called when the time is right.
very handy. also in the framework,some improvements to the storage accessframework, which we introduced inkitkat in api 19. previously if you wantedto pop up a file browser and ask for a directory,you couldn't do it. now you can. once an app receivesa whole directory from the picker in thisway, you can actually
explore the entiresubtree of documents and do whatever you need todo with that whole directory. also in our framework are somenew things around networking. a couple of different topics. first one is multi-networking. we talked a littlebit about jobscheduler being handy for doing some worklater under a particular kind of condition. what if you need to do work now?
your service is running now,your app is running now, but you need to open asocket on a link that has some particular feature--some carrier future you need, needs to have smscapability, it needs to be unmetered, and so forth. connectivitymanager nowsupports the ability to handle thesenetwork requests. you say requestnetwork, andyou give it a call back. inside that call back,you will find out
when a network meeting yourcriteria becomes available, and then you canuse that network object to look up hosts andopen sockets on that link specifically. the other nicething about the call back, and this is very cool,you get warnings, when possible, when the network isabout to go down. this allows you to actually doa graceful handoff in your app from one link to another.
oh, you're about to losewi-fi because you're leaving its range. we're just going tomove this over, rebuild the stream on cellular withno interruption to the user. also under the banner ofnetworking is bluetooth. we introduced in 4.3bluetooth low energy. in l, we are now addingperipheral device support to ble. so you can provideservices and scan
for services pursuant tothe way that bluetooth le peripheral devices dothat sort of thing. check out the android bluetoothle package for more on that. finally, under networking,we have nfc changes. nfc has been a little hard touse for users, a little hard to use for developers. we're trying to removeall those pain points. we're now showing androidbeam in the share menu to make it easier to goahead and start an nfc
transmission fromthe user standpoint. from an app standpoint,i don't know if you've ever had asituation where you're trying to pop up adialog saying now hold your phones closer together. now you can actuallyspecifically start a beamoperation anytime you want with nfcadapter.invokebeam. another thing that has beena little harder than it needs
to be is creating a very simplepiece of text to push over nfc. now there's a method onndefrecord to let you do that. and there's a bunch ofnew cardemulation stuff that i can't begin to explainbecause, as chet explained, we don't know what it is. so you should check that out. and now as a sub headof the frameworks, we're going to talkabout notifications. there's a lot totalk about here.
chet haase: it's a visualside of the non-visual side. dan sandler: the visual sideof the non-- that's right. it's layers. it's so key to what we'redoing with l for the user. there's a lot to talkabout with notifications. also, it's an areaof my expertise, and i have theclicker, so we're going to talk about it for a while. i'm going to look at fourdifferent categories, how
they look, how they work. we're going to talkabout how that interacts with the lock screenand some privacy features we've added tomake that work for everyone, additional metadata that everyapp needs to start putting into its notifications tomake sure you're ready for l, and then finally we'll touchon wear just a little bit. they've got great talkslater in the program, but i wanted to just mentionsome of those interactions.
so first, the new stylenotifications in l. we should take aquick look back. these are the differentversions we've had just in the last five years. we've had a littlebit of evolution. i don't know if you cansee the differences there. chet haase: we're gettingblacker and blacker-- how-- dan sandler: it's a dark timefor the rebellion right there at the end.
here we havenotifications in l. we've moved to the material style. let's go through and takea look at the pieces here. so first i want toshow you that we are in fact usingthe material theme. we are in line with the restof the material design system that we're introducingfor android with l. we've got these card-shapedbackgrounds that cast shadows. the foreground is nowdark text, dark icons,
and the backgroundis this light color. i should point out at thispoint, if you've been following the icon guidelines, there areno new icon guidelines again, by the way. trying to keep that going. but if you've been followingthe icon guidelines, you should now have smallicons for notifications and for actions thatare effectively masks. and in l, we're actuallygoing to treat them as masks.
we're just going to use thoseto draw in the correct color. as chet was alludingearlier, that's something we're tryingto do more of in l. so if you have any opacity bakedinto your icons right now, now is the time to get rid of it. those should be full opacity,white on transparent icons everywhere. the next thing i want todraw your attention to is this accent color.
this really looksgreat and can really make a notification popout and showcase, again, that sort of colorstory that you may be trying totell with your app. it's just one method onthe builder, setcolor, and it fills thatnice circle right behind the small iconon the notification inside that layout. i should point out that if youhave a large icon in the past,
we've kicked that smallicon, that important symbolic representation of whatthat notification's about, we've kicked it overkind of to the side, where nobody notices it. now we're going tokeep that color circle, we're going to keepthat visual story, and we're gonna shrink itdown to a little badge that goes right in frontof the large icon. so it's always right wherethe user expects to see it.
and then finally, itjust bears mentioning that everything elseyou know and love about android notificationsis still alive and well and showcased great inthe l developer preview. expanded views, action buttons,and as always in android, if what you need itextends beyond what we've been able to come upwith in our templates, customer remote views arethere for you and available. now, i will say that one of thethings that people have said
to us is, well, ok,that's all fine and well, but i have to make a mediaplayer, and for media players, people expecttransport controls, and then i have to go deal withcustom remote views and all that pain. we've been suffering along withthat basically since honeycomb. no longer. we have a new templatefor you, the first one since jellybean-- mediastyle.
material design finallycomes to media playback. if you use this template, youwill opt into, essentially, the design created just foryou by the android ux team, designing somethingthat will look great both on the lock screen and inthe regular notification shade. one other thing thatyou'll notice about this is that the accent colorfills the entire background of the card. chet haase: it's orange.
dan sandler: it is orange. i wanted to make sure they couldsee it from the cheap seats. what am i saying? this is google i/o.there are no cheap seats. the accent colorfills the entire card, and that helps itpop out when you're looking at the lock screen. that's where yourmedia is coming from. for the first time, we'regoing to let you actually
use up to six action icons. in fact, you couldalways attach up to six, we just only showyou the first three. if you're using mediastyle,you'll get all six, and we draw them aslittle transport controls here, which is super handy. and in fact, we even letyou use one or two of those in the compact formof the notification, again, to makesure that wherever
you see that notification, it'sa great place to play and pause media. there's a custom progressbarthat fits with the theme, but most importantly, you don'tneed to use remoteviews anymore just to do simplemedia playback. i mentioned a little bit earlierthat there's a mediasession api. there's also a bitof the mediastyle that allows you to attachyour mediasession token right
into the notification, whichis going to tell the system ui, hey, this thing isplaying back media right now, which isgoing to be important as we start to do things likeintegrating more metadata from that track, more metadatafrom that ongoing playback, into the system ui. so for example, if you takea look at the l developer preview, you'll see thatalbum art is regrettably not showing on the lockscreen right now.
i was working onthat on the plane. i couldn't quiteget it done in time. i'm sorry. but when we have it in l,it will use this connection to mediasession toget that metadata right out of your ongoingplay back in real time. very quickly i want toshow you a wall of code, because everybody loves that. the important thingabout this is just
to note that most of theseapis here are the existing notification apis thatyou know and love. they're the five actions thatare in the demonstration there. i'm setting the color, andthen right there at the bottom we're doingnotification.mediastyle, which lets you attachthe media token and then pick whichof the actions to show in the compact form. something else yousaw in the keynote,
it kind of went byquickly, and i really should have put a video in here. so it went by so quickly, itdisappeared from this slide. heads-up notificationsis something that we've added to l to makeit easier for important things to get in front of the userwithout actually taking you out of context. so in the past, if aphone call comes in, you're in the middleof playing a game,
that activity is paused,that activity goes away. if it was a multiplayergame, that's a great way to causesomebody's game to freeze so that you cantag them or what have you. heads-up notifications are thenew way for important things to get the user's attentionwithout stealing focus away from the app. when that pops up,you can look at it, you can decide to ignore it,you can decide to swipe it away,
you can decide to just pushit back into the notification shade without swiping itaway, or you can act on it by clicking one ofthe action buttons. we're using this for things thatthe user needs to deal with, the user needs to see. so high priority notificationswill show up there. notifications thatinvolve people, we'll talk about thatin the metadata section. similarly aboutnotifications that buzz,
make noise, or that woulduse the full screen intent, which is the way, of course,that phone calls and alarms and things like that would takeover your whole screen just from a notification. let's take a little time andtalk about the lock screen. so this is a big part of l.you saw this in the keynote. we heard you like notifications,so we put your notifications in your lock screen. it's there any timeyou want to look at it.
why would we bother doing this? what is the point of this? pre-l, the workflow ofyour phone going off, your phone buzzingin your pocket is you hear it buzz, you hear itding, you reach in, you take it out of your pocket, you turnit on, unlock the screen, pull down thenotification shade. by the time you've gottenthrough all those gauntlets, you've forgotten whatyou came there for,
and there's some-- five otherthings-- your email was sitting there before you pulleddown your notifications, and you're already distracted. in l, you hear the phone buzz,you take it out and turn it on, and that's it. it's right there. it's completely glanceable foreveryone using an l device. but what about privacy? so for many users,the design that we
showed in the keynote, thedesign i just described, is a perfect trade-off. it's ok for you to allowyour notification content to show up on your lockscreen because that's super useful to you. unauthorized users are still notbe able to get into your phone without authenticating,but that doesn't work for everyone orevery it department, particularly in a bringyour own device scenario.
so we've introducedsomething in l called notification visibility. this is a new privacyfeature for notifications specifically about how theyinteract with the lock screen. it lets apps specify whatis safe to show where. it lets usersspecify whether they care about thislevel of privacy, and device policy canbe involved as well. so to explainthis, i have to dig
into the spheres of visibility. i need an echo, likea reverb for that. spheres of visibility. this is the public sphere. this is all the things anyonecan do with your phone. you can do it, chet can doit if he picks up your phone, the person who picks upthe phone at the bar when you've left it on the bar stool. these are all the things thatyou can do from the lock screen
without authenticating. the circle inside, theseare the private things. these are the things that onlyyou can do with your phone, because you knowhow to get into it. you can authenticate. you can get past thelock screen and get into your notifications, youremail, your apps, your games, your data, yourpictures, and so forth. so in the notificationvisibility world,
we call this central--this ring of the things that only you are supposed tobe able to see-- visibility private. a notification that ismarked visibility private is very much like an androidnotification up until now. that is to say we don'tleak anything about it on a lock screen where theuser has said that they care about this sort of thing. all you show is theicon, and in fact, in l
we also show the applicationname to help fill the space. if you set a notificationto be visibility public, you're saying this notificationhas nothing sensitive. it's completely unobjectionable. it's the weather, right? it's your deviceis low on battery. this is not information thatis personally sensitive. it's safe to showon any lock screen, no matter whetherthe user is concerned
with that level of security. there's a little ring herethat i didn't mention before, which is the things thatare private that you can kind of see onthe lock screen. i told you that in l, wecontinue android's tradition of showing notificationicons, even if you haven't authenticated. so one of the thingsthat you can do now in l, i'll show you anexample in a minute,
is say, if you've got aprivate notification, where the user doesn't want to seeall that sensitive information on the lock screen,you can provide a substitute, apublic version that lets you provide a redactedform of that same notification for a sensitive lock screen. we'll see an exampleon the next slide. i do want to mentionalso that now that we've created all these circles,all these pretty builds
in the slide, there's onelittle spot that's left, which is things that onlyyou know are even there. we didn't have an opportunityto do this in android before, so we've created thethird and final visibility level, which isvisibility secret. if you post a notificationthat is visibility secret, it doesn't appear onthe lock screen at all. so if it'sparticularly sensitive and you would like toget notifications for it
but you don't really wantanybody else to know that it's installed, visibilitysecret is for you. ok, here's thatpromised example. so let's say the user hassaid, this is important to me. they've set up a patternor pin on their phone, and they've said, whenthe device is locked, i want to hide thesensitive notification content from the lock screen. if you have a notificationthat is visibility public,
this is what you seeon the lock screen. i may or may not haveoverseen that on a lock screen somewhere. anybody can seethis notification whether they'veauthenticated or not, whether the user caresabout security or not. this is safe for everyone. chet haase: i don't think so. dan sandler: well, sothis is why you would say,
maybe this is somethingthat's visibility private. a chat app is thesort of thing that maybe is supposedto be personal. chet haase: should have been. dan sandler: should have been. really. you should thinkabout that next time. so if you have a visibilityprivate notification on a lock screenwhere the user has
said hide sensitivenotification content, this is the experience you'llsee by default under the l developer preview-- icon,app name, nothing else. so if you as an app want toprovide a better experience, you can provide thatredacted version. you can create a publicversion of the notification, you say setpublicversion,you construct a whole newnotification object that is a substitute for thatone to be shown only
on the lock screen. and so in this case,we've corrected, we've changed the appname a little bit. we've added an exclamationmark because that makes people feel cool. and we've actuallygiven the user some interesting information. you have a new message. it's not simply something ishappening from this app, which
could be i have a syncproblem, or you need to pay $5 or whatever, it'sactually giving you a little bit of information, butit's not sensitive information. so it's compatiblewith the user's wishes. and then finally there'sthat visibility secret, and those thingswouldn't show up at all. now of course, if theuser goes and says, well, when my deviceis locked, i actually don't mind seeing allmy notifications there,
then you see the same thing. it essentially is everynotification is public. we talked a littlebit about metadata, about adding peopleand things like that. we actually talked aboutmetadata in kitkat. we've started to introducesome new features to be able to stick moreinformation onto notifications for the benefit of the system uiand any notification listeners that the user may have enabled.
well, we've got more for youin the l developer preview. one of the reasons that we wantto do sorting a lot better. there's limited spaceto show notifications in the past, sorting thingschronologically, maybe with a little bit of priority,it's good-- it's not great. we're doing better inl. so one of the things that you can do in l to makesure that notifications get sorted in the rightway so that users are seeing the mostimportant stuff
first is attach, first ofall, a notification category. we have a numberof categories that are in the notification api. it's a set of essentiallya global partition of notification space. if what you havedoesn't fit, you don't have to set a category. but if your thingis an incoming voice call, or an incoming video call,or you've got an alarm clock
app, high timely team, thenyou can tag your notifications with that category andmake sure that the system ui knows what kindof thing it is. and as we improve l, we will beable to do more things to sort of mute things that arenot relevant to the user's current context. we'll use thatcategory to do it. there's a new extra keyfor the notification extras called extra_people.
this is for you to be able tosay this notification relates to a person that theuser might care about. what do you put in here? you put in a uri fromthe contacts provider, or you put in a telephonenumber if that's all you have and you're not integratingwith android contacts, or you put in an email address. whatever you have, youput in extra_people, and then system ui cantake a look at that
and say, hey, thatinvolves somebody. i might want to boost that up. and the other stuffis still important. the timestamp, whether there'sa fullscreenintent, priority, whether it makesnoise, all these things are going to give thesystem ui new tools to be able to know what thingsare most important to show to the user first. most importantly,though, for developers
is to give thatuser that control. let the user turnoff notifications, let the user change theproperties of notifications. you don't want to run therisk of the user banning notifications using thesystem settings app, a very popular feature that weintroduced in jellybean. and when you do give userschoices about notifications, when you give the usersthat activity that lets them configureeverything, put that activity
into your manifestwith the new intent category listed on the slide,notification_preferences. and we will actually link tothat notification preferences page right from system settings. so if you go intosettings, notifications, you'll be able to jumpstraight into the apps that have notification preferencesthat the user can control. briefly i want to mention thatwear is key to the notification story in l and vice versa.
it's very much likethe l lock screen. it's super glanceable,except with wear it's already out of your pocket. your phone app's notificationsappear on wearables automatically. they get bridged there. you've seen this in the keynote. you saw this as part of the wearunveiling a couple months ago. notification.wearableextenderis the place
where all the apis existfor you to customize the appearance ofthat notification specifically on thewearable device. split it up into multiple pages,group notifications together, and things like that. and as you get into moreadvanced wear development and you're developingapps for wear itself, to run on the watch, you'llsee that it uses notifications there, too.
in fact, the notificationmanager on the watch is the thing thatmanages those cards that you see in the wearable ui. so you'll use the same oldnotifications api to interact with wear from onthe wearable itself. there are i/o sessions that youshould definitely check out. tomorrow at 10:00, the androiddevelopers on the wear team are going to take you throughall these apis in detail, and there's an i/obyte on youtube
about buildingthese uis as well. ok, other important stuff. take it away, chet. chet haase: ok,i took my breath. i'm back. dan sandler: ok. chet haase: soother random stuff that we couldn't actually findan appropriate bucket for. so here it is.
art, we heard aboutthis in the keynote. you've heard about it before. it came out in kitkatas an optional run time, and now it is the runtime. i had thoughtpreviously, oh, it's the one that'senabled by default, and then i wascorrected this week. it is the one. in fact, dalvik?
what dalvik? everything is art,and it's a good thing. faster runtime, the ability toactually pre-compile this stuff so that it's running faster. a lot more intelligencegoing on in that runtime than we had before. and one of my favorites isthe increased capabilities for garbage collection. so less frequent pauses andshorter durations of those
pauses mean a better ability toactually hit your frame rate, particularly for animations. if you had a gc pause of10 milliseconds, which was sometimes common,unfortunately, in dalvik, depending on whatwas going on in the system, that could just push you rightover the boundary of a frame, and you'd skip aframe, and the user would see a hiccupin the animation. now if you have pause timesof around 2 milliseconds,
then it's much moreprobable that you're going to stay within that16 millisecond boundary, and it's not goingto affect your frame rate or those animations. so faster, better,newer, cooler. check it out, in particulargo to the art talk. that's thursday, tomorrowmorning, at 10:00. and also, go to thesandbox, and they're giving an ongoing talk,gc and jank in art.
talk to them. i think there's alsodocumentation that's coming out on the web ifit's not there already. so lots of stuffto check out there. oh, one of my favorite thingstoo is the moving collector. the ability to actuallymove stuff around in the heap, whichcaused some of the delays that we saw before, thatthings couldn't move. so then the heapwould get fragmented,
and then it gotharder and harder to find space for things thatyou needed to newly allocate. well, now we can actuallycollect the heap and move stuff around when thatapp is backgrounded. so very powerful capability,linked with the ability to then take reallylarge objects like bitmap and put those ina set aside space so that the really largeobjects aren't taking up room in the common space where allthe little tiny objects need
to go. so that's part of the reasonwhy we have much smaller pause times for allocations as wellas collections, because it's much faster for usto find the space that we need whenwe actually need it. android tv? dan sandler: there's agreat talk about this, let's see when it is. that's this afternoon.
yes, this afternoon. all about android tv. there's an i/o byte on youtube. the message fromthe android tv team is this-- you saw it inthe keynote-- there's gonna be one app. you're gonna produceone app, and it's going to run greaton every device that calls itself android--phones, tablets, tvs.
when your app is ready forthat 10 foot experience they talked aboutin the keynote, there's an additionalintent category you can toss into your manifestto move your app up so that it shows up on that main panel,that main rail inside the tv launcher ui. you can still launch yourapp if it's not there, but when it's ready forthat tv experience, that's how you move it up.
more info at d.android.com/tv. chet haase: enterprise,the main thing i'd say here is go to the sandboxand attend the talk on frameworks for enterpriseand device management, and ben will giveyou more information about what's goingon for enterprise. they talked aboutit a little bit, sundar was talkingabout it in the keynote, about managedprofiles, the ability
to actually haveyour it department, let's say, in abyod world actually manage what's on the device. and then this divisionbetween the device owner, the person actuallyusing the device, and the profile owner, whichmight be the organization that that user is a part of. and the ability to dothat in enterprises is increasingly important.
there's new apis indevicepolicymanager that enable this, andthere's also an app that they're working onfor pre-l releases that will enable some of thesecapabilities as well. android tools. i spoke to one of thepeople on the tools team and got the brieftake on exactly what's new and excitingin the tool space. and then i said, ok,great, i will talk about it
in the session. he said, actually, we'regoing to talk about it in thursday's so please don't. so go to their sessiontomorrow at 9:00 and learn what's new in tools. play services. there's an excellent sessioncoming on this afternoon. so we have the weardata api, much more information aboutwhat's going on there.
games, capabilities, thecapabilities of quests, as well as savedgames in the cloud. so you can actually save yourshare state between devices much more easily. new drive capabilities,new wallet capabilities, increased analyticsfor your apps. much more that i didn'twant to get into this slide, and they can tell you muchmore about that at the session if you go there.
and some other stuffthat didn't even fit into our othergrab bag category. security. selinux is now inenforcing mode. i would encourage youto go to the "secure development on android" i/o byteon youtube and check that out. get more informationabout that, as well as some other things inthe encryption area that you can learn about.
and also in theprinting area, but i would say just in general,we have a new pdfrenderer capability that allowsyou to take pdfs and then render them as bitmaps. very useful forprinting, and we use it for the print preview, whichis now part of the release. but you can use it in generalif that's a capability that you need inyour application. and most importantly,the preview sdk.
what is it? when is it coming out? tomorrow. so here's some urls. d.android.com, actually /previewis where you can get more information aboutthe preview release, as well as download the bits forbuilding against and download system images for nexus5 and 7 minimally. and that comes outtomorrow, so please
get started developing today,or-- yeah, there's the links. yeah. developed for the previewrelease of l today, tomorrow. and in the meantime, go to allthe i/o sessions, enjoy those, and the i/o bytes online arebeing posted as of today. and please, if you haveissues, please submit them. the sooner the better, becausethe sooner you submit them, the better chancewe're going to have of actually knowingabout them in time
to fix them for thefull on l release. dan sandler: andwe ran out of time. chet haase: we didrun out of time. dan sandler: weplanned it perfectly. we have 17 seconds forq&a. so actually, we're
going to take q&a downstairsin the sandbox on the platform level of the secondfloor, right? chet haase: yes. we'll be there right after thistalk, and thanks for coming.