Building for Billions
https://developers.google.com/billions/
1. Connectivity
Optimize Networking
- Prioritize traffic (grab text first, media later)
- De-duplicate network requests (don’t send same request, utilize cache)
- Adjust behavior by connection (handle every possible probability in connection)
Optimize Images
- Serve webp images (BitmapFactory has all you need to convert between image formats)
- Serve dynamic images size (adjust with device’s resolution)
Useful Offline Experience
- Caching
- Image loading library
- Test in airplane mode
developers.google.com/speed/webp
CodePalette, place holder for image
2. Device Capability
Screen Sizes
- Build for small and medium screens (use dp)
- Optimize for ldpi and mdpi
- Test with several emulator configs
Efficient Memory Usage
- Adjust footprint by available RAM
- Avoid long-running processes
Smart Storage Use
- Bounded caches
- Allow install to SD card
- measure via app setting
Backward Compability
- Target sdk 24
- Minimum sdk 14
- Use android support libraries
- Use google play services
RAM utilization : isLowRamDevice(); getMemoryClassic()
Storage utilization : getCacheDir();
3. Data Cost
APK Size
- Images are biggest offenders (SVG for icons)
- Reduce code size, use proguard
- Multi-APK as an option (depend on resolution)
Data Use
- Allow user configurable data use
Set following in build.gradle : minifyable=true; shrinkResource=true
4. Battery Consumption
- Eliminate unneeded wake ups
- Batch network requests
Use GcmNetworkManager API -> has nothing to do with GCM nor Network. It just manage
5. Content
Fast and Responsive UI
- Touch feedback everywhere
- UI always interactive
- Always target 60 FPS
- Consider launch screens
UI Best Practices
- Adhere to material design
- Use design support library
Localization
- Support your user’s locale
- Use appropriate fonts (e.g. Noto)
6. Commerce
Monetization
- Advertisement
- In-app purchase
- Subscription
- Paid app
Local Price
- Sub-dollar prices available in over 18 countries
- Helps offer locally affordable products
SafetyNet : to check whether the device is certified