Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Nils Körber: Case study: Building successful apps for Africa - 4 data saving strategies for Andro

1fa9cb8c7997c8c4d3d251fb5e41f749?s=47 Realm
March 01, 2017

Nils Körber: Case study: Building successful apps for Africa - 4 data saving strategies for Andro

Video: https://www.youtube.com/watch?v=HtBSvPFaCWE

Speaker: Nils, 35, born and bread in Germany, Swedish by heart, South African by choice and true citizen of the Internet.
After IT-consulting for years for many of the blue-chip companies in Europe he decided to put the suit & tie away and exchange them for startup world in beautiful Africa. He was and is involved in building some of the largest eCommerce properties on the continent.
He’s appointed as the CIO to overlook the technical and data side of Ringier One Africa Media which operates Africa’s largest portfolio of online marketplaces.
Music, sun, food, good wine, Weizenbier, inspiring conversations and his beautiful family make him happy.

Abstract: Ringier One Africa Media operates Africa’s largest online marketplaces.
Building applications for consumers on a not just mobile first but mobile only continent comes with unique challenges and opportunities. Limiting hardware, slow connections and expensive data seem like insuperable hurdles first but lead ultimately to great innovation and products.
This session highlights our 4-point strategy to make the data footprint in native Android applications minimal:
Image reduction
API response structure
Push Messages
APK size

Twitter Link: https://twitter.com/nilskoerber

1fa9cb8c7997c8c4d3d251fb5e41f749?s=128

Realm

March 01, 2017
Tweet

Transcript

  1. Building successful apps for Africa Nils Körber nils@oneafricamedia.com @nilskoerber

  2. Hi, I’m Nils

  3. - born in Germany - first business with 18 -

    IT consultant for corporates - 2005 first time in Africa - 2007 move to South Africa - involved in multiple African startups - ex-Rocket - ex-Nasper - CIO for ROAM
  4. - Ringier One Africa Media - marketplaces in Africa -

    4 business areas - ±400 employees - 21 businesses - 12 brands - 10 countries
  5. None
  6. ROAM | Brands

  7. - Africa has 52 countries and forms the most of

    the land mass of the world - It already has a larger middle class population than India - By 2040 it will have a larger workforce than China - By 2050 two billion people live on the continent - Africa has more people aged under 20 than anywhere in the world
  8. None
  9. None
  10. - ± 1 Billion cellphone connections - basically no landlines

    - ±30% Internet penetration - ±80% mobile traffic - ±30% Opera Mini - still many feature phones - Basically no iOS but Android only
  11. None
  12. None
  13. Image reduction API response structure Push Messages APK size Data

    Savings - 4 point strategy
  14. Pigiame 2017 App

  15. We have optimised using the following strategies - Image format

    - Image size - User defined data profile Image reduction
  16. - WebP > PNG - WebP < PNG - CloudFlare

    Polish Image reduction - image format CloudFlare polish -> https://blog.cloudflare.com/a-very-webp-new-year-from-cloudflare/
  17. - Important to serve an image to the app in

    the correct size - Tricky with Android’s support for multiple device densities and various screen sizes - Image microservice to dynamically create different size variations for the images - This allows us to easily serve the correct size of the image Image reduction - image size
  18. - Data saving settings in app - User to choose

    between full, medium, light version Image reduction - user defined data profile Full Medium Light Settings
  19. - We have separated our data into data the rarely

    changes and data that changes often - Utilizing push notifications to trigger data updates for the data that rarely changes saves the users from downloading unchanged data. API response structure
  20. API response structure No push With push

  21. API response structure No push With push

  22. - Images - ProGuard APK Size Proguard -> https://www.guardsquare.com/en/proguard

  23. - Vector images wherever possible - allows for the use

    of one image that can scale to any given density, instead of creating one image per screen density APK Size - Images
  24. - Vector drawables Vector Drawable work out the box in

    new versions of Android but the support library is necessary for older versions. With the support library you have to use app:srcCompat instead of android:src in your xml when you specify the file. The changes required in the build file will be inserted automatically if you add your first vector drawable in android studio using File>New>Vector Drawable - Challenges If you want to use vector drawables as something other than src attribute, e.g. DrawableLeft in a text view, you have to use a workaround. You have to wrap the drawable in an inset or a layer drawable. Then you have to tell appcompat that you want to do this by setting a static flag. Symptoms of needing this, forgetting the flag etc. causes app crashes. Vector drawables can't have @color attributes in them, you have to use hex code e.g. #ff22334 APK Size - Images
  25. - Remove unused code and resources - Obfuscation of the

    code which also reduces the size APK Size - ProGuard
  26. - Vector vs PNG -> https://commons.wikimedia.org/wiki/File:Orc_-_Raster_vs_Vector_comparison.png - Obfuscation comparison ->

    http://riis.com/blog/android-obfuscation/ - Proguard setup -> https://developer.android.com/studio/build/shrink-code.html - Density images -> https://developer.android.com/ , https://infinum.co/the-capsized-eight/is-your-android-emulator-just-too-slow - Vector resource -> https://chris.banes.me/2016/02/25/appcompat-vector/ Credits
  27. THANK YOU Nils Körber nils@oneafricamedia.com @nilskoerber