Random Musings on the Android 13 Developer Beta 1


Random Musings on the Android 13 Developer Beta 1

Every time Google releases a brand new developer preview, I rummage by means of
the API variations report
the high-level overviews,
and even the discharge weblog put up,
to see if there are issues that warrant extra consideration from
builders. I attempt to emphasize mainstream options that any developer
may fairly use, together with issues that won’t
get fairly as a lot consideration, as a result of they’re buried within the JavaDocs.

As soon as we get to beta releases, modifications to the API floor ought to begin to diminish,
and Android 13 Beta 1 isn’t any exception. The API variations report is a fraction
of what got here within the two developer previews, and even these appeared smaller than in previous
years.

What Will Break You, Finally

READ_EXTERNAL_STORAGE successfully is deprecated. As soon as your targetSdkVersion hits
33 (for many builders, in 2023), you will want to cease requesting READ_EXTERNAL_STORAGE
and begin requesting a number of of:

  • READ_MEDIA_AUDIO
  • READ_MEDIA_IMAGES
  • READ_MEDIA_VIDEO

These will have an effect on your potential to learn from the usual shared media collections. For different
kinds of content material, use the Storage Entry Framework.

What Could Break You, Sooner

Mishaal Rahman of Esper wrote this week about predictive again navigation.

(IMHO, “predictive” usually means “royally screwed up”)

Mishaal goes into lots of element,
however the upshot is that it seems that Google desires to make use of animations to assist point out
to a consumer when a system BACK navigation gesture will ship the consumer to the house display versus
doing one thing else. When you handle your individual BACK navigation, similar to by overriding
onBackPressed() someplace, it’s possible you’ll have to migrate to the brand new OnBackInvokedDispatcher
method, and it’s possible you’ll have to fiddle with android:enableOnBackInvokedCallback
if you happen to discover that “predictive again navigation” breaks issues.

As Mishaal notes, hopefully this Google I|O session
will make clear issues.

BTW, notice that OnBackInvokedDispatcher moved from android.view to android.window
in Beta 1.

What Else Modified?

There’s an possibility now to take heed to when the keyguard comes and goes.
This requires a brand new SUSBSCRIBE_TO_KEYGUARD_LOCKED_STATE
permission. Nonetheless, that is designed solely to be used by ROLE_ASSISTANT apps, so it
is not going to be accessible to many builders.

Some notable issues had been deprecated:

The mysterious SPLASH_SCREEN_STYLE_EMPTY worth was
renamed to SPLASH_SCREEN_STYLE_SOLID_COLOR
and seems to provide you a means of opting out of getting an icon on the obligatory splash display.

Lastly, you probably have been utilizing the force-dark choices on WebSettings, these had been
deprecated and changed by “algorithmic darkening allowed” strategies,
as a result of these names simply roll off the tongue.

What Comes Subsequent?

We’re slated to get three extra beta releases. I anticipate there to be few API modifications.
If that seems to be true, more than likely this would be the final “random musings”
put up for the Android 13 cycle.

The ultimate launch date is murky, as ordinary, however in all probability is within the August/September
timeframe. Make sure to price range time in Could/June (if not sooner) to begin enjoying with Android 13 and
testing your app’s compatibility with it.