Fabrikant Tech

Tech Specialists

Random Musings on the Android 13 Developer Beta 1

Random Musings on the Android 13 Developer Beta 1

Random Musings on the Android 13 Developer Beta 1

Every single time Google releases a new developer preview, I rummage as a result of
the API variations report
the higher-amount overviews,
and even the release website publish,
to see if there are things that warrant a lot more focus from
developers. I attempt to emphasize mainstream functions that any developer
may possibly fairly use, together with items that might not
get fairly as much interest, for the reason that they are buried in the JavaDocs.

After we get to beta releases, variations to the API surface need to start to diminish,
and Android 13 Beta 1 is no exception. The API discrepancies report is a fraction
of what came in the two developer previews, and even people appeared more compact than in earlier
several years.

What Will Break You, Ultimately

Go through_External_STORAGE correctly is deprecated. At the time your targetSdkVersion hits
33 (for most developers, in 2023), you will need to stop requesting Browse_External_STORAGE
and begin requesting 1 or additional of:

  • Study_MEDIA_Photographs
  • Study_MEDIA_Video clip

All those will impact your skill to read through from the conventional shared media collections. For other
types of written content, use the Storage Entry Framework.

What Could Break You, Quicker

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

(IMHO, “predictive” normally suggests “royally screwed up”)

Mishaal goes into a ton of depth,
but the upshot is that it seems that Google needs to use animations to assist show
to a consumer when a technique Back again navigation gesture will send the consumer to the household display vs .
undertaking one thing else. If you deal with your possess Again navigation, these types of as by overriding
onBackPressed() someplace, you may well need to migrate to the new OnBackInvokedDispatcher
solution, and you might require to fiddle with android:enableOnBackInvokedCallback
if you come across that “predictive back navigation” breaks matters.

As Mishaal notes, with any luck , this Google I|O session
will clarify factors.

BTW, be aware that OnBackInvokedDispatcher moved from android.perspective to android.window
in Beta 1.

What Else Transformed?

There is an selection now to pay attention to when the keyguard arrives and goes.
This necessitates a new SUSBSCRIBE_TO_KEYGUARD_LOCKED_State
authorization. Having said that, this is built exclusively for use by Purpose_ASSISTANT applications, so it
will not be accessible to several developers.

Some notable points had been deprecated:

The mysterious SPLASH_Screen_Style_Vacant worth was
renamed to SPLASH_Screen_Style_Sound_Shade
and appears to give you a way of opting out of possessing an icon on the mandatory splash display.

At last, if you have been working with the pressure-darkish selections on WebSettings, those were being
deprecated and changed by “algorithmic darkening allowed” approaches,
because those people names just roll off the tongue.

What Arrives Following?

We are slated to get a few much more beta releases. I count on there to be couple of API changes.
If that turns out to be accurate, most possible this will be the last “random musings”
article for the Android 13 cycle.

The ultimate release date is murky, as normal, but probably is in the August/September
timeframe. Be certain to budget time in May perhaps/June (if not faster) to get started taking part in with Android 13 and
testing your app’s compatibility with it.