While most users could care less how large an app is, after all they can fit 50,000 songs on their phone. What they care about is how long they have to wait to start using it. It is a critical part of the digital unboxing experience. And you know, everyone loves unboxing videos.
Many apps are downloaded on an impulse. Impulses tend to be short lived. Which means you probably only have seconds to gain the user's attention. The impulse starts before they hit the download button. Which means the time it takes to download the app takes away from the short time someone will be initially interested in your app.
Having bloated apps also have technical disadvantages too. If it's bad enough and you go over the 20MB limit you force users to download over WiFi which is an obstacle. Having resource downloads after the app is installed is preferred but is only acceptable for games.
Fortunately for Android does a lot of work during the compile process to keep package sizes small. There still some steps you can do to make sure that the package size is as small as possible:
- Make sure to obfuscate your app with ProGuard. ProGuard removes unused code, makes it faster, and more secure. The SDK now automatically turns this on. Learn the basics of the proguard.cfg file and use it to tighten your code.
- Use the Android Lint tool to find resources that are not used.
- Use XML shape drawables rather than bitmaps for simple shapes. These also scale very well.
- Don't use custom picture backgrounds, most of the time they cause overdraw problems and look ugly anyways.
- Use PNGs and use small set of colors for your images. Your app will look cleaner and leaner. Also, the aapt tool can optimize PNGs to 8-bit with palette when possible.
- When creating 9-patch drawables, don't apply padding in the png itself. Create a drawable that references the 9-patch and add the padding there.