The Pros and Cons of Writing to Different Android SDKs
As all seasoned developers know, you've got to make tradeoffs each and every day you're designing or developing applications. Many factors can influence your decisions: deadlines and time pressure, client contentment, quality control and more. There's the never-ending tug of war between getting it done now, and getting it done right. One development decision that can significantly affect your Android development project is which Android SDKs (or API Levels) you target.
Choosing the Android SDKs your application will support is a decision with far-reaching ramifications that should be considered by the whole team. This decision affects:
- Which devices are supported and not supported
- Code complexity and maintenance
- Project schedules
- The size and performance of your application package
- Product management
Effects of Target Android SDK on Device Support
Of course, every developer wants their app in the hands of every user. This is ideal, and sometimes even achievable. But it's not for everyone. Let's look at some of the decisions people might make when it comes to choosing API levels to support.
Some might say: let's only support the latest version. As of this writing, the majority of Android users were not running devices with the newest SDK (less than 1%; see Figure 1 below). By limiting your app support, you cut off most Android users -- sometimes whole countries -- but at the same time, you may benefit from being one of the few apps available to bleeding edge users running what the latest the platform has to offer, thus raking in the early adopters looking for all the shiny new features of their new device.
If you're a developer with an app that relies upon the latest APIs, then this may be a reasonable choice. The new SDKs will eventually percolate throughout the devices and users of the world through upgrades (OTA upgrades or users simply upgrading their devices after dropping them in hot tubs), but you run the risk of having too small of a pool of users for your app to thrive immediately.
Figure 1. Android Platform Distribution (source: Android Target Devices Pie Chart)
Okay, then, let's support everything! Many rookie developers think one should simply target the widest range of platform versions you can, in order to reach the most users and devices. While you want to encourage everyone on earth to install your apps and pay you for the privilege, this is not always as easy as one would hope. If your application is not pushing the boundaries of the platform, you may be able to achieve this. In other words, if your app only needs to use APIs that have been around since Android 1.6, for example, then you may very well be able to achieve this in a reasonable fashion. However, if you are building that state-of-the-art application that relies upon the newest features of the platform, you are basically forced to create a hybrid application that supports the latest SDK features, but also provides alternative functionality for those on older versions of the platform. More on this in a moment.
Here are some common Android SDK version cutoffs, as determined by Figure 1:
- Android 1.6+ (to support most devices available today). This currently represents over 96% of the devices actively accessing the Android Market.
- Android 2.1+ (to support most "newer" devices). This currently represents about 90% of the devices, but certain regions and user demographics are left out.
- Android 2.3+ (to support the "latest" devices only). This currently represents just under 1% of the devices accessing the Android Market.
Although it might seem like you aren't losing many potential customers at the Android 2.1 cutoff -- just 10% -- that accounts for several million devices. In just the fourth quarter of 2010, around 33 million Android devices were sold. You can see that every percent can easily account for quite a lot of users. Determining if they're your users is something that can be done through market research and analysis.
Another aspect of the SDK versions is that some, though not all, devices are upgraded after they've shipped. This has the effect of shifting the SDK support forward. This is a good thing, but it can't be guaranteed. You can't just look at the chart and say, "Well, when those last four percent of Android 1.5 devices are upgraded, we'll never have to worry about Android 1.5 again." Just recently, users heard from a manufacturer that their Android 1.5 devices were, in fact, not going to be upgrade despite hearing otherwise for a long time.
Originally published on http://www.developer.com.
Page 1 of 2