29.
Keeping Your App Up to Date
Written by Darryl Bayliss
Building a great app requires hard work and determination. Continually updating your app requires not just a firm belief in the original vision, but the discipline to evolve your app as time passes.
Overnight success is a rare thing. Instead, it’s more likely that a trickle of users will download your app; some will uninstall it a few minutes later; and a small few will genuinely find your app useful and use it regularly, perhaps even leaving reviews.
This last group contains the users to which you owe your attention and commitment.
The more you commit to your app, the more value your users will see in the product. Keeping your app up-to-date is an incentive for growing that important group of users. Publishing an app is an achievement, but supporting an app over the years to come is an even greater achievement.
This chapter covers what you need to know when it’s time to update your app, including:
- How to leverage data from Google to target what you should update.
- How to target the latest version of Android, including preview releases.
- How to decide when to drop support for older versions of Android.
Following Android trends
Data that can help you make an informed decision is invaluable in helping you make the most of your development time.
There are two sources you can draw on for high-quality data. The first option is the Google Play Console (https://developer.android.com/distribute/console).
Apart from being a portal for app distribution, the console provides metrics about devices that have downloaded your app. This includes the device type and version of Android your users are running.
You’ll dive deeper into the Google Play Console in the following chapters when you deploy your app to Google Play. What you need to know is that it can be a great source of information when deciding on how best to keep your app up-to-date.
If you require less targeted data and prefer a snapshot of the whole distribution of Android devices in the world, Google offers a few dashboards at (https://developer.android.com/about/dashboards/index.html) that detail key metrics:
- Android versions.
- Screen size and density.
- OpenGL versions.
Google generates this information from devices that visited the Google Play Store within the last seven days, so you can rely on the dashboards to provide an accurate portrait of Android within the Google ecosystem.
Android versions
Choosing the right platform to target can lead to building simpler apps since you’re not preoccupied trying to backport features or trying to fallback gracefully for Android versions that don’t support your app’s features.
Looking at this dashboard can help you decide which versions of Android to support. You’ll explore this idea later on in this section.
Screen size and density
Understanding the most common screen sizes and densities can help you decide to focus on the sizes users are using most. Keeping up with the latest trends here can help you shed unneeded assets and keep your APK size slim.
OpenGL versions
OpenGL is a library used in games or graphically intensive apps to render 2D or 3D graphics. It’s incredibly popular due to its portability across platforms.
Depending on the Android device, it will contain a specific version of the OpenGL library. The more recent versions of OpenGL contain more efficient and newer ways of rendering graphics, although OpenGL is also backward compatible.
It’s useful to know about the distribution of OpenGL across devices if you’re a developer trying to port a PC game to mobile, for instance. It gives you an indication as to whether your OpenGL code will be compatible or not.
How you use the data, provided by Google, to focus your development efforts depends entirely on your personal goals for your app.
Once you’ve decided what versions of Android to support, you’ll have to decide if it’s worth adding support for newer versions of Android, and whether it makes sense to drop support for older versions. In the next section, you’ll see what it means to keep up with the latest version of Android.
Managing Android updates
As a good developer, you want to make sure your app runs on the latest and greatest version of Android. Major updates to the Android OS occur on a yearly cycle and are announced at Google IO (https://events.google.com/io/), Google’s developer conference, where a range of new products and services across the company are showcased.
Google also regularly releases minor updates to Android, containing everything from under-the-hood bug fixes to entire new Android libraries for you to use.
The best way to be notified of upcoming Android updates is to check the Android Developers Blog (https://android-developers.googleblog.com). It’s updated regularly and has lots of information about the current and future direction of Android.
Google also allows developers to download preview releases of upcoming Android versions. This gives developers a chance to fix issues their apps might have with the new versions before the new OS is released to the general public.
Nothing is more disheartening for a user than updating their device to the latest Android release, only to find out their favorite app doesn’t work.
Developers are notified of opportunities to install and test a preview release of Android through the developer blog, or the developer documentation provided on the Android Developer Website (https://developer.android.com/).
Android Developer Previews are available a few weeks in advance of public release. For major updates, Google extends this to a few months, which gives you plenty of time to test your app. You also have you the opportunity to provide Google engineers with feedback on issues you find as you work with the preview version of Android.
Although you should make an effort to update your app to support the latest release of Android, it might not be the end of the world if you don’t. The engineers at Google have done excellent work in making various libraries on Android backward-compatible, which might cover you for a few releases.
The main idea to keep in mind is to keep on top of new Android releases, and how the update may or may not affect your app. Knowing what’s coming in the future lets you adjust your development ahead of time.
Working with older versions of Android
Although there is a lot of support in Android for backward compatibility, sometimes it makes sense to stop supporting old versions of Android and only develop for the newer versions. This is a good strategy in some cases, but it comes at a cost.
Using newer APIs means you expect a minimum version of Android for your app to run. If the API you’re targeting doesn’t exist on an older version of Android, then your app won’t appear in the Google Play Store for devices with older versions of Android.
This is where you, as the developer, need to decide how to support older versions of Android. Fortunately, you have several options.
The bleeding edge approach
The first option is to be ruthless and only support the versions of Android that your app needs. This means your app is guaranteed to work, and you don’t need to consider any backward compatibility for Android versions that don’t support your target API.
Moreover, you free yourself from having to develop and test workarounds for devices that don’t have the APIs you want. It sounds like a developer’s dream, doesn’t it?
The downside is that you’ll shut out vast numbers of users with older devices — users who might still want to download your app and spread the word about it! That’s one of the realities of dealing with fragmentation in the Android world.
The soft decline approach
The second option is to engineer your app so that it degrades gracefully for older versions of Android: newer Android users get the benefit of all your app’s features, while older Android users can still use your app with some functional limitations. This means you keep the market open for your app, and you don’t penalize users on older devices.
The downside is that this approach takes more development effort on your part, as you need to consider how the app reacts on older devices, and whether the app still functions as you intended on older versions of Android.
The backport approach
The third option is to rely on backported features. This involves leveraging third-party libraries or support code you write yourself to support features that older devices wouldn’t normally have. This is the argument Google uses for persuading developers to use the AndroidX Libraries, and many third-party libraries backport their features for the very same reason. The benefits of supporting as many Android users as possible can’t be overstated.
The downside, in this case, is that you’ll need to take the time to learn how to use these libraries in your app, or even write your own code when there’s no clear way to support your app with Google’s or other third-party libraries.
Where to go from here?
The decision to drop older versions of Android, or to invest the time to support them, depends entirely on the kind of app you make, what your user base looks like, and the amount of effort you want to put into app development.
Think about the future direction of Android, think about what your users want from your app, think about your personal and business goals for your app, and let that drive your choice on which approach to use.
Supporting apps as new versions of Android roll out of Google is the ultimate test of a developer’s commitment. Whether to stay up-to-date with new Android versions or to drop support for older ones, is an important and difficult choice for any developer.
Regular updates show users that your app is being actively developed and supported, which also bodes well for the adoption rate of your app. Leaving your app to stagnate sends a signal that you’ve abandoned development of the app, and users won’t hesitate to look for another solution in the Play Store.