Glance TV Optimization Part 1: Shrinking APK Size by 65%
Article Summary
Glance TV's engineering team faced a brutal challenge: their Android TV app was 20.6MB and eating 515MB of RAM. Here's how they fixed it.
Tarun Kumar Anchala from Glance shares their systematic approach to optimizing an Android TV app that displays 2K/4K images, live news, and sports. This is part one of a series focusing on APK size reduction.
Key Takeaways
- ProGuard rules alone cut APK size by 25% (20.5MB to 15.5MB)
- Converting PNG to WebP through Android Studio reduced asset size by 60-70%
- Trimmed splash video from 2MB to 800KB for one-time use case
- Standardized to single font family, eliminating redundant .ttf files
- Used resConfigs to exclude unused locale resources from final APK
The team reduced their APK from 20.6MB to 8.3MB (65% reduction), with users downloading only 7.7MB.
About This Article
When Glance TV analyzed their APK, they found that resources took up 77% of the 20.6MB file size. Code minification alone wasn't going to cut it.
The team used Android Studio's refactor tool to delete unused drawable resources and added resConfigs to strip out locale-specific resources that weren't needed in the final APK.
After removing the unused resources and locale configurations, Glance reduced their APK from 20.6MB down to 8.3MB. The actual download size ended up at just 7.7MB, a 65% reduction overall.