The CommonsBlog

The Death of External Storage: Serenity Now

In a rare bit of good news, it appears that Google will apply normal targetSdkVersion rules to the new “scoped storage” in Android Q.

It appears that apps that have targetSdkVersion of 28 or lower will not be affected by the external storage restrictions that exist on Android Q. Previously, such apps would be affected if they were newly installed on Android Q devices. Such apps will have some type of manifest entry to opt into scoped storage, or they will be affected once their targetSdkVersion reaches 29 Q.

This is huge, for two reasons.

First, as Google points out, this gives active developers more time to update their apps to deal with these changes.

Second, this will allow legacy apps — those not receiving updates — to continue working as normal… at least for a while. Google is threatening that all apps will need to use scoped storage on Android R, along the lines of what was threatened with this release. Frankly, unless Google fixes things, that’s ridiculous too. Right now, users would be unable to get at files saved by legacy apps using other apps (via the Storage Access Framework) or even via a USB cable. Similarly, users cannot provide files to those apps, if those apps are expecting them in what Google considers to be inappropriate locations (i.e., nearly everywhere). This would mean that many of those legacy apps would simply no longer be useful. Perhaps Google will address those limitations in time for Android R.

For actively-maintained apps, though, no matter what happens with Android R, you still need to adapt to scoped storage. Next year, your targetSdkVersion will need to rise to 29 Q in order to be distributed through the Play Store, courtesy of Google’s version ratchet. But, you now have about 15 months in which to make those changes, instead of 3.

I am grateful that Google is making this change, and I thank the engineers who advocated for it.

Need a speaker at your Android development meetup? Mark Murphy is available, in person in the Boston/Pittsburgh/DC triangle, or by remote anywhere in the world! Contact Mark for details!