App for low-end devices

Making an Android app work on cheap phones and slow data

An app for users outside the big cities was too heavy to install and crashed on low-memory phones, so we shrank it and fixed how it used memory.

The situation

The app served users in tier-2 and tier-3 regions, on budget phones with little memory and metered data. Many never finished the download because the package was too large.

Those who did install it hit out-of-memory crashes on low-RAM handsets. Uncompressed images and audio took up memory they did not need. Many users uninstalled within a day of the first open.

Much of the weight sat in assets and packaging.

What we did

  1. 01

    Audited what made up the package

    We broke the app down by code, assets and native libraries, so we knew what each part cost in download size and memory.

  2. 02

    Reworked the asset pipeline

    Bloated PNGs moved to WebP, with vector graphics where they fit. Audio and image assets were compressed.

  3. 03

    Removed dead code with R8 and ProGuard

    We tuned the shrinking rules so code that was never used stopped shipping.

  4. 04

    Split out features users do not need at first

    Dynamic feature modules deliver heavier parts of the app only when someone uses them, which keeps the first download small.

  5. 05

    Fixed bitmap caching

    We reworked how images were cached and released so memory use stayed lower on phones with little RAM.

What changed

  • The download became far smaller, which matters on metered data.
  • Out-of-memory crashes fell on low-RAM phones.
  • More people finished installing and signing up.
  • The app held up on budget devices with little memory.

Stack

  • Android
  • R8 / ProGuard
  • WebP
  • Dynamic feature modules
  • Bitmap caching