2016 2018 2019 Make your app work well regardless of how people are connected 2017 2020 47% 42% 37% 33% 29% 32% 32% 33% 34% 36% 21% 26% 29% 33% 36% Source : GSMA Intelligence 3G 4G 2G Share of mobile connections worldwide 100% 80% 60% 40% 20% 0% 1 Billion users will still be on 2G in 2020 1 Billion users will still be on 2G in 2020
Tailor your app experience to variations in mobile speed and connection quality Source : State of the Internet Report, Q4 2015 (Akamai) 15 UK KOR JPN IND ARG 30 22.5 7.5 Mobile Connectivity 0 AUS CHN IDN ZAF EGY SAU BRA CHL 50% 100% 75% 25% 0% VNM VEN % Above 4Mbps AVG Mbps
Help your users manage their data cost 3% AUS UK KOR EGY NGA 6% 4.5% 1.5% Post paid data prices (% of per capita GNI) Post paid data prices (% of per capita GNI) 0% Source : Measuring the Information Society Report 2015 (ITU) 4% 8% 6% 2% 0% HK CHN TH IDN MEX VNM IND BRA NOR HK UK NGA VNM AUS IDN BRA PHL IND EGY MEX KEN
Prioritize traffic - text first De-duplicate network requests Adjust behavior by connection (For example, Youtube) Effective API Design (Avoid Select * ) Optimize networking
Load and Display TEXTUAL data first Load Images asynchronously Prioritize Traffic - Text First Note: Following this would help you in making your users busy in app, and meanwhile you load the data
Send only required fields and avoid unnecessary details Most of the time enemy is Select * query Can optimize APIs with “Expiry date” or “Last updated” date Effective API Design
Optimize images Use Vector Images Serve dynamic image sizes No need to different sets of colored images, apply color filters Placeholder or low-resolution thumbnails can improve user experience
ImageView is 120x120 and image resolution is 1024x768 Purely injustice Image should be downscaled. Use some popular libraries like Glide. They provide caching mechanism, downscaling, thumbnailing, transformations, and what not. Serve dynamic image sizes
Note: Not a performance tip but a good practice in displaying UI Picasso library provides functionality to prioritize the image loading through priority(). priority() takes one of three constants, HIGH, MEDIUM, or LOW Load Images Priority wise
Effective cache controls will dramatically reduce server load Cache data as much as possible, why? Less number of web requests => No use of network radio => Improved battery life Important: It will make user busy in reading something while loading new set of data Important: Don’t assume everyone has high speed connection in the world! Caching Data
APK Size Images are biggest offenders Reduce code size, use ProGuard Set following in build.gradle minifyEnabled=true shrinkResources=true Multi-APK as an option
Analyze Apk To avoid 64K referenced method limit issues with your Dex files Diagnose ProGuard configuration issues View merged AndroidManifest.xml file inspect the compiled resources file (resources.arsc) Ensure your APK contains exactly the things you expect
You would not come to know about crashes being faced by users, until they submit voluntarily Then how to get it automatically? Use tools like Crashlytics, Firebase, Crittercism, ACRA Don’t wait for your Users to submit Crash Reports
Use Version Control System Have developed scalable app Have proper architecture followed Use patterns => MVP / MVVM Use OkHttp, Retrofit, RxJava, RxAndroid More tips/best practices