Almost a year ago Google announced a new policy that has big implications for the Android ecosystem: in order to continue publishing to the Play Store, apps must target a recent version of the SDK. Newer SDKs of course bring fancy new APIs, but they also cause some breaking changes in how your app functions. For now, the required version will be Oreo (SDK 26). Looking ahead, Google has stated that when a new target SDK is released, it will become mandatory in a year.
This new policy will require more work from developers but will benefit app users. Previously Google would incentivize developers to use newer SDKs by providing new features and APIs. This made it an easy choice to upgrade. However, starting with Android 6.0, recent versions have required developers to invest more effort to update their apps. We’ll get to that later.
Presumably, Google felt that too many developers were avoiding updating, and they felt the need to intervene. Their stated goal was to “improve app security and performance”. That may sound like something developers would embrace, but in reality developers are required to adapt to new patterns so that the end-users can see the improvements. Notably, runtime permissions will improve users’ privacy, and background processing limitations will improve their battery life and performance.
This policy takes effect on November 1st, so now is a great time to update your app. It is important to mention, though, that after this date no apps will be unpublished from the store. A fair question then is “Why should I bother to update my code now?” Technical debt rarely seems urgent during periods of calm, but it can burden or complicate updates down the road. You may find yourself needing to make a simple change like fixing a typo or updating your terms of service. The additional time to update the target SDK could slow down your process considerably, depending on the features of your app.
It’s also important to mention that this will not impact the backwards compatibility of your app. There is a difference between the target SDK we are discussing in this post and the minimum SDK version. The minimum SDK defines the oldest version of Android that your app supports. For example, if it currently works back to Lollipop 5.0, that will not change.
If it’s been a few years since your application was updated, here are a few of the top changes that will come with updating the target SDK. This is by no means a comprehensive list:
- Runtime permissions: when your app uses a permission that Google has deemed as “dangerous”, it must now request explicit permission from the user. This will pause your activity, so it requires good lifecycle management to handle.
- Doze mode: When the phone enters this state, scheduled background jobs are often deferred, network access is disabled, and GPS scans are disabled. Application logic cannot assume that background jobs are always run.
- Restricted background services: If your application uses background services to poll a server or check location, this will no longer consistently run when the app is considered idle. Apps are put into an idle state several minutes after being put in the background. Google has several alternative solutions depending on the use case. The JobScheduler API and a more compatible wrapper called WorkManager are the most relevant.
Here at E-gineering, we’re well suited to help. We have extensive experience with updating legacy Android code bases. Our team has been developing apps long enough that we’ve seen many patterns that are likely similar to the state of your app. And that helps us know how to migrate with confidence. Because of this experience, we understand the landscape of background and foreground services on Android. Finally, we focus on delivering quality, so we will work to understand your app’s functionality and regression test any required changes.
Most apps on older target SDK versions have additional technical debt to consider. I hope to elaborate on this in a future blog post.
We take app maintenance seriously at E-gineering. Our commitment to serving with excellence and integrity means that you can trust us to provide unbiased guidance on your application and keep your goals front of mind.
“Android Oreo 8.1 logo” by Google is licensed under CC BY 3.0