 Hi. Hi, so my name is Rudy. Many of you might recognize me from this weird-looking guy running around there crying about network cables not working yesterday and today. But so anyway, here I am today to talk about something much more closer to what we are here for. And that's mobile Chrome apps. So we all know about HTML5 and how it's not really delivered on the whole promise of amazing, rich-looking apps and rich-looking experiences. And why is that? So what happened to PhoneGap? So the source is now a part of the Apache Software Foundation and it's called Cordova. At the same time, PhoneGap, which is Cordova plus some other tools, is a part of Adobe's suite. And it's been rapidly integrated into their workflow. And of course, as we all know, it's not worked out too well. And there's just one reason why. And can someone throw some inside there? Anybody? Well, you just hit the nail on the head. So yeah, performance. At the end of the day, an Android WebView cannot deliver the same kind of performance as you might see from a native app. It was just not meant for it. WebKit was just not meant to tie into so many devices and access all the different functionalities that they have to offer. All right, so sorry. OK, what about Cordova? When this whole fork happened where Naitobi, the parent company behind PhoneGap, when they were acquired by Adobe, there was a bit of a fork between the open source effort and the commercial effort. So PhoneGap, while it went the Adobe route, Cordova ended up becoming an Apache project. And since then, it's seen a lot of active community involvement. There's been a lot of improvement regarding the whole compatibility with various devices, also regarding compatibility between various Android OS versions. It also now supports a lot of device functions across multiple Android phones. Again, it's not perfect. Nothing in our imperfect world ever is, but it works. It gets you there. OK, so let's take a step back. And can anyone tell me what Chrome apps really are? What's the first thing? Like, what do you know about Chrome apps? Anyone? OK, exactly. So ultimately, both of them are right. So Chrome apps are just web apps. You just write a web app, and you can easily make it a Chrome app that's redistributable on the Chrome app store. It's just got a little extra zing. So there are two kinds of Chrome apps out there. There's hosted Chrome apps, which are hosted on your cloud server and are available through a URL. But they're Chrome apps because they tie into Chrome APIs for a lot of different things. And then there are packaged Chrome apps, which are basically provided as packages that you can install onto your local Chrome book, or on your local Chrome installation, or your Chrome book. An example could be, have any of you worked with Postman, the REST API client? Exactly, so that's a packaged Chrome app. And it's relatively easy to convert existing web code that you have and make it a Chrome app. It's literally a five-minute job. And apart from Chrome apps, apart from the fact that you can run on a Chrome book, it gives you access to a lot of Google APIs, which we'll dive into in another slide. So then let's go mobile. Mobile Chrome apps is like this relatively new project from the Chromium repositories. The idea is very simple. You simply package a Chrome app for Android devices. It's built on top of multiple other platforms. So it uses Cordova. It uses an open source runtime called Crosswalk, which allows you to run HTML5 code in a native manner at blazingly fast speeds on Android devices. Apart from all this, it then gives you the ability to access Chrome APIs for a lot of different things. So you can use Chrome Identity. When you sign in, when you start using Chrome, you're asked to sign in using your Google account. That's called a Chrome Identity. Notifications, so Chrome has desktop notifications, which you can also use in your mobile app. And of course, Google Cloud Messaging, interfacing with the Google API for a lot of other different things, it all becomes natively available if you go this route. So why? I mean, why is it, why do I, I mean, this is obviously a very personalized belief, which is then backed up by benchmarks. But why is it that the mobile Chrome apps project even came about? Because everybody, I mean, we all gave up on PhoneGap, right? We all gave up on HTML for mobile. Like Arvin said over here, it's because web views are broken. Android web views do not support more than 70% of what our phones are capable of today. But at the other hand, the Chrome runtime, it's far more advanced. It works across every device and you're able to access everything, contacts, camera, GPS, NFC, this, that, everything works. And it's optimized. Simple experiment in case. I'm assuming all of you are a hero at DroidCon, so all of you have an Android phone. Just open up WebView and access, you know, a site with a canvas element and then you access the same site using your Google Chrome browser installed on the phone. And, you know, change my name if you do not bang your head while using the WebView. It's that bad. Also, the other part to it is that, you know, Chrome views work on a lot of different other platforms as well, such as iOS and this and that, but let's not go there right now. Okay, so the Chrome app, the mobile Chrome apps code gives you three different tools to work with, which are very, very simple to use. One is the Chrome app dev tool. Essentially, it allows you to quickly deploy changes in your code as static assets onto your phone. So if you, you know, the way you work with Android Studio or Eclipse, you just hit the build button and it quickly builds your app and, you know, hosts it either on an emulator using settings that you've already defined in the virtual device manager or it pushes it out to your phone. In the same way, the CADT allows you to quickly deploy changes in your HTML5 or your JavaScript code onto your Android phone. And thus, you know, make testing a far more rapid experience. Then you have the CCA. It's a command line tool. It's basically an NPM package that allows you to quickly build and test and build different packages for your app. So with the CCA, you can generate new projects. You can, you know, compile code for different Android platforms. Of course, this assumes that you've got the SDKs for different platforms and different API, APIs for Android pre-installed on your system. And then you've got the Chrome Dev Editor, which is essentially a Chrome packaged app. Allows you to quickly write your code in and it gives you a very seamless IDE experience as opposed to writing your code in sublime text or Vim or Emacs, whatever you might prefer. Cool, so let's go for a demo. On a very unrelated note, I find that the best way to learn a foreign language is to learn how to speak it on the street. How do you speak slang? Because that's the closest you're going to be to those native speakers. So I've always had this idea of writing an app that allows you, basically gives you basic slang for multiple languages. So just a second. Okay, I hope everybody can see this and it's legible. Is it? Awesome. That's okay. It's just 1945, like what can you do with it, right? So the app's called Platio. That's basically the Latin word for tongue. Okay, so essentially it's very simple. Now this app is no great shakes. There is nothing going on in this app right now. It was just meant as a very short demo to show you guys what's really possible with Chrome apps. Going forward, there's a lot that you can do with Chrome apps and we'll go in there. So if this looks too shabby, I am the culprit, but forgive me for doing so. Okay, so essentially this is written using a combination of HTML5 and JavaScript. Uses a very basic version of Bootstrap as for theming and styling. So I'll hit French because I'm in a mood for a bit of French. So you know, simple. This is basically an HTML5 container style using Bootstrap CSS themes. I can do anything there. I can add a media player. I can add text. I can add grids. As of now, this is just plain HTML code. There are no MBC or MB star frameworks inside this. Again, the way you have activities and what's that other thing called? Fragments in Android development. No such thing for this exists. But that doesn't stop me from using an existing MB star framework, such as Backbone or Knockout or whatever suit your fancy to write apps here because at the end of the day, it's all going to get compiled into a native wrapper. Okay, the one thing that is broken as of now in mobile Chrome apps is media players. Try as I might. I just cannot get that recording to work. So that's basically me trying to say those, yes, sorry. Oh yeah, that's cool. So that's basically the recordings all about me trying to say those phrases in French. But for some reason, rich media is broken in mobile Chrome apps. And if anybody would like to contribute, well, all yours. So yeah, this is how it works. You can have any, basically you're limited only by your CSS styling. If you can style it in CSS, you can do it here. That's all. Okay, so just a second. All right, so how do you go ahead from here? Cordova, now since the Chrome apps project is built on top of Cordova, the entire devices API is available to you. You can pull contacts, you can pull photographs, you can take photographs, you can access the devices and build GPS sensor, accelerometer, anything, anything that the device has, you can do it. If it had a torch, you could probably light the torch. Apart from that, then you've got famous. So again, making really smooth and complex JavaScript animations and UIs can now be easily bought to mobile. And now you don't need to worry about performance because earlier, this may not have worked in WebView, but it's going to work flawlessly out of the box like a charm using Chrome views. And then, you know, like, I believe there was a talk on parse. There's open source packages like Cloud Engine. So you can quickly get started with powerful back-ins and write great web apps that run seamlessly on mobile. So yeah, again, it's early days yet, but in my opinion, I think this is probably HTML5 for Android done right in a large extent. And that's about it, I'm done. Thank you very much. And if you have questions, now would be a great time. Yeah, by the way, these are the repositories. So that's the main repo for the mobile Chrome apps project. And if anybody would like to pick up my code and play with it, granted it's not much, but still, there's my repo. So yeah. Hi. Thank you. Oh, hi. Yeah, hi. Sorry, I was, I think, a minute late to your talk. Okay. So I don't know if you covered it earlier, but can I use this? I mean, Chrome is available for iOS as well. Yes. So can I use this on Apple devices? Okay, this is an Android conference. I might just get lynched outside for answering, but yes, you can. I mean, I just want to know whether it is. It is. So basically, it's a good replacement for PhoneGap then. Quite a good. So, okay. Essentially, PhoneGap is nothing but a base platform which you use to tie into different devices. PhoneGap's broken. Normally people these days would use something like Cordova. This is simply something that sits on top of Cordova and makes your experience much, much better. So yes, technically you can use it in place of PhoneGap. And yeah. Right, thank you. Could you show a little bit about how the, you know, development process works as in you mentioned the tool used for compiling it into an app? Sure. So does that support, for instance, Cordova plugins? It does. It supports Cordova plugins. So like I said, so essentially when you install CCA, it's an NPM package. It installs Cordova for you, and it tells you where it's installed. So you can easily go in there and use the Cordova command line tools to install more plugins for more devices or more APIs. CCA is a Google project, or is it a third party thing? Yeah, it's a Google, it's a Chromium project. So it's part of the Chromium people's team. Yeah, hi, I have a question. Yeah. So if you're using this, then that means you can't use native with it at all. OK, so if you, yeah, so if you, let's say you have a native Android package that you can, you know, try to tie in here, yes, that's not going to be possible. But at the end of the day, I'm not going to say it's impossible because this is supposed to tie into native device functionality, right? So if you have a library, there are native Java bridges between, that work between Java and JavaScript. Not to a great extent, it's not really, it's not all that clean. But if it can work, it could be retold. I'm not saying it's possible, I'm not saying, but I'm saying it's not going to be impossible. So currently, I think it's may not, I mean, currently, it may not be in that stage. That's what I'm getting a feeling. Absolutely, so yes, this is all very nascent stuff. Yeah, so any idea about, so I have used WebViews, they're not good, like you can use them inside the application. So if crosswalk or like Cordova, Cordova I think can actually support inside app. But if things like crosswalk, which is faster than Cordova, does it support like all those kind of things? Crosswalk does and okay, so crosswalk is very different from Cordova. Crosswalk is simply like a container that runs JavaScript inside of it. Cordova is what makes crosswalk possible. So yes. So actually just to add to that, I mean, crosswalk is actually like a replacement for WebView, Cordova sits on top of WebView and gives you a lot of APIs to access the device. So you can put Cordova on top of crosswalk as well. Yeah, just from adoption perspective, I was wondering like Chrome on iOS wouldn't have a significant adoption, right? It won't. So, I mean, if you're essentially targeting in Android market, then why wouldn't developers just develop it on native or and... Okay, so again, this comes from a very personal perspective but I'm not a great fan of the Java language. Lynch me outside this hall if you want, but Java and me just don't get along. But JavaScript and I do, like JavaScript and I have a great love affair going on. So yes, for me, this kind of makes sense. Of course, at the end of the day, nothing will ever trump or beat a native app. Let's be honest, this is all just fancy candy. Nothing is ever going to beat a native app in terms of the kind of functionality that you can get out of it or the kind of seamless experience that you can get out of it. But at the end of the day, there will always be exceptions like me who want to do things a little differently just because we're not happy with something that exists and that's why this would work for us. Also another point about Chrome adoption on, so this doesn't assume that you already have Chrome installed. Like it's completely, like this is Chrome embedded inside, just like you have web views embedded inside your app. This is the same thing. So whether or not you have Chrome installed will not make any difference. So yeah. That's it folks. Okay, thank you.