Return to Video

Data Transfer Best Practices - Developing Android Apps

  • 0:00 - 0:02
    The most important thing
    you have to remember,
  • 0:02 - 0:05
    is that every time you transfer data,
    no matter how small,
  • 0:05 - 0:10
    the radio could stay powered up
    for nearly half a minute.
  • 0:10 - 0:11
    So every decision you make,
    should be based
  • 0:11 - 0:14
    on minimizing the number of times
    that this happens.
  • 0:14 - 0:16
    But of course there's a balance here.
  • 0:16 - 0:19
    You want to download all the data
    a user is likely to need
  • 0:19 - 0:21
    for the current section,
    in a single burst,
  • 0:21 - 0:24
    over a single connection
    at full capacity.
  • 0:24 - 0:27
    But of course, you don't just want
    to pull down everything
  • 0:27 - 0:29
    wasting battery power and bandwidth
  • 0:29 - 0:31
    downloading data that's
    never going to be used.
  • 0:31 - 0:34
    Now I could go on for hours on this topic,
    but Dan's getting impatient,
  • 0:34 - 0:36
    and you can learn the details
    on how to implement
  • 0:36 - 0:39
    each of these best practices,
    including pre-fetching,
  • 0:39 - 0:42
    batching, and bundling,
    burying you rupdate frequency,
  • 0:42 - 0:44
    and minimizing your payloads,
  • 0:44 - 0:46
    by watching the series
    of Dev Lite videos
  • 0:46 - 0:49
    or reading the developer guides
    linked to in the instructor notes below.
  • 0:49 - 0:52
    Now before I leave it to Dan
    to show you how to implement
  • 0:52 - 0:54
    a sync adapter for Sunshine
    that takes advantage
  • 0:54 - 0:57
    of a lot of the best practices
    I just described,
  • 0:57 - 0:59
    let's consider what the
    best practice would be
  • 0:59 - 1:01
    if you were building something
    like a news reader app.
  • 1:01 - 1:05
    How much data should you download
    when the app is first started?
  • 1:05 - 1:07
    Just the front page of headlines?
  • 1:07 - 1:10
    All the stories and images
    linked to from that front page?
  • 1:10 - 1:13
    Every story available,
    but none of the images?
  • 1:13 - 1:16
    Or every story and every image
    currently available?
Title:
Data Transfer Best Practices - Developing Android Apps
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
UD853 - Developing Android Apps
Duration:
01:17

English subtitles

Revisions Compare revisions