Ibrahim is a partner developer advocate at Google focusing on Android Instant Apps, Progressive Web Apps and Web Media. He guides partners for successful integration of Google technologies to build the state-of-the-art mobile and web apps. His previous experience includes software development in quantitative finance at BlackRock, and research in multi-objective optimization and evolutionary algorithms at METU and UIUC.View the profile
Pierre has worked at Google for 7 years, including 3 years on the Google Play Console. His recent projects include work on Google Play App Signing and a new approach to building and publishing Android apps. Pierre has earned a double degree in Computer Science from Telecom ParisTech (Paris, France) and the Pontifícia Universidade Católica (Rio de Janeiro, Brazil).View the profile
Anthony is a Software Engineer on the Play team in London. He works on making app downloads more efficient for users. Prior to that, he worked on Google Maps in Sydney.View the profile
About the talk
An in-depth, technical look at the new modular approach to Android development including how it works, why it’ll help your development, and how to adopt the new format: the Android App Bundle. This session will also explain how Google Play's Dynamic Delivery handles the format and how to integrate with a new set of APIs allowing you to deliver on-demand features.
Hi everyone. I'm here and I'm software engineer on Google Play. Some of you may just be coming from the previous session at the amphitheater which gave an overview of Google Play Dynamic delivery. And how do you spell make apps smaller? MP station technical Deep dive on this new publishing format. We will cover what it contains how to build it how to publish it but also the different ways you can test it. We also cover how Google Play generates and shows the atk's to end users. So that starts with the format of the Android app bundle. The
entry. Bungle it contains the files you already saw me there within atk's such as text files and resources acid native libraries. It's important to realize that the African doll and ATK are two distinct format with two different purposes directly installed on a device. Also contains some method of files that don't end up in the final AP case they just held the Tools apk the right way. Finally stricter than agk the tools can fully understand the Falls bundle.
So they valid ID case No, that's open up when a bundle and looks like inside. If you open up an account or this is what you should expect. So this is look familiar to a lot of people instead of Reinventing the wheel decided to reuse some of the structure of atk's and only modify what we needed to better describe the falls. Do you go through them? It's always have support for having multiple nodules as you may have heard before and after all the names of the modules
in the module into a bundle. Everybody fights is the present new project is a real XML file into apks. You may know me to buy me formats in the app. If you compiled into protocol buffer format, which allows us to transform it more easily. As opposed to a peek-a-boo text files are under Drake 396. The Android resources the assets and the 19th libraries APK the only difference of XML resources, which are also compiled into a protocol vs. Walnut instead of the binary format. The following resources that TV is the resource table
is the equivalent of the following sources that they are SC that you may have seen in your ID case. The extension is in an apricot vs. Walnuts, which again makes it easier for tools to transform it before it's converted into is binary form in the ATK. The epics the TV and natives of TV files at the equivalence of the resource table for assets and Native libraries, so they only in their respective directories. As mentioned before the table the table and the native libraries table describe the type of your app so that
the description of what type of device or user the given values targeted for is a central Concept in Google Play Dynamic delivery is understanding the targeting of file is we conserve to give on user Only The Falls Wendy's and this is what allows us to make app smaller. Reuses the tiger thing that exists in apks you already familiar with this. So I'll just go I'll run through quickly. resources specify for example in the directory name of the results to Target sdpi
devices OU add Sr to take his friend chooses 185 Libras it's the same as the architecture to the directory. No, we realized that's what some of you are a big part of your app. So the app for adding texture compression formats and Graphics API versions and reduce further the size of your apps and games. This is how you do with greater targeted assets directory to identify an acid directory that has targeting then comes with key which defines which Dimensions will Tiger thing for example for the language TCF for texture compression formats Etc. And then
comes the key. Is an example of a directory containing assets for using speaking French? This is another example of an active directory talkative based on the texture compression formats devices that support the format PC one. Now that you know more about the iPhone or format a hand it over to Anthony it will tell you how we use this to serve smaller apps to use it. Text via Viber on the Paris. Just explain to you how we're changing the format of what you publish to the Play store. And now I'm going to explain to
you how would changing the format of what we serve to use it and how we use this to deliver only what is needed for each user. Let me start with Android lollipop the Android platform and behind the disabled part of a single app apks can be installed in different combinations on different devices and I can be installed in one go out front or Pace by play. APK has the same format as a normal APK. They can contain Java code index files Macy's code resources and assets directory and once
he could all be as active as you say where are in a single ipk. And furthermore HD APK says the same package name inversion card with all the other ones that are installed on a device and then you'll be signed with the same kid. Today, let's take a look at how we can take the Android app bundle and generates devices. We stopped by looking in the bundle and finding everything that is coming to all the devices and putting those in the face APK. This would include the Android manifest file and The Dead
Files for instance. Then we generate a different APK for each screen density have been selected by the Android framework on a device with that density. We can also generate a different speed APK for each Daisy architecture containing 95 layers of that architecture. Are we can generate a difference between each language supported by our at putting each languages strings in a different APK not together. Now when we go to serve really need to serve as a substitute Facebook instead of stuffing everything to every device. So I
stole the base APK as well as the X HTP identity Architects and the English language because I only speak English. They can get a bit trickier than that speaks both French and English and he specifies first of those languages in his device settings. So that his device of pixel 2 XL in addition to the city and architecture Smith's we will serve both the French and the English language that to his device. That's supposed to be here then move to Brazil and learn Portuguese. He might then add Portuguese
as a language on his device that when he does this to play Still recognizes this and will attempt to download the Portuguese language for all apps that you split from the device. A list of devices not online of the time then we will down there at the next opportunity. As I mentioned that the starts with the only supported on lollipopping about this covers about 85% of users at the moment, but most of us to Target Friel devices, which is right and still allows us to achieve some of the size savings by generating stand-alone
apks containing specific densities and architecture. We would generate this Matrix of stand-alone APK We briefly consider extending this language. This is well, but we did some of the songs and it got a little bit out of hand. So for now for free all devices by 90 tires. Now when we go to the app, which is the best single APK for device, so if you have my first Android device a Galaxy Nexus, we would the HD PIR you might recognize this because this is similar to what you may have done in the past with multi APK. Looks like this and you
actually don't need to worry about the details about how old is a generator is upload a single app Pandora and then play generates the right and select the right one to serve for each device. And the dimensions we've discussed so far already the beginning and we will also start generating come fix split the take advantage of new platform features and we'll start with supporting uncompressed native libraries on empaths devices. Bellaviva to come up take a look at how much we can reduce app size
by using Whatsapp bundle. Thank you, Anthony. Let me know how your devices savings would you found out that on average have published with f on those are 20% smaller and that is 20% savings. Every time your application is downloaded or upgraded. Now, this is a kid's how we reach to this number. Analyze all the applications in Play store with more than 1 million downloads. And we found out that one string we can save over 95% of their size by using the language
splits. Images this is 45% native libraries. We can save 20% of their sizes. This means if every F upon those we will save approximately 10 terabytes of data per day from app downloads and updates that is 10 million gigabytes or 300 million music videos on YouTube. And on top of that users could see an extra 300 mL of this space for more photos more apps or more music on their devices. So now this book has actual size savings that are some of our Early Access program in Partners. So you going to start with Twitter.
Twitter were already publishing with multi apks before with architecture splits application is translated into a lot of languages and it supports multiple screen densities. They still get lots of savings with publishing with bundles, which is 20% decrease in the size. Plus they don't have to start with multi bikinis anymore. Next one is textPlus which wasn't using multi because before what app on those they issue 26% size savings across all Dimensions with a
plumbus. Jomo's app is half of its original size. And this is because the hero large need to library and they supported multiple architectures in a single APK. That little kids how we can build an app bundle and you can start saving now. The latest Android Studio 3.2 calorie has. Word for building Android app bumble. Now he's going to see a new option to build a bundle in the bills meaning. Did everything is fine at Pondo is easy as well. We're going to just
going to create an iPhone before you sign, which is ready for publishing. For those who prefer come command line or which to integrate with automated Bill systems the new Android and Android plug in for Verizon used to build Android app on those. Please remember this is what you used the example test on the command line to create the APK. 4f on those you going to switch to the bundle command. Similar to the example test bundles has also allow you to build a specific flavor of your application. Wants to build the Divinyls has finishes. It's going to
create a half pound in the office folder with the flavor and the bill type chosen. The bill type build artifact is called bundle. Bundle tasks are compatible with the signing conflict in your bill top griddle files and Willis single you can produce a pain tools that are signed and ready for publishing. It also what app bumbles play will automatically to put your application into architectures screen density and language place by default. You don't need to do any configurations. However,
this is one supposed to have full control over this place. But if for any reason you would like to disable any Dimension you can do so by using the newly-introduced bundle block here. Nokia is going to talk about how to publish your app on though in the play console. Thanks. Alright, so you have built on that bundle. Now, let's look at how you can publish it on Google Play console. First you must enroll in upsetting by Google Play for those who remember we lost his program a Google IO last year when enrolling you said you only transfer you
release key to Google Play. Play spine degeneration atk's before serving them uses. If you keep uploading APK on your prediction test track test track play will not resign the upload a p case against first without affecting you card prediction uses. Once you enroll you can manage to releases just like you did 480 case crazy new release drug the album those in the same location where you currently drop it decays and wait for the airport, once you upload with a blue toads in original release and release out. That's it. And I can't stress
this enough no more multi atk's to deal with Play console has created in the background all the APK for the supported devices for you. No, you have a blowjob bundle and play has done all the heavy lifting for you great, but wouldn't it be nice to be able to have an overview of What play has generated but we have built-in. You told him play console called bundle Explorer. Bundle Explorer let you navigate to uploaded bundles. Let's have a look. On the 1st when you can see of the top right corner this site
savings the game by publishing a bundle, of course, this is different device. So we calculated this using a popular device integration. You will also find the list of device configurations of the total size of the APK service to those devices and see which devices are in each bucket. Going to even search for any supported device my name to download the set of generated apks that is served to that specific device. This will be super helpful when you get to know that bug report specific
device animal to get exactly what the user has gotten were served. So you just search for the name click download We haven't forgotten all of you who use are probably sitting at a d I also available today at The Flash and Rita's publisher Anthony. think they're so we've now learn how to build and publish an Android app bundle. But before we finalize a relay switch do like to do around a text. Christina is not installable. So how do you test it? First United during development
you can install apks field from that bundle directly from Android Studio. So you don't need to do anything here. We know that they don't always have access to the source card in Android studio and how they choose to test their a pond. So let's start with Alex. Alice uses the newly-released internal test track from The Pike, Huntsville. The internal track is similar to Alpha and beta traps that you may already be familiar with but it differs in that there is almost no daylight between
the upload of the bundle. I need the update on the Texas devices really quick turnaround for your to buy testing. Going through the pi console. Alice has the confidence that what the QA team will receive on their device is bite foot by ankle with what and uses will get when you push to release the production. Let's see how Alice Texas are really similar to a hundred QA tester that are eligible for the internal test track the QA tester and then I'll receive the bundles that I uploaded to the
internal test track. That's it. But we know that not all of you have access to the pi console Junior QA Cycles to let see it from Pierre about golf story. Indeed Bob doesn't have access to the play console on his machine before uploading anything, but he still wants to do that. Well, did you buy the atk's from the bundle play used to reproduce and write a few simple commands? Bullet will has a common cold build APK and create what we call and APK set archive
prices. Another comments called install apks text that education archive extract play TK's and install them on that device. Let's see some real command line work. And the reason why bother calling me and saying where he wants to wait onesie ATK said to be created and bypassing the flight connected device will be billed atk's just for the device currently connected to his machine. But wants to generate APK safe for someone else in his team with physical device that hand of the device in a Json
format and you can see here and extract of such file which provides the information about the apis this device supports the supported languages the screen NCT and educate version. who knows who has also come in to generate such device fact file so you don't have to Find it on the device back online. You don't have to write it yourself. You just run to please comment and will deny this fall for you. Also because Bob wants to install this app because I'm a device need to be signed with a private key to the past is the past to the store. All the ATK is contained
in the 80 cassettes will then be signed and directly installable on Bob's device. His knee dislocation of infidelity case command which extract data case from Davie cassettes and install them directly on the connected device easy. So that was a father and his local testing tell you a story. Claire is working for a medium-sized company and they set up a continuous integration tool to build their application everyday the create him for the night if the application installed in multiple devices
and pissed if the application is working correctly. A clear one clear wants to help to create him and she uses the bundle tool again to generate that APK set in the CI. She uses a command that's very similar to what Bob use earlier. But this time she omits the device which contains apks for all possible devices. How to create team was just grab a few cases from the sea I connected device and run the install apks comment. Bundle to level reset device configuration from the attached device from the APK set
and then install them. This is the same selection that played has been serving apks for a given given device. One more thing that's wonderful can do is to generate Universal APK bypassing the universal flag. Universal APK is a single APK that contains the file all the files that matches all the devices because of that. It can be installed in any device really doesn't represent. What's your what's your users will receive when the installer application from Play Store.
This is a nice way to passing a few cage pay user when you don't know what device they're running. Bundle 2 is also the tool used to build an Android app bundle and Gretel uses it behind the scenes. We going to work with the other build change to change to integrate Bill tool so that you can build an Ender that bundle regardless of any to change you may be using And finally, we want to be transparent about hubby generating apks be delivered to your users which is why you're open sourcing bundle. So
you can go today to get up. Com / Google Flash bundle tool to download an executable or build it from the stores. Nokia is going to talk about another way to make your applications even smaller. Mexico we Google Play Dynamic delivery. We also introducing a new way to break up your app in two separate features and deliver only those that are needed for each user. Suppose you have a recipe app and you want to keep the initials download small You observe that uses like to browse recipes only a
small fraction recipe and you notice that this functionality space in your app. What you can do is break out into is on my job and shove it only when needed We can see how it looks for user here. Open the app. What's the weather user wants to add the receipt place a little less at the bottom and you can see that in the background? Mojo is downloaded and installed a few seconds. The module is ready to be used. So which parts of your app should you break out a separate features only a small fraction of the users use that feature that could be a good candidate, especially that picture
text of significant space in your app. Finally consider if users can wait a few seconds before using the future. Once you decided which feature to create this is how it should look like in the app bundle in addition to the base directory there now also separate directories for each of the modules of the app is exactly the same as what format does a base that I'm covered earlier. I need to be educated and play with generate from its for each module. We will produce a set of split consisting of a feature split and come fix this
for that Mojo. Anthony mentioned earlier that speed atk's only introduced with Android lollipop with a specified module most together now that we have covered how Dynamic features work. Let me hand it over to evil will show you how to create them. Instagram To create a dynamic module. All you need to do is download Android sugar 3.2 calorie and use the dynamic feature wizard included click on the new Nemo Gillette Wyoming you choose a Dynamic Martial Arts and typing in your modules name. Andrew pseudo is going to create a new
timing module for you. You can also do the same thing manually by Edison to manifest and Bill. Grillo files going to start with the manifesto of your new Mojo. The first step is to declare this module is the new speed APK of your given name, which is BR underscore BR underscore viewer in this example. The next step is to add the Mojo tag, which is which is going to declare martial law and give it you'll give you got to give a child with no job. This tag is used by Play Store to identify the molecules of your application.
Next music player. This is an on-demand module by adding the on-demand attribute. This means that this Mortal is only going to be delivered to the user's device when the app requests from the Play Store instead of delivering. It is full time course, we now know that's only man modules are only supported on L plus devices. So if you choose to also provide this module in free out devices you going to add the using tag to instruct Play Store Play Store twinkle Des module alongside the bass module and install time when delivering to pre
ELD devices or in the Universal APK Now this located fuel. Grizzle files start with the dynamic module. The first thing is that we are now using a new plug-in called calm. Android Android that feature. The second thing is dependency to this to this Mojo so that we can access the functionality included in the bass Mojo. The only change required in the bill. Video file off. The base module is to add Dynamic features list and put all the dynamic module names into this
list. This is when it's dry griddle to make the resources sword in the base module available to those Dynamic Motors is going to show you how you can use those modules with the can you play core Library? Thanks. So let's take a look at how you go about requesting on-demand modules to be installed when you want them to be installed. Turn order to interact with the Play Store. We're introducing a split install IPI as part of a new library called the plate Coral library. To plattekill library is a Java client library that
communicates with the place to Avaya IP see on the device in the PlayStore Communications Play service to download these on demand modules when you requested. Take a look at Visa card VIP structures using the same task framework that you probably familiar with from the Google Play services apis and 5 is apis on Android. Installation of spitz is coordinated by classical the split in store manager. You construct a request with all the muscles that you wish to download and then you invert start install to trigger the Play Store to download the required for those
requested modules. VIP I also allows you to listen to update throughout the download and install person you can use this to display progress is download progress and progress that waiting for the on-demand Fix-It to download you saw this in the video that Pierre showed what it was downloading address if you want to Blood you need to obtain use a confirmation prior to the download by the time you need to do this whenever the app requests more than 10 and under be downloaded.
However, there is an alternative option for installing these modules, which is that aren't required immediately it for me to eat and we call this the third installation ivr. If you request if you use the simple one-line to request a deferred install of them will be downloaded at a convenient time for the user. This is generally when the user is not using the device and it's charging its home Wi-Fi and because of this we allow you to install large emojis by this API without requiring use a confirmation up to a hundred megabytes in a friendly way to download large on
demand motors for your app. You can also use the split install IPI to manage your on demand models. So you can say which muscles are currently installed. And if you're using no longer need that module you can request for the motor to be uninstalled bring up the persistence pays for your users and reducing the footprint of your app on their device. Now when you go in and stolen on demand module on n+ devices the app does not to need to be restarted. The code is available immediately upon request on the install completing and you
resources and assets are available once you refresh your contacts on there. However on Android L&M is doing splits before I the app to restart if you want to install them properly, but to get around to avoid this we've included a split compact Library which emulate the installation of a split on Eminem Until the app goes into the background and we can probably install it into this pit compact Library means that you act doesn't need to restart and all the things inside this for almost all the things inside. This module are immediately available to your app. You
can set this in a very similar to how you might be familiar with setting out the multidex library in your apps. Finally When You released an update your app play will automatically update Bose bass module and any on demand models that are already installed to the Virgin season 6 the or is it the same version Impala tell us if this is something that I really like about this morning. Let's rock. Let's roll out starting today Android app bundles in Android Studio straight to a 3.2 Canary
and that we had a published the oil uses. So I encourage all of you to try this out and see how much just by switching to the Android app bombing. We will be rolling out modularization to develop over the coming months from today. You can stop building OneDrive app from estudiar Canary and you can publish them to the internal an alpha tracks within the pi console in production tracks as a beta over the coming months. And if you're interested you can register your interest in watch lies ation at the link provided. I miss that. Thank you
everyone for coming. If you have any questions, I you can grab ass off the woods. I don't think we have time right now, or you can grab ass over the next couple of days in the sandbox. Stay just behind the site and then think you have a great night.
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.