The March of the API Versions Continues

Two days ago, Google made the 2019 installment of what is likely to be an annual affair: the announcement of API requirements for the year. In particular, a targetSdkVersion of API Level 28 is required for distribution on the Play Store:

  • For new apps starting in August 2019
  • For updates to existing apps starting in November 2019

This is in line with what Google started in late 2017. So, in that respect, Google’s announcement on Thursday is not surprising. And, at this point in time, users of legacy devices are going to be stuck with legacy apps, by and large, given the version ratchet that occurred last year.

However, you still have work to do and things to think about.

AndroidX All the Things!

It appears that 28.0.0 is the end of the line for the Android Support Library. In principle, you can set your targetSdkVersion to 28 and use 28.0.0 for your main dependencies, such as appcompat-v7.

However, Google is focusing their energies on AndroidX and the androidx edition of all of this support code. I see little evidence that any bugs in 28.0.0 will get fixed by patch releases.

And, by late 2020, you will need to have a targetSdkVersion of 29 or higher. That will be the exclusive province of AndroidX, barring a significant change in Google’s approach.

As result, you have about 18 months to get migrated to AndroidX, if you are not there already. And, if 28.0.0 support library bugs aren’t getting fixed by patch releases, you should consider migrating to AndroidX sooner, just so that you can get updated libraries as they become available.

API Levels Beyond the Play Store

Roughly speaking, you can divide the overall Android app ecosystem into three categories:

  • Cases where the user installs an app from the Play Store

  • Cases where the user has a Google Play ecosystem device, but they install some app from another distribution channel (e.g., F-Droid)

  • Cases where the user does not have a Google Play ecosystem device

For the first category, the 2019 requirements are tied to API Level 28.

In theory, the other two categories have no targetSdkVersion requirements. However, in Google’s announcement, they point out that:

  • Some other distribution channels are going to start enforcing a minimum targetSdkVersion (they specifically cite some major app stores in China and a targetSdkVersion of 26 for 2019)

  • Google Play Protect will start complaining about apps with a too-low targetSdkVersion later this year (which affects the second of the three categories listed above)

The Play Protect rules are slightly more complicated. They will raise a warning if:

  • The targetSdkVersion is below the API level of the device, and

  • The targetSdkVersion is below 26 (for 2019, climbing in subsequent years)

If you are set for the Play Store, you will be set for these other requirements as well. If you have a more complex distribution strategy, and that strategy involves different targetSdkVersion values… you will need to determine if your strategy still works.

The announcement also claims:

Existing apps that have been released (via any distribution channel) and are not receiving updates will be unaffected – users will not be warned when installing them.

This wouldn’t seem to be possible. Google has no reliable way to know whether “existing apps… are not receiving updates”, except for those distributed through the Play Store, which already have more stringent requirements. So, it remains to be seen what this will really mean, or if it is merely semi-random PR fluff.

Android developers are used to the annual rite of passage of thinking about the ramifications of the next version of Android… and we’re due for a Q fairly soon. Thursday’s announcement reinforces what we found out 15 months ago: we now have a second annual chore, where we ensure that we can raise our apps’ targetSdkVersion to the required level in time.

Plan accordingly!

Nervous about how the newest version of Android affects your app? Consider subscribing, then asking questions in the office hours chats!