Random Musings on the Android 12L Developer Preview

Each time Google releases a new developer preview, I rummage through the API differences report the high-level overviews, and even the release blog post, to see if there are things that warrant more attention from developers. I try to emphasize mainstream features that any developer might reasonably use, along with things that may not get quite as much attention, because they are buried in the JavaDocs.

But, let’s face it: this is just really weird.

We have not had a point release since 8.1, and the “12L” naming convention isn’t exactly semantic. Plus, “12L” isn’t the only name — in other places, it is referred to as “Sv2”, presumably short for “version 2 of the ‘S’ name that we stopped using a few months ago”.

What Stands As the Biggest Change For Most Developers

getExternalStorageDirectory() and getExternalStoragePublicDirectory() on Environment are now undeprecated. DATA in MediaStore.MediaColumns is also undeprecated.

I don’t know what to make of this.

What Changed Elsewhere in the API

Frankly, not much. There is a new Spatializer class, related to sound spatialization:

Sound spatialization simulates sounds originating around the listener as if they were coming from virtual speakers placed around the listener.

There are a handful of other related audio changes.

Beyond that, we have:

  • Some accessibility changes related to drag and drop

  • New support for system and pre-installed apps related to two-pane behavior in the Settings app

  • Some tweaks to wallpaper behavior, particular pertaining to foldables

  • Some changes to VoiceInteractionSession

…and that’s really about it.

What Would Be Nice If Google Really Documented Someday

Google changed some of the behavior of media projection. Their explanation of what changed is opaque, but it does link to a new page with a few sections that briefly explain what media projection is.

IOW, I still suspect that I have written more about media projection than has all of Google combined, which is sad.

What You Should Focus On

There is a very good chance that your app only supports portrait mode. If so, and if your app might run on tablets or foldables, pay attention to the letterboxing effects that now get applied if the manufacturer so chooses.

If you had been trying to avoid split-screen mode, you are out of luck on larger-screen devices – instead, you may be letterboxed.

If you would prefer to more actively attempt to support larger screens, activity embedding appears to make it simpler for you to show more than one activity on a larger screen at a time. The API support for this must be in Android 12, though, given the limited changes in 12L/Sv2/whatever this is.

On the whole, though, the average developer does not seem to care much about tablets, let alone foldables or Chromebooks. If you do, then 12L is important to you, and you should start experimenting with the emulator… since it is unclear when there will be hardware support for 12L. Presumably Google’s foldable will ship in the coming months, and apparently 12L will come quickly to the Lenovo P12 Pro, but is unclear how soon other manufacturers will ship 12L to anything of relevance.