Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Preparing your app for the next billion internet users - Assaf Gelber, Facebook

298 views

Published on

As presented in Droidcon Tel Aviv 2017:
http://il.droidcon.com

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Preparing your app for the next billion internet users - Assaf Gelber, Facebook

  1. 1. Preparing your app for the next billion internet users Assaf Gelber Droidcon Tel-Aviv 2017
  2. 2. Assaf Gelber
  3. 3. Facebook
  4. 4. Facebook Lite
  5. 5. You are all a very special group of people
  6. 6. Kotlin VS API level 9
  7. 7. Why I'm here
  8. 8. • Convince you that you should care • Explain why this is a hard problem • Discuss high-level tips and directions • Answer your questions
  9. 9. Agenda
  10. 10. • Why you should care • Why it's hard • What you can do about it
  11. 11. • Why you should care • Why it's hard • What you can do about it
  12. 12. Let's play a game!
  13. 13. • 1080x1920 pixel display • 128 GB internal storage • 4 GB RAM • 8 core 2.35 GHz/1.9 GHz CPU • $749
  14. 14. Google Pixel 2 Released: 2017
  15. 15. • 540x960 pixel display • 16 GB internal storage • 1 GB RAM • 4 core 1.2 GHz CPU • Around $250
  16. 16. Samsung Galaxy A3 Released: 2017
  17. 17. • 720x1280 pixel display • 16 GB internal storage • 2 GB RAM • 4 core 1.3 GHz CPU • Around $100
  18. 18. InFocus Turbo 5 Released: 2017
  19. 19. • 480x854 pixel display • 4 GB internal storage • 512 MB RAM • 4 core 1.3 GHz CPU • Around $42
  20. 20. Swipe Neo Power Released: 2017
  21. 21. And they are here to stay
  22. 22. So how can we reason about them?
  23. 23. Year class classification
  24. 24. In what year would this have been a high-end device?
  25. 25. Google Pixel 2 Year class: 2015
  26. 26. Samsung Galaxy A3 Year class: 2011
  27. 27. InFocus Turbo 5 Year class: 2012
  28. 28. Swipe Neo Power Year class: 2010
  29. 29. Let's look at data
  30. 30. Year class distribution in Africa 2009 2010 2011 2012 2013 2014 2015
  31. 31. Year class distribution in South America 2009 2010 2011 2012 2013 2014 2015
  32. 32. Year class distribution in Asia 2009 2010 2011 2012 2013 2014 2015
  33. 33. Year class distribution in Europe 2009 2010 2011 2012 2013 2014 2015
  34. 34. Year class distribution overall 2009 2010 2011 2012 2013 2014 2015
  35. 35. Over 50% of people worldwide are on 2012 and under!
  36. 36. Let's look at networks
  37. 37. Percent of users on 2G networks India Africa S. America Middle East Europe N. America 77% 67% 38% 52% 26% 10% Source: GSMA Intelligence - Global Mobile Trends 2017
  38. 38. 36% are on 2G overall Source: GSMA Intelligence - Global Mobile Trends 2017
  39. 39. But not all networks are created equal
  40. 40. And not all data packages are priced equal
  41. 41. Let's look at new users
  42. 42. Emerging markets will account for over 90% of new mobile subscribers globally by 2020 Source: GSMA Intelligence - Global Mobile Trends 2017
  43. 43. But do I reaaalllly need to build for them?
  44. 44. Yes!
  45. 45. Yes! Well, kind of.
  46. 46. • Why you should care • Why it's hard • What you can do about it
  47. 47. • Old devices are old • New devices are also old
  48. 48. Usage is completely different
  49. 49. • Turn off data when not in use • Save content when on WiFi for later • Install apps by sharing APKs over bluetooth
  50. 50. Design for new users
  51. 51. Let's play another game!
  52. 52. Round 2
  53. 53. Designing for new internet users is hard
  54. 54. Designing for flaky networks and devices is also hard
  55. 55. • Why you should care • Why it's hard • What you can do about it
  56. 56. One simple rule
  57. 57. 1. Measure everything
  58. 58. Easy, right?
  59. 59. Allow me to expand
  60. 60. • APK size • Storage and caches • Runtime perf • Network
  61. 61. Let's talk about Facebook Lite
  62. 62. Client ͍ Proxy ͍ Server
  63. 63. • Client connects to a proxy • Proxy knows everything • Proxy does everything
  64. 64. Client is very thin
  65. 65. • APK size • Storage and caches • Runtime perf • Network
  66. 66. Quite easy to measure and monitor
  67. 67. Important for a number of reasons
  68. 68. • Mobile data availability • Network failures • Size on disk
  69. 69. Use these:
  70. 70. • ProGuard minification & dead code • ReDex dex optimizing • Resource shrinking • Multiple APKs
  71. 71. Consider these:
  72. 72. • Vector drawables • Downloadable fonts • Alternative build systems
  73. 73. Facebook Lite?
  74. 74. Almost no resources in APK
  75. 75. No Optimizations 8.1 MB With Optimizations 1.6 MB
  76. 76. • APK size • Storage and caches • Runtime perf • Network
  77. 77. Measuring used to require ugly hacks
  78. 78. StorageStatsManager solves that in API 26 ¯_( )_/¯
  79. 79. Users are very aware of what is on their device
  80. 80. • Make downloaded content easily clearable • Be prepared for data to be cleared • Sometimes server-side state makes sense
  81. 81. Facebook Lite?
  82. 82. • Proxy is aware of what the client saves • Sends diffs when necessary • Clears things that aren't necessary anymore
  83. 83. • APK size • Storage and caches • Runtime perf • Network
  84. 84. Android GO!
  85. 85. Android Profiler is awesome
  86. 86. Systrace is awesome-er
  87. 87. Find the correct time to run your code
  88. 88. Lazy loading is your friend
  89. 89. But not a silver bullet
  90. 90. Facebook Lite?
  91. 91. A lot of wins came from finding the correct times to execute
  92. 92. • APK size • Storage and caches • Runtime perf • Network
  93. 93. Measuring requires a bit of effort
  94. 94. But it's possible
  95. 95. Usually easier from server
  96. 96. In most cases, images dominate network traffic.
  97. 97. • Scale images to the required size • Pick the correct image format • Find the right time to send images
  98. 98. Size Weight 1280x960 325 KB 480x360 57 KB
  99. 99. 82 percent less data!
  100. 100. Down to 36KB when converting to high-quality WebP
  101. 101. Serialization is often overlooked
  102. 102. • Don't use JSON • Don't use JSON • Don't use XML
  103. 103. Play around with network situation emulators
  104. 104. Try Augmented Traffic Control if you want more control
  105. 105. Facebook Lite?
  106. 106. • Very diligent about what we send • Very diligent about when we send it • Use custom protocol and compress it
  107. 107. Your mileage may vary, of course
  108. 108. A B C
  109. 109. Always Be C Fine tuning
  110. 110. Be part of this growth and help new internet users
  111. 111. Thank you! Assaf Gelber Droidcon Tel-Aviv 2017
  112. 112. Questions? Assaf Gelber Droidcon Tel-Aviv 2017

×