By Dom Elliott, Product Manager, Google Play
Android has seen significant growth in its first decade due to its openness. There are plenty of devices to choose from, and a thriving developer ecosystem offers apps and games that give them longevity. As a developer, you want to make sure your users have the best possible experience and that your app runs on all of these devices as much as possible. You also want as many users as possible to install your application; You also want them to keep using it; And you don’t want them to uninstall your application for reasons beyond your control. So far, the way Android apps are distributed and distributed leaves much to be desired in all of these areas. I’d like to take a look at some of the challenges developers face and tell you what Google is doing to help.
Look back at the first decade of Android
For ten years, the process of releasing an app on Android has been as follows:
-
Step 1: Write code for your application in an IDE, such as Android Studio.
-
Step 2: When you’re ready to test or release your app, you can build it as APK, the Android app format. As part of building an APK, you can digitally sign it using the application signing key. Signing an application means securely adding a unique certificate to it. This mechanism ensures that you are the only one who can continue to update the application. Here’s how it works: Before updating an app, Android always checks to see if the updated certificate matches the certificate of the app on the device. I’ll elaborate on why I’m talking about this later.
-
Step 3: Upload the signed APK to the test track using the Google Play Console. After testing and tuning is in place, the application is officially released and distributed around the world.
-
Step 4: Google Play will distribute your signed APK (the one you uploaded) to each user’s device upon installation.
This has worked well for years. In fact, people install over 8 billion apps from Google Play every month! However, as you’ll see, this model presents challenges for developers that are hard to ignore.
Hard to ignorebig“Problem
The challenge: Apps are getting bigger. In fact, the average volume of applications has grown fivefold since 2012. It makes sense: you want to add cool features and new content to your app to ensure retention/return and keep your business growing. Devices are getting better and better, and you want to take advantage of those shiny new features. The device ecosystem has become more diverse, so you decide to copy the code and resources in your application to run smoothly on both large and small screens, on different types of cpus, and so on.
There’s nothing wrong with apps getting bigger and bigger if every user has unlimited storage, unlimited data traffic, and ever-present fast connections. Sadly, this is not the case (though we hope to be one day!). . Looking at the figure below, you can see a negative correlation between app size on Google Play and its install conversion rate. This means that as the application gets bigger, its install rate will go down. There are many reasons for this: Many users don’t have enough free space on their devices. Users may be using entry-level devices with less storage, but even for those with high-end devices, the quality of their photos, videos and other media files is increasing and taking up more and more space, shrinking the available space on their devices. Users also don’t want to have expensive data plans while waiting for big apps to slowly connect to the web, especially in emerging markets.
They often uninstall the biggest apps and games
Developers have limited solutions to these problems. You can build multiple APKs for each device configuration in a single release. But when you want to optimize for different screen sizes and CPU architectures, for both 32-bit and 64-bit, things can quickly get out of hand — you could end up building hundreds of APKs per release. It’s painful, and most developers don’t do it. Many people just put everything in a “fat” APK and end up with a lot of unused content on the user’s device. And even if you use multiple APKs, there is no way to optimize for languages. Even if the user only needs one or two languages, you must include all the translation strings for each device in each APK, which wastes more space.
Thus, the dilemma for developers is obvious: increasing the size of your app may result in lower conversion rates and higher uninstall risk; Using multiple APKs can reduce your version iteration efficiency and lead to burnout, and you may spend a lot of time weighing different features to avoid increasing application volume.
Here comes the “small” and “smart” solution
Google doesn’t want developers to face these kinds of difficulties, so we’re working hard to improve. The idea is this: If you upload all the content you need to Google Play, let the Play Store provide it to each user and device on demand. It’s easy, isn’t it? This process can reduce the amount of work you need to support Android’s diverse ecosystem and make your apps smaller in your hands. As you’ll discover later in this article, this new approach also helps improve the user acquisition process: discover, install, engage, and retain users instantly through features and updates.
Smaller installation packages
To fulfill this vision, Google introduced a new App distribution format, Android App Bundle, earlier this year. Here’s how it works in detail:
- Step 1: You can write all the code for your application in a game engine such as an IDE (Android Studio) or Unity.
- Step 2: Now, when you’re ready to test or publish your App, you can build it as an Android App Bundle, the new Android App distribution format. You still have to sign the app so Google Play can verify your identity.
- Step 3: If you haven’t already signed your app, you can choose to sign your app through Google Play. If you want to publish a new application, you can do this in a one-click process when uploading the application. When you decide to do so, Play specifies the first key you used to sign the application bundle as the upload key. It is used for security identification purposes only, and if you lose it, you can contact Google to verify your identity and reset it. For existing apps, you need to visit the App signing page on the Play Console and securely transfer your app signing key to Google Play. Why do you need to do this? Check out step 4 to find out.
- Step 4: When you upload the app bundle to Google Play, Play processes it and generates a split APK signed with the app signing key to support a variety of device configurations and languages. Split APK is an Android platform feature introduced in Android Lollipop. As long as each split APK is signed with the same key, the Android platform treats them as one application. You can think of individual split APKs as “parts” of a complete APK: in order to run an application, the appliance integrates all the parts as a single application.
- Step 5: When the user installs the app, Play provides the base APK (code needed on each device), the language APK (for the language the user uses), and the configuration APK (for the screen size and CPU architecture of the device). This means the device can get the functionality it needs without wasting space. For the device to accept updates, each version of the split APK must be signed using the same application signing key as the original application.
- Step 6: After your app is installed on the device, Play also provides additional split APK as needed, for example, when the user changes the device language or wants to use dynamic features. More specific details will be given later.
We switched to the App Bundle and uploaded our first build in-house within an hour. Swiggy ~ reduced app size by 23% using Apple Bundle
Thousands of popular App developers are using App Bundles to package their apps. Developers using Android App Bundles had an AVERAGE APK size 3.5% smaller than the previously adopted “full APK” (where an APK contains everything needed for all device configurations and languages supported by Android App Bundles). More importantly, for those who have to manage each version, the new format means you no longer need to use multiple APKs for device configuration. Google Play will solve this problem for you and make your life a little easier. The Play Console will soon allow you to upload large App bundles with APK sizes of 500MB. After increasing the size limit, we believe that in most cases you will not need to use additional extension files.
Now that we don’t have to use multiple APKs, the App Bundle saves us time. RedBus ~ reduced application size by 22% using App Bundle
The benefit of the new distribution model and new distribution format is that Google Play can save you time and effort by introducing optimizations during APK generation. One example just announced: support for uncompressed native codebase, a little-used platform feature introduced in Android Marshmallow. Developers using the App Bundle get this feature without extra work.
Prior to Android M, any native code libraries included in your application had to be unzipped from APK. This means that there are two copies of the code base installed on each device: a compressed copy and an uncompressed copy in APK. This leads to wasted space. Starting with Android M, you can read the code base directly from APK in an uncompressed state. Play generally compresses APK more efficiently during the download process than native code bases in APK, so the overall download size is smaller. In order for you to benefit from this without having to worry about upload sizes, the Play Console size limits are changing to be based on the size of the compressed APK that users download, rather than the size of the apps you upload to the Play Console. On average, this optimization alone was enough to reduce file downloads by 8% for apps using native code bases and reduce install sizes on devices by 16%. Just switch to the App bundle and enjoy this amazing reduction in file size!
Resource files in more than 20 languages increased the size of our application and significantly slowed down our access install conversion rate. Things have changed dramatically since we started using the Android App Bundle. Riafy ~ reduced app size by 37% using Apple Bundle
As I mentioned, apps must choose to sign their apps through Google Play in order to use the App Bundle. The application signing key is a mechanism to ensure that updates always come from the same developer after an application is installed. Google cannot use this key to gain additional access or identify information about the developer. It is only used to sign the split APK for installation and update. Google takes security very seriously. Google has a team of engineers and an advanced infrastructure to protect developer keys using the same secure key store that Google uses to protect its own application keys. In fact, it’s safer for most developers to choose to sign the app and then use the upload key to sign each version than to keep the key themselves, because the key can be lost or exposed. If you decide not to use this mechanism and lose your application signing key, you will not be able to update your application, and unfortunately we will not be able to help you in this case.
Dynamic capabilities
Another important innovation of Android App Bundle is its modular design. This means that you can add modules to your application that contain additional application functionality that can be loaded on demand. This is one of the big reasons I mentioned earlier for apps getting bigger: the growth in functionality. Now you can add more features without increasing the size of your application at install time. Using dynamic features is also a safe way to load code dynamically on Android, because dynamic features are scanned and checked in the same way that Google Play Protect scans and checks the app itself.
- Large features you don’t need when installing: You can load these features on demand or tell Google Play to postpone installing them, which means installing them in the background. You can load up to 100MB of functionality this way. Advanced features or add-ons that are not part of the core app experience at release time, such as premium paid features, personalization options, AR features, and so on, are good for this process.
- Audience specific features: You can create them as dynamic features rather than adding features for each audience. For example, a business application can isolate the selling function in a dynamic function module, so that only the buying function is distributed to each user at installation time. A small group of users who need the sales feature (i.e., salespeople) can download and access this feature as needed. Some developers are also exploring dynamic features to avoid having too many different app variants for only slightly different user groups.
- Rarely used functionality: Another use of dynamic functionality modules is for functionality that is rarely or only used once. For example, if your application package includes one-time authentication or credit card scanning, you can effectively avoid increasing the size of your application if you can load it on demand and uninstall it immediately after use. It also avoids taking up unused space during the application’s life cycle — again, larger applications are more likely to be uninstalled.
Instant found
I’ve already talked about how the Android App Bundle helps you keep your applications small and highly configurable with dynamic functionality. The Android App Bundle also supports installation-free Apps. Google Play Instant allows users to try apps and games before installing the full app or game through the “Try now” button, ads and links in the Play Store. Instant is now installed on 1.3 billion devices and is proving to be a great way to drive app discovery and installation, reaching out to users who might not already have an app installed. Vimeo is one of a number of partners that have been successful with Google Play Instant, reporting that 15% of new installs come from their trial features.
This does not mean that every application will easily meet the 10MB size limit. Using dynamic feature modules to progressively load functionality is one of the many ways to dramatically reduce the size of your application. The 10MB size limit only applies when you push installation-free bundles of applications to production, so you can test them out before the size limit is exceeded. If you can further reduce the base module and setup free entry module below 4MB, you can activate more exposure to the setup free experience, such as Google Search and any Web links shared through channels such as email or social media. You can also use Android Studio 3.3 Beta to create bundles of apps that support install-free or normal installation.
Faster update speed
The last thing I want to talk about is keeping your apps up to date. The final step in attracting and retaining an audience is to make sure they have all of your latest features and patches. While automatic updates are enabled for many Google Play users, many are not, and others can’t frequently connect to a high-speed Wi-Fi connection and keep all apps updated. The new In-App Updates API lets you detect when an update is available and integrate a customizable online update process that looks and feels like part of your app. When an update is detected, you can prompt users to update it immediately or select a method to notify users of the update flexibly.
Google Chrome is currently testing the in-app update API, and we’ll be rolling it out to more developers soon. It works with any application, so you can use it when switching to the application bundle. If you want good update rates, it’s better to be clear to users about the benefits of updates and, if possible, let them update after they’ve done what they want to do, rather than asking them if they need to update the first time they open your application. When someone opens your application for the first time, they have a specific purpose, and they don’t want to wait for updates.
Smaller, better, faster, more alive
We believe this will make our app ecosystem more vibrant. Let’s look forward to the next decade of Android! Wish you all a smooth and successful development!
Click here to learn more about Android App Bundle
Visit the developer’s official Chinese website for a quick start on Android development!