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

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

Realm

March 01, 2017
Tweet

More Decks by Realm

Other Decks in Technology

Transcript

  1. - 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
  2. - Ringier One Africa Media - marketplaces in Africa -

    4 business areas - ±400 employees - 21 businesses - 12 brands - 10 countries
  3. - 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
  4. - ± 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
  5. We have optimised using the following strategies - Image format

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

    Polish Image reduction - image format CloudFlare polish -> https://blog.cloudflare.com/a-very-webp-new-year-from-cloudflare/
  7. - 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
  8. - Data saving settings in app - User to choose

    between full, medium, light version Image reduction - user defined data profile Full Medium Light Settings
  9. - 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
  10. - 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
  11. - 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
  12. - Remove unused code and resources - Obfuscation of the

    code which also reduces the size APK Size - ProGuard
  13. - 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