Measuring Android app size with each change

This post has been republished via RSS; it originally appeared at: Microsoft Mobile Engineering - Medium.

App size is crucial for conversions (viewing your app listing to installing it) and retention (keeping your app installed). In a previous post we talked about how at Microsoft SwiftKey, we reduced our app size significantly by adopting various techniques available at the time.

App size reduction at Microsoft SwiftKey

Reduced app size is not a steady state. We have to make a conscious effort to keep it that way. The best way to do this is by measuring app size changes across each change in the codebase — on each PR, ideally. In this post we want to share about an extension to measure app size changes using your CI.

GitHub - microsoft/android-app-size-diff: Android app size measuring in your CI

The repository contains a GitHub Workflow Action and an Azure DevOps Task. If you use either of these CI systems, you can start using it like this:

At the time of this writing, the extension produces a markdown summary of app size changes across the following metrics:

  • apkSize: The raw size of the APK files given as inputs
  • installSize: Estimated install of the APK. As discussed in our app size reduction post, install size is always greater than the raw APK size. This metric gives an estimated install size change between the 2 APKs.
  • dexFiles: Size differences in the bytecode of the 2 input APKs.
  • arscFile: A measure of the size of resources in your APKs.
  • nativeLibs: The size of native libraries in your APKs.
A markdown summary of different app size metrics generated by running the extension

To install this in your CI, head over to:

The extension is cross-platform compatible so it is can be used on Windows, Linux, or Mac agents / runners. We are open for community contributions (through GitHub PRs) and requests to expand support (through GitHub issues) for additional app size metrics, reporting formats, and features.


Measuring Android app size with each change was originally published in Microsoft Mobile Engineering on Medium, where people are continuing the conversation by highlighting and responding to this story.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.