Shahid Hussain is a product manager on the Chrome OS team at Google. He is currently focused on improving the app experience on Chromebooks by helping developers and partners improve their Android applications. Shahid joined Google in 2013, and has worked on Google’s first hardware portfolio launch in 2016 and a number of key campaigns driving Chromebook growth. Prior to joining Google, Shahid has held a number of roles across VC, product strategy and product management.View the profile
Stefan works as tech lead on the Android window manager integration into ChromeOS. He also worked on Chrome / ChromeOS (UI, multi user, memory management, etc.) and Google Earth before. Prior to Google he developed at miro / Pinnacle / Avid a realtime 3D video effects engine used in different video editors. Stefan earned a Masters degree in computer science from the University of Dortmund, Germany.View the profile
Emilie is a partner developer advocate working with Android on Chrome OS, Google Play Billing, and pro-audio on Android. Prior to this role, she was a professional contemporary dancer, freelance programmer, and high-school teacher. She earned a BSc in Computer Engineering from the University of Alberta and a BFA in Dance and a BA Honours in History from Concordia University in Montréal.View the profile
About the talk
With the Play Store on Chromebooks gaining traction, developers need to understand how to build high-quality apps and content for the new form factor. Attend this session to learn about adding support for larger screens, mouse and trackpad support, keyboard support (i.e. shortcut keys), free-from resizable windows, and stylus support for devices that have them.
Hi everyone. My name is side. I'm a product manager on the Chrome OS team and welcome to all of you to our session on developing Android apps on Chrome OS. Now we talked about this last year at Ajo. And if you saw that talk today's talk is a continuation What you talkin about the basic briefly and talking about how we've worked for the number of you over the the past year as well as sharing a number of new features that we love to tell you about. Defensible, let's talk about why this matters. So we've talked previously about the success of
Chromebooks with in the education space where we outsell every other device can buy it has really been doubling down on Chrome OS I use hopefully been inundated by ads have a queue for last year and I'm going this year and that's helped drive to Montana can see his face too so much. So thank you for lost year 17% of notebooks sold in the US with Chromebook. Why does it matter to you Android developers? So the headline here is Android apps work on Chrome OS. How does that happen?
What's by the Android framework running inside a container that sits on top of the base of Chrome OS on the full plate those already available. So your app is probably already running on Chrome OS. Ultimately, what we care about is a good user experience operating system itself on pot of that if the apps that uses choose to run and we've been investing heavily in improving a product a nice of you use Chrome OS over the past year have seen evidence of that and system update. So you've gotten many of you who are developing out. We've already been
working to ensure that you're ensuring that the apps work really well on Chrome OS Adobe Roblox Sony E A and many many more have already included Chromebook optimizations in their latest updates on to the Play Store. And that's opening up different kinds of usage and different kinds of Revenue May Allen p.m. For Evernote told us his accuser is a spending four times more time in Evernote, but an average app user. Andrew and David found this from steadfast Innovations. You make a squid out told us that Chromebooks have made up
21% of their revenue over the last 30 days. First of all to begin we're quickly going to review some basics. Ensuring that an app works. Well on Chrome OS come sound to four key differences between Chromebooks and science. Why do screens default landscape window management and different primary input devices keyboard pointer stylus? First widescreen, Springs to Vegas from 10.1 inch on the smaller side 215 in on some of our larger units respond appropriately to resize events. For example
Seconds before landscape landscape device apps need to have a really great landscape experience on so for example pocketcast spins open its navigations menu at arranging items in a grid so they can fill the space available rather than listing items out with white space to the right. Multi window Chrome OS is a multi-window desktop environment the sign easy and Sony Sketch apps in their latest versions on the Play store and now resizable so you guys can work better with these inside our environment. I finally may be the most important keyboard and mouse input
to laptop and use the keyboard and touchpad to the user. So they gravitate towards them as a primary example Dell keyboard accelerators to come and come on SO uses can get around Foster inside the interface and that's especially true for you make war robots built keyboard controls into that game. The game now uses a special manifest flag to get inputs directly from Chrome OS on a Naples sounded wisd control. These are just a few of the app teams who are now
building and testing are apps for Chrome OS on a huge huge. Thank you to everyone many of your here in the audience that we've worked with. We're always looking for apps that look really really great on Chrome OS so that we can show them off and we want Europe to be one of them. Note to talk about some of the latest improvements in Chrome OS for Android app developers. I'd like to hand over to Stefan one of our lead engineer on Chrome OS. Mommy got it on
I'm glad that you could also join for today stock and I'm here to talk about and what you can do in order to improve your application give more for a desktop environment also has some impact on what you are doing and then things you can do over the last year and he really want to show that and we hope that you are actually making best use of it and last of its best practices. So when you will have a better chance the Play Store because you will double up and he will make sure of that. Let's see
because we have now also a tablet only device and well-behaved remove the caption bar so mean to Window Control Box and the controller and windows automatically started full screen so which is of course experience what you expect on a tablet. Fixing a split screen with edit split screen which is why you know that all cells come from ones, but now on a big tablet and a big screen that makes so much more sense. So you can split screen any kind of window which is available on
Chrome OS so it might be well if my big toe might be able to figure out that you are actually running instead screen. We will outside light off. The next thing is get out of picture-in-picture. So it's a full specification according to Android auto and it'll coming soon and you can resize a window. You can replace it with multiple locations and it would be a fairly similar to the one which we are using for web application to spell. So we have also added the Android keyboard replace now
coming soon. Notifications VF overhauled on vacations there looking not now much more like socolor steaming and everything should be much more integrated you have to tap now instead of swiping and but everything is much more integrated into the Chrome OS Thailand itself. And yeah. Pro Audio so we have actually edit Sims M65 beginning of this year. And that's all I don't know if you know that but it's essentially like every six weeks. We have a new release cycle and M65 is out or a sense of Ayo & Meaty is incense Wireless pixel book.
So and USB audio multi-channel audio a audio memory mapped and this is all coming later this year and was that you have actually seen when you were coming in someone playing music here. He was actually using a pixelbook and to show you a little bit more about that. I want to invite political Testament from the founder of them to actually show how this works. Thank you. So you have possibly seen how everything was really real time zoom going to highest visit device and everything is real time. So it's
getting more interesting Advanced things. Now what you can do it to your vacation and oil to make your life well to make the life on Edisto Federal. Well become distant native. I think I had that away last year, but we have of course. I follow up on that one. This is something everybody knows menu exit right has something special right? But the thing is like if you were using the tool kit your eye in the past, it was actually from a I think it was like, I don't know angel cake or whatever Android both back then so means like really ancient stole this play was small and
they actually fit everything on there and it look ugly. It was not meant to be prime time. So we have to change the library to make this much much easier for you to actually get this kind of thing send you put into the item itself than the shortcut means the character and somebody fire keys and you're ready to go well, USAG calls and sexuality Okay, this is where the old but it's the equation. That is something like if you want to do something inside the Shelf you want to change your icon?
Like for example, you're opening a document or what not you want to change the shape of the icon that sells all you want to display them the document with your open. You can do that with this set-top description very simple and very effective. Next thing is if you want to come by and multiple items inside the Shelf into one menu item you can actually put my intent put extra you put the Shelf shortcut to it and you take send any kind of string for a kind of modify which you actually know and you accidentally use it for all the items you want to put into the
same thing. App shortcuts not coming so is this is something which is coming soon and can excess actions and any kind of things. Would you want to do in order to to get to you fast access to sex? Rebekka Bakken. Well, I think many of you since you already doing something for Chrome OS have already seen that there's a back button up in the window controls are well you have also a big fat mineral that has a problem is up to us to on top of each other looks pretty crappy so that you can get rid of it makes it much much nicer and
that helps but there is one other thing at this is I think even more important if you're on a desktop and you're pressing backspace or ask a board navigate your windows suddenly disappears is something which was very unexpected. Please don't do that. So if you can do it, please what you should do as you should actually check if your activity is at the bottom of well at the root of the stick and if it is and you know that your window. Please don't close your window. Please keep it open because it's really really unexpected. I just haven't told you that suddenly all is well. May God
Lifetime management requests from from user switch said well, you know what my application isn't really running multitasking while I have this game I'm playing and I'm also checking my new status and then you said it isn't updating while I'm playing but I would really like to see that. Well, they actually three states there is running their thoughts and their stopped running in post means you are visible on the screen. So which means not that you should actually drop everything and stop that when you're getting a pause know you can continue to run unless you are high
whatever game where you have to have a lot of real time action and whatnot that you maybe want to really pause In most cases you really want to continue running. So please do this and you make a lot of you this much much happy hour. Next thing sharing data while I said already earlier that we have plenty of Windows and all that stuff. Right? So there are all kinds of Chrome OS your window and what not. If you don't specify Global and you're doing a drag-and-drop operation, it will not be dropped on another application. This is an only for you. So in order to allow other
applications to get your data, please specify this flag. And if you are actually getting some data from someone well also check out what you are getting if you're sleepy blindly taking text while you might actually miss out of all the richness of the data which comes with it. So, that's all please check it out as well. And if you're looking at the Clipper what is exactly the same thing you definitely want to have of course all the richness of whatever is being copied and pasted that as well. So was that resizing I was talkin last year about reciting
that it's a really big problem, right? Because resizing looks pretty Swanky on Android in general when you're doing this. So he is a solution for you. This is an application which was written for material design 2.0 and it looks nice on the phone. So when you are doing when you're following the design study from from Material design, they are coming up with this thing for tablet form factor. See you there more information. You can actually see more things and they are getting more stuff. So was it let me show you show demo my
notebook. So so sassy application and you can resize it and it's you can see while I'm resizing it more and more data is logic coming into play and see more stuff is coming poops across the wrong guy. And you see that more and more data is coming in. This is all dynamically happen very fluid without a restart, which is usually the problem right, victimized lights, please. Cast of good news the demo is actually online. You can download that you can test it out yourself. It's going to get up and there's also
an excellent which is actually even showing more so you can also doing animations while you're transforming from one layout into another which is len looking really cool. You should check out the code that for sure. So, how was it being done? Well, first off you need to have a constraintlayout state file. It's like a blueprint registry Century getting all the different layers into into some kind of order when to use which one and then comes the tricky part every of these layouts need to have all UI Elements which you use so if you don't want to see if you want to show it then you should be
height to sing if it's hidden. It doesn't show but it's still in the layout itself. So and by doing this And in on create you will accept trades and the transition Richie want to use when you want to transition from one to another and you said to unconstrained change. The layout Handler you will be able to do the pre layout change Handler which accent is actually like giving the control to the to the choose a layout of and Sew-in side do I take it to you? What he has to do with your own configuration change them being called every time when something changes like the
screen resolution changes or anything like that. And from there you are essentially calling the constraint changed layout Handler to actually let him know what the size is and that's what I didn't do all the work for you. And finally you would actually it inside the Android manifest filed the request that you want to handle all configuration changes for size changes. And with that you are dumb if you want to try it out again try the gold lamp to actually get to stop. So the next thing as zero latency ink,
what does zero latency in means? Well, you have probably had already a pain you were trying to draw something that you see there is a lag between drawing something using the pen and seeing something on the on the device itself. So where is it coming from? Well, first off you have to resend all you have to do the input processing you have to learn to zapcodes. Whatever's application is doing you have to do some drawing with opengl than your ex doing multiple buffering to go see if I could pass ever since I was a composite of HSN compositing actually ever
sing on the Chrome OS site or whatever your brain and I pipeline which might be for 4 images or what not coming out to a hundred milliseconds of delay, which is very very noticeable thing. As of course, you simply remove all the compositing. So now we are down to roughly two frames Which is less than 32 minutes seconds, right? So what if we are heading now also the prediction take to it. Well, then we are really at pretty much zero. So mission accomplished so into that I have an extra hand
it over to power. Hi, everyone. Or I can you guys see what I got up there? So I drew some Spider-Man that's typically what I'm known for at Marvel, but I also do fanos. Did anyone see Infinity War yet? All right, I did too. All right. So what I like about this app is, you know, you can rotate you can draw at any angle, you know how to do layers. This is infinite painter, by the way. So what I've done is Spidey ahead of time and I'm going to Ink on top of them using some of
the inking tools I got to change my color. I'm from the school of thought where Spider-Man should have expressive eyes. And so I'm glad that they did that in the movies. Some people don't like doing the wedding, but I do. It does add a little bit of time to each panel. but It's worth it in the end. And then of course you can add color as well. I put in a layer already. With a a red base and I might add some Shadow to it. One of the other features I like about this so you can double tap to
reset it. And then if you hold and long press it or flip it, so as a comic book artist, I'm always flipping things if I can because it gives you a fresh perspective. Of course, it's all kinds of drawing tools. But you can use some more paint early than others. And what I did was I clipped the shadow layer to the layer beneath it which means that everything I do on this layer will be bounded by the layer below it. one way to save time and of course the other nice thing about the stylus is it has tilt. So in this case, I made tilt o
Depending on which way I hold the pain. It will give me a thick or thin line. I could do this all day. I usually do. Usually this there aren't as many people watching while I'm drawing. You're lucky I'm even wearing pants. And let's finish it off with some spidey sense. Because the phanos is nearby. And he's a malthusian. There we go. What's the high today? Okay. So how is it then so we have an ink over a view which is a new thing which is not yet ready public if you want to get access to its there's a cute rabbits and
sign up for release. So it will actually be at its end to our release notes as soon as we are giving you access to it. So but essentially we have well you can see the coach and it might change a little bit. So my display which is another topic topic because you have a pixelbook for all you might actually get up to 7 screens. I know that I should I felt that as possible. So anyways, but the thing is like what does it mean for you? Well, actually it means a lot because the thing is like many applications are doing stupid things. Sorry, you
are not right what which of the default display right thing is like it's not the default display because what is the default display? You don't know that right? So therefore we have actually if you are then we have thinking that you are a known multi multi display away application. And in this case, we have a special thing for you to make your life easier essentially. 0 is like a visual display which is always a display you are on so and therefore Center
API is is really clear. Everything is exactly as it should be but the thing is like you get this kind of special display so that you are working fine. However, on the other hand, you are actually something after Oro then you would actually get a different treatment and that case you will get the real IDs. So therefore if you are doing these kind of things you should be careful what you are doing. So. And yes one additional thing is if you are actually running an NYC application, you still have the set launch display ID as a function called. So
what you do why you should definitely use the size of the window. So always use your context and try to get to metric some that that is perfectly so and if you want to see any kind of strangers like forcibly removed to a different display or something like then look at on consecration change to see these kind of changes and if you want to wake sleep position yourself think also about settings the set launch this day ID. If you do not want to get to the same screen while your current application is on What do something to us? You shouldn't really assume any saying well
without using your contacts if you're using any kind of display i d i mean trying to get the Depo to say you will get something which is most certainly wrong. So and also don't don't make any assumptions that you actually on the building just because that is definitely wrong and last but not least. I don't assume that you always want to come send display. So presentation API if you are being asked to actually get this to you we are getting that's very soon. And
you said lunch this lady and said launch bounce Richwood exit to pretty much the same thing. Video gaming. So what is they are? So basically we have vulkan support for four examples of pixelbook beginning of the CF 1.1 should be shipping around now and older are also on the way. So what kind is much faster than its on when you're building your own game one? So they have a few things for this let you take care of the rest of you should always use the latest version of the frames and whatnot. They actually fixing their stuff. So if Windows size changes and what
not and they are changing a little bit they will actually fix it for you. So please use the latest one because otherwise your application will fail when you are trying to be resized. So next thing is also use internal is a 64-bit or 32-bit native cold as well. Don't use only because I'm a little bit slower especially on the high-end devices. So when you're running a game application quality control might actually be bad for you depending on what you are doing. So if you have for example multiple surfaces and what not
and you're trying then to squeeze all the latest thing and if you're running into a state that you are using family quadruple buffering because you're being composite on the desktop or something your quality control might actually do something negative to you off and you get some kind of really good behavior before it would be really awesome. Yeah, if you're using a lot of layers like a lot of surface using but not you might also fall out of this and then your quality my dad could drop so therefore if you can
actually do everything in one single layer and set please try to do that instead and and or if we know it gets being resized the state might actually be lost. So please save your state. Best practices and I said, oh, yeah, we're trying to work with Play Store to actually surface applications which are really good for the Chrome OS environment. So therefore if you are doing everything we ask or you will actually get a better rating. So therefore 26 that is definitely something
that is a good thing you I elements venue resizing they should always be inside the screen. So because if you're always having to Samsung and turn the element is outside of a screen that's bad when you're doing resizing definitely try to sing about landscape and portrait pose over orientations are very important make good use of a lot of space because you have a lot of space. So I told you how to use actual components whenever possible in order to save your state or save in two states Our Stars also
be fluid and please Fresh thing that can happen check all that you're not crashing and I'm passing it on to Emily who is talking about all the great to his be there for you. Thank you. There's so many exciting new things for Android applications on Chrome OS and I'm honored to be able to bring them to you three new amazing developer tools to help optimizing application for Chrome OS faster and easier on the first one. I'm you've all been very patient. I'm so thank you for your
patience and a big thank you to the engineering team for making this happen and doing it right in Android Studio. We're pleased to present the Chrome OS emulator. So right in under Studio, you have a full Chrome OS image. You can test out the user flow for Chrome OS and of course testing Optimizer app for Android Android application right in Chrome OS which is awesome. However, if any of you have ever made an Android application That's my joke. But if you do you'll
know there's nothing like testing on a real device, especially a form factor like this or these will be flipping it rotating it tossing it on the bed keyboard input Mouse input midi controllers stylus input. You just you need to test us on real device. So we've made that a lot easier. I'm very happy to present ADB debugging over USB. It's available for your pixelbook and your HP Chromebook X2. The public documentation will be out in a week or two. So please watch as links and more
devices coming soon and it makes development that much easier. Okay, so I said there was three exciting developer tools were announcing and the first two are awesome, but I actually think the third one is even more exciting and I truly truly believe it's going to knock your socks off and we didn't want anyone to go home with cold feet. So we brought some replacement stocks for when they fly off your your feet hear some and if you're in the middle of the audience or the back don't be jealous. There's plenty of socks for everyone and on your way out of the session you can you can pick them
up. We're going to people handing them out. So that sucks right sucks. So I'm going to switch over to the Chromebook for a quick demo. We have a terminal Super exciting terminal you can see I get clone all sorts of exciting things. I clone the code lab optimizing your Android application for Chrome OS which you should check out at the co-op tent there's dinosaurs, but what's interesting about this particular terminal is it's raining inside a full Linux environment.
If you ever fall in its environment, you can come for this next one. You can install an application when it's application like Android Studio. It more exciting than a terminal I guess so here I have the code lab load it up. I'm making those dinosaurs click. I'm adding Dragon drop and I go in here run. Oh, so if you're in the back and you can't see that says Google pixelbook, which means when I press okay, you know, it goes through the Gradle build pushing the application to the device. What's on device?
But you can click all we got keyboard commands, then that's it's pushed it straight to the device so we can program on the pixelbook in Android Studio push directly to the device test drop out and of course you have your log cat there with and all your debugging tools. So this is amazing. And so glad the engineering team. Let me prevent this super exciting announcements. So we're super excited by Linux on Chromebook for going to tell you how to set it up for yourself before I do. We have a lot of questions that office hours. I'm in the car. What's going on behind the scenes? How
does this work? Has it set up so I can give you a brief overview in real life. It's a bit easier but representative box inside there. We have the Android container. This is nothing new is how your Android apps run on Chrome OS today course, what is the newest? We have a Linux VM and we install great applications like tux racer which they wouldn't let me show today. Also Android Studio into that last up which I think is most exciting pushing straight to the app and debugging on device. We need to connect a TV to the Android container do that's quite
simple ATB Kinect command. It's not a secret IP address is the IP address for the a d a d b d Android container on this will be in the public it is in the public instructions already. But here's the protip since he came to our session for some situations is Handy to set up a little SSH tunnel simple SSH tunnel in Chrome OS that will just forward those connections automatically not necessary. It's helpful in some situations. Here's the instructions if you have Here are the instructions if you haven't seen it.
I think we are number one on Hacker News yesterday or something. So that's kind of exciting, please install it on your Google pixelbook coming to more devices soon. We're super excited about it. Let us know how it works. Try it out. So where we at? We have an emulator with ADB debugging over USB. We got Linux on Chromebook running Android Studio what you can do debug and develop on the device and you have socks for those long cold coating night. So your Tootsie stay toasty what's missing nothing right except. I heard a rumor on the way in the some of you
don't yet have a pixelbook what so I'm going to help you out a little bit with that on your way out when you grab your socks you can pick up. A coupon for 75% off a Google pixelbook. Don't forget your socks. They're taking me off the stage. So I'm going to say quickly come to a close as we have two great codelabs. You can do the resizing with animations. That looks great. You can make keyboard input drag-and-drop. Click on the dinosaurs talk to his office hours today fill out the survey. Think you can everyone come back on stage with about we're done. Yes Chinese
Buy this talk
Access to all the recordings of the event
Buy this video
With ConferenceCast.tv, you get access to our library of the world's best conference talks.