Android apps are cryptographically signed by the developer. This allows the package manager on the user’s device to verify that every app update comes from the same source and that it hasn’t been tampered with. Google Play also enforces this signature check when you upload your APK to the Google Play Console, so that even if someone had your login credentials it would be impossible to send a malicious update without also having access to your private key.

Historically, developers were responsible for generating their own private keys and keeping them safe throughout the application’s lifetime. While this offered a…

How to modularize your app and take advantage of Android App Bundles conditional delivery features.

Co-authored by Dom Elliott and Ben Weiss

Android App Bundle is the new publishing format for Android apps, replacing the monolithic APK. An app bundle is not installed directly. Instead, Google Play generates optimized APKs for each device from the app bundle. Compared to a monolithic APK, the APKs generated from bundles are typically much smaller. The development experience is simpler too, you don’t have to manage and version multiple APKs for different device configurations every release, saving you a lot of time.

The momentum behind Android App Bundle is incredible. Over 450,000 apps and games on Google Play use…

Header graphic by Virginia Poltrack

Over the past few months I’ve been working on addressing some of the feedback I got from developers who were using dynamic feature modules in their apps. A common theme was the lack of good testing support and their speed of development being affected by having to upload an artifact to the Play Store to be able to try the module download and installation flows.

Last year, at Android Dev Summit, I gave a talk with some colleagues working on Play’s Dynamic Delivery, in which we teased a new feature in the Play Core library called the FakeSplitInstallManager that…

Update: Mentions of using ServiceLoader have been removed, as using it for Dynamic Features is no longer supported by R8, and using it without R8 optimizations is not recommended due to performance issues.

In this post I am going to show you how to solve a common problem that arises when using dynamic feature modules in your project: code defined inside them is inaccessible to your base application during compilation… unless you use reflection 😱.

Just the mention of reflection is enough to scare some developers away, but there are a few elegant solutions to safely access what you need…

This article originally appeared on

Post 2 of 2: How fixing crashes and unnecessary wake locks can improve Play Store performance

I’m excited that more and more of you are finding success fixing app quality issues using the Android vitals section in the Google Play Console. Since my first article about Android vitals, we’ve been making improvements to bring you new metrics and features. In this article, I’ll start with a look at what’s new, then take you through how to work with the stuck wake locks and crashes.

What’s new in Android vitals

We announced new Android vital features at Google I/O 2018. …

This article originally appeared on

Post 1 of 2: How fixing ANR events and excessive wakeups can improve Play Store performance

For an app developer there is no better measure of success than happy users, and preferably a lot of them. The best way to achieve this is to have a great app that people want to use, but what do we mean by “great”? It boils down to two things: features and app quality. While the former ultimately depends on your creativity and chosen business model, the latter can be objectively measured and improved.

In an internal Google study, conducted last year, we looked at one-star reviews on the Play Store and found over 40% mentioned app stability as an…

In my previous article I explained why everyone should use ProGuard for their Android apps, how to enable it and what kind of errors you might encounter when doing so. There was a lot of theory involved, as I think it’s important to understand the underlying principles in order to be prepared to deal with any potential problems.

I also talked in a separate article about the very specific problem of configuring ProGuard for an Instant App build.

In this part, I’d like to talk about the practical examples of ProGuard rules on a medium sized sample app: Plaid by…

Update 2018–05–23:
As of
Android Plugin for Gradle 3.2 Canary 15 the workarounds for Instant App builds described in this article are not required.
The build now correctly uses code from all modules for the Proguard steps and then redistributes them back to the feature APKs.

Consider the rest of this article deprecated if you’re using at least 3.2.0-alpha15

Instant Apps and the 4 Megabyte limit

Converting an existing app project into an Android Instant App can be challenging, but it is also a great exercise in modularizing and structuring your project, updating SDKs, and complying with all of the Instant Apps sandbox restrictions that were put…

Why ProGuard?

ProGuard is a tool that shrinks, optimizes and obfuscates code. While there are other tools available for developers, ProGuard is readily available as part of the Android Gradle build process and ships with the SDK.

There are many reasons why you might want to enable ProGuard when building your app. Some developers care about the obfuscation part more, but for me the main benefit is the removal of all unused code that you otherwise ship with your APK as part of the classes.dex file.

An example size distribution chart of an Android app. Data source: Topeka sample app.

There are many tangible benefits of making your code size (and app) smaller, such as increased…

New: support for File-by-File updates in the APK patch size estimator

Reducing APK size has been a hot topic during the past year. There are a lot of reasons why: whether you’re Building for Billions to reach users with less capable devices on costly and unreliable networks or you’re just trying to optimize your app, everyone benefits from smaller APK sizes, faster downloads and shorter install times.

There are different costs related to the size of your app:

  • Size of the file you upload to Google Play (raw APK Size)
  • Initial download size
  • On-device install size
  • Update download size


Wojtek Kaliciński

Android Developer Advocate @ Google

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store