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