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.

Android advanced client architecture

2,487 views

Published on

These are the slides that I gave during Audust GDG meetup.

Published in: Technology
  • Be the first to comment

Android advanced client architecture

  1. 1. Android client architecture – part 2
  2. 2. Previously on Android Client Architecture
  3. 3. Once upon a time...
  4. 4. Why do we need a refresh button?
  5. 5. Questions we asked Why did the user download the app? To read news. To watch videos. What to show? What the user expects. What the user didn't know they could expect.
  6. 6. Content segmentation What's happening right now. Main headlines/ News splash News I'm interested in. General News. Videos.
  7. 7. Content segmentation – football app What's happening right now. Live score / commentary News I'm interested in. “Table” My fav team. General News.
  8. 8. What the user expects? What's happening right now Main title + News splash
  9. 9. What the user expects? What's happening right now Main title + News splash What's Hot
  10. 10. What the user expects? What's Hot
  11. 11. What the user expects? What's Hot Videos
  12. 12. What the user expects? What's Hot Interesting News What's Hot Videos
  13. 13. Let the numbers decide Nt = Navigation time. Fixed. Depends on my design Ct = Content time. Variable. Depends on the content.
  14. 14. Let the numbers decide Nt = Navigation time. Fixed. Depends on my design Ct = Content time. Variable. Depends on the content. Min(Nt / Ct)
  15. 15. What the user did not know he can expect?
  16. 16. Text to Speech News Flash / Live score.
  17. 17. Text to Speech News Flash / Live score.
  18. 18. Text to Speech News Flash / Live score. Only while driving.
  19. 19. Text to Speech News Flash / Live score. Only while driving.
  20. 20. When / How to update?
  21. 21. BG Update What's Hot BG Update Interesting News Other
  22. 22. BG Update What's Hot BG Update Interesting News Other GCM Embedded
  23. 23. GCM Embedded GCM Message can carry 4K payload. Enough for: Title Subtitle Dimestamp Image(s) URL(s) Use Multicast to send to all users.
  24. 24. GCM Embedded Zero latency What's hot is always up-to-date. No loading time Offline
  25. 25. BG Update What's Hot BG Update Interesting News Other GCM Embedded GCM + Back-off
  26. 26. Inactivity Back-off Update at periodic interval Only if received GCM notification. Double the interval for every redundant update
  27. 27. Inactivity Back-off
  28. 28. BG Update What's Hot BG Update Interesting News Other GCM Embedded GCM + Back-off Daily / Bundled
  29. 29. Batch & Bundle updates. Use SyncAdapter to handle all transactions Takes care of offline state. Easy to implement
  30. 30. What's Hot Back-Off App launch Server Interesting News Sync Adapter GCM
  31. 31. What's Hot Back-Off App launch Server Interesting News Sync Adapter GCM
  32. 32. What's Hot Back-Off App launch Server Interesting News Sync Adapter GCM
  33. 33. What's Hot Back-Off App launch Server Interesting News Sync Adapter GCM
  34. 34. Context Driver Updates Is the user standing or walking? Standing user is more likely to use the app longer. Change the pre-fetch amount & frequency accordingly.
  35. 35. Summary Use GCM to drive updates Use SyncAdapter to Batch and prefetch. Context is the king Which content is more important?
  36. 36. Summary What's Hot is always up-to-date Even if we don't have network when the user launches the app Most chances that “my news” / “my team” section as well. Zero latency when launching the app.
  37. 37. Happy Coding

×