Random Musings on the Android 13 Developer Beta 1

Random Musings on the Android 13 Developer Beta 1

Each individual time Google releases a new developer preview, I rummage by means of
the API distinctions report
the high-amount overviews,
and even the release site write-up,
to see if there are points that warrant far more attention from
builders. I try out to emphasize mainstream functions that any developer
might fairly use, along with issues that may well not
get very as substantially awareness, simply because they are buried in the JavaDocs.

When we get to beta releases, adjustments to the API surface area must start to diminish,
and Android 13 Beta 1 is no exception. The API variances report is a portion
of what arrived in the two developer previews, and even people appeared smaller than in earlier
several years.

What Will Break You, Finally

Go through_External_STORAGE successfully is deprecated. When your targetSdkVersion hits
33 (for most developers, in 2023), you will need to have to quit requesting Read through_External_STORAGE
and start off requesting a person or extra of:

  • Read through_MEDIA_AUDIO
  • Study_MEDIA_Photos
  • Go through_MEDIA_Video clip

Individuals will influence your capability to go through from the regular shared media collections. For other
forms of information, use the Storage Access Framework.

What Might Break You, Sooner

Mishaal Rahman of Esper wrote this 7 days about predictive again navigation.

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

Mishaal goes into a ton of depth,
but the upshot is that it seems that Google wishes to use animations to aid show
to a consumer when a process Back again navigation gesture will send the consumer to the household display screen compared to
undertaking one thing else. If you regulate your individual Back navigation, these types of as by overriding
onBackPressed() someplace, you may well will need to migrate to the new OnBackInvokedDispatcher
approach, and you may want to fiddle with android:enableOnBackInvokedCallback
if you find that “predictive back navigation” breaks items.

As Mishaal notes, ideally this Google I|O session
will clarify points.

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

What Else Modified?

There is an selection now to hear to when the keyguard arrives and goes.
This requires a new SUSBSCRIBE_TO_KEYGUARD_LOCKED_State
authorization. On the other hand, this is created entirely for use by Function_ASSISTANT applications, so it
will not be readily available to numerous developers.

Some noteworthy matters ended up deprecated:

The mysterious SPLASH_Display_Design_Empty value was
renamed to SPLASH_Display screen_Design and style_Solid_Color
and seems to give you a way of opting out of getting an icon on the mandatory splash display screen.

Finally, if you have been using the drive-darkish selections on WebSettings, these were being
deprecated and changed by “algorithmic darkening allowed” methods,
for the reason that people names just roll off the tongue.

What Will come Future?

We are slated to get 3 extra beta releases. I expect there to be couple of API alterations.
If that turns out to be genuine, most very likely this will be the very last “random musings”
article for the Android 13 cycle.

The ultimate launch date is murky, as standard, but most likely is in the August/September
timeframe. Be guaranteed to spending plan time in May well/June (if not sooner) to start enjoying with Android 13 and
tests your app’s compatibility with it.