YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Select a Minimum and Target SDK - Developing Android Apps

Get Embed Code
11 Languages

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

  1. Android 1.0 launched in 2008. And in just the six year since then,
  2. there has been 11 new major platform releases. On the Android developer side,
  3. we show the relative number of active Android devices running a given platform
  4. version in this pie chart, because pie charts are awesome. For our purposes
  5. though, you're really better off looking at this as a histogram. If you squint,
  6. you can almost see a vaguely bell-shaped curve, with the oldest releases here at
  7. the left, their popularity dropping off as devices are upgraded or
  8. replaced. The largest proportion of devices are here in the middle,
  9. representing devices about two years old. And the newest platforms,
  10. gaining popularity as new phones are released or upgrades go out,
  11. are here on the right. So with that in mind, the Min SDK acts as your low-pass
  12. filter. Google Play won't show your app on devices running a platform version
  13. lower than its minimum SDK version. So why not just set the Min SDK to one and
  14. support everyone? Generally, you'll want to target as many users as you can, but
  15. there's a cost associated with supporting some of these older versions.
  16. Things like creating different execution paths around deprecated or
  17. update APIs or presenting a different UX to devices with different features. So
  18. you need to balance the opportunity of expanding your audience with the cost of
  19. supporting those new users. Also, remember that each release introduced with it
  20. new APIs and hardware support. So it may not make sense to
  21. make your app available to devices that don't support your minimum feature set.
  22. By comparison, the Target SDK is not a high-pass filter.
  23. It's used only to declare which platform version you've tested on.
  24. An app targeted to a certain API will continue to be forward compatible on
  25. future releases. The platform uses the Target SDK values in case a future
  26. platform makes a significant change to expected behavior. This ensures your app
  27. doesn't break when a user's phone gets upgraded. If you're developing a new app,
  28. there's really no reason to target anything but the latest Android version. And
  29. once your app has been released, make it a point to update your Target SDK and
  30. test as soon as possible when new platform releases roll out so you can take
  31. advantage of every new platform optimization and improvement it has to offer.