English subtitles

← Data Transfer Best Practices - Developing Android Apps

Get Embed Code
10 Languages

Showing Revision 15 created 05/25/2016 by Udacity Robot.

  1. The most important thing
    you have to remember,
  2. is that every time you transfer data,
    no matter how small,
  3. the radio could stay powered up
    for nearly half a minute.
  4. So every decision you make,
    should be based
  5. on minimizing the number of times
    that this happens.
  6. But of course there's a balance here.
  7. You want to download all the data
    a user is likely to need
  8. for the current section,
    in a single burst,
  9. over a single connection
    at full capacity.
  10. But of course, you don't just want
    to pull down everything
  11. wasting battery power and bandwidth
  12. downloading data that's
    never going to be used.
  13. Now I could go on for hours on this topic,
    but Dan's getting impatient,
  14. and you can learn the details
    on how to implement
  15. each of these best practices,
    including pre-fetching,
  16. batching, and bundling,
    burying you rupdate frequency,
  17. and minimizing your payloads,
  18. by watching the series
    of Dev Lite videos
  19. or reading the developer guides
    linked to in the instructor notes below.
  20. Now before I leave it to Dan
    to show you how to implement
  21. a sync adapter for Sunshine
    that takes advantage
  22. of a lot of the best practices
    I just described,
  23. let's consider what the
    best practice would be
  24. if you were building something
    like a news reader app.
  25. How much data should you download
    when the app is first started?
  26. Just the front page of headlines?
  27. All the stories and images
    linked to from that front page?
  28. Every story available,
    but none of the images?
  29. Or every story and every image
    currently available?