Random Musings on the Android 13 Developer Preview 1


Random Musings on the Android 13 Developer Preview 1

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

I’m not feeling the perfect right now, so I apologize if that impacts the standard of this submit.

What Offers Me the “Time Has No That means” Vibe

12L has not shipped in ultimate kind but, and we have already got a 13 developer preview?

Much more stunning is the timeline, indicating {that a} ultimate version of 13 may
ship as early as August.

My preliminary response to 12L was that schedules slipped, so that they elected to maneuver
tablet-focused objects out of the 12 launch timeframe. Now, I don’t what to suppose.
Nonetheless, it would be best to plan on getting your 13 compatibility testing completed a bit
sooner than you will have needed to in earlier years.

What Makes Me Wish to Choose a Peck of Pickle Pictures

ACTION_PICK_IMAGES is attention-grabbing.
I’m unsure what the benefit is of a brand new Intent motion over having ACTION_OPEN_DOCUMENT
use a unique UI for picture/video MIME sorts. Nonetheless, something to enhance content material entry
for builders is a optimistic factor.

Be aware that the picture picker appears to be backed by CloudMediaProvider objects.
These seem to serve the identical function for the picture picker that doc suppliers serve
for the Storage Entry Framework. In case your app is within the enterprise of creating images out there,
significantly from collections that MediaStore doesn’t index (e.g., cloud), chances are you’ll
need to pay shut consideration to CloudMediaProvider.

What Makes Me Wish to Communicate in Tongues

Per-app language preferences
is a really good enchancment. As I wrote about a month in the past,
builders use hacks to attempt to get this form of habits, and having an official answer
is nice! Even higher is an announcement about Jetpack assist for older units.

Nonetheless, most of my questions from that earlier submit
stay unanswered. For instance, if the system language is English and the app
language is Spanish, and we use ACTION_PICK_IMAGES, what language is utilized by the picture picker?

From an API standpoint, you possibly can carry up the related Settings display by way of
ACTION_APP_LOCALE_SETTINGS.
In concept, you possibly can react to adjustments by way of ACTION_APPLICATION_LOCALE_CHANGED,
however that apparently requires an undocumented READ_APP_SPECIFIC_LOCALES permission. Hopefully, there’s a configuration
change when the app language adjustments, simply as there’s a configuration change when the
system language adjustments. LocaleManager helps you to straight manipulate the consumer’s
choice of language.

What Different Excessive-Profile Issues Are Good to See

If it’s essential discuss to native WiFi units, the NEARBY_WIFI_DEVICES permission
in all probability is a giant assist. This can be a frequent requirement for bootstrapping IoT units, for instance.

JDK 11 assist is sweet.
If it solely goes again to Android 12, it is going to be years earlier than it issues, however it’s nonetheless good.

Programmable shaders sound
promising, if you happen to’re into that form of factor. Equally, when you’ve got had hyphenation
efficiency nervousness earlier than, sooner hyphenation
is sweet, besides that it is going to be years earlier than that enchancment is one thing that’s out
for a majority of units.

And, for the ~148 builders writing tiles, serving to customers add your tiles
is a useful factor.

What Excessive-Profile Issues Make Me Yawn

I’m considerably mystified by “Intent filters block non-matching intents”,
when it comes to what the precise downside is that’s being solved. This doesn’t seem
to be a safety factor, as exterior apps can nonetheless begin your elements — they
simply can not accomplish that by way of a purely specific Intent.

Themed app icons
continues Google’s Materials You initiative. Shade me uninterested.

What Was Rumored However That Google Is Hiding

The Android Useful resource Economic system (TARE) is one more salvo in The Warfare on
Background Processing. Mishaal Rahman studies that it’s there,
however it seems that Google didn’t doc it.

In contrast, POST_NOTIFICATIONS — the permission that it’s essential maintain
to boost notifications — is within the JavaDocs
however shouldn’t be talked about within the required app adjustments documentation. My guess is that
it is a documentation hole. Mishaal studies that
it is going to solely be enforced for apps concentrating on API 33.
If true, this provides builders a 12 months to disregard it, solely to then scramble
on the final minute to cope with the change.

(not you, in fact — you might be studying this weblog submit, so clearly you
are a forward-thinking developer)

Mishaal additionally mentions that the clipboard will mechanically clear,
which is a win for privateness, however actually should be identified to builders
past this weblog submit.

What Makes Me Scratch My Head, However Over There, Not Right here

There may be a brand new NEARBY_STREAMING_POLICY permission.
The underlying coverage “controls whether or not to permit the system to stream its notifications and apps to close by units”
(emphasis added).

There may be additionally canDisplayOnRemoteDevices,
which says “whether or not the exercise will be displayed on a distant system which can or will not be operating Android
(emphasis additionally added).

This makes me surprise what Google is as much as.

What’s Previous is New Once more

Android 12 added a compulsory splash display. Android 13 seems to make that much less obligatory:
a launcher might attempt to use setSplashScreenStyle()
with SPLASH_SCREEN_STYLE_EMPTY
to maybe inhibit that splash display. Not less than, that’s how I interpret this API.

What Requires Higher Penmanship Than I Possess

Handwriting is getting system-level love, resembling supportsStylusHandwriting.

This issues little to me, as my handwriting sucks.

What Are Different Good Modifications

There’s a new, non-harmful READ_BASIC_PHONE_STATE permission.
It’s unclear what you get entry to with that permission, however READ_PHONE_STATE
appears overused.

Talking of permissions, not solely are you able to request runtime permissions, however on
Android 13, you possibly can revoke ones that you simply had been granted earlier.

One of many long-standing issues with registerReceiver() is that the ensuing
BroadcastReceiver was all the time exported. This isn’t nice from a safety standpoint.
Now, it seems as if we will management this.

A well-liked request in locations like Stack Overflow is for a option to get the present time,
from a time supply that can not be modified by the consumer. Android 13 provides us
currentNetworkTimeClock(),
which studies the time from a community time supply (e.g., SNTP). Because the docs
be aware, this time nonetheless could possibly be modified, however not simply.

What Will Require Some Work

All these PackageManager strategies that took a “flags” int? They’re all deprecated and
changed with ones that take richer objects
.

For those who work with Parcel straight, there are many deprecations and plenty of replacements.

What Else Would possibly Break Your Apps

There’s a new BODY_SENSORS_BACKGROUND
permission. Presumably, it’s required for background apps that want to learn coronary heart
fee or comparable information, resembling on Put on OS. This permission has scary language
about being “a tough restricted permission which can’t be held by an app till the
installer on file allowlists the permission”. In case your app already requests
BODY_SENSORS, pay shut consideration to what finally will get documented
in regards to the want for BODY_SENSORS_BACKGROUND.

There’s a new “gentle idle mode”, as seen in isDeviceLightIdleMode()
and ACTION_DEVICE_LIGHT_IDLE_MODE_CHANGED.
That is when “when a tool has had its display off for a short while, switching it right into a batching mode the place we execute jobs, syncs, networking on a batching schedule”.
The “networking” facet of that is significantly disconcerting, and hopefully extra
will likely be defined about this mode.

Some strategies had been outright faraway from the SDK, principally in android.webkit.

What Else Would possibly Break Your Apps Within the Not-Too-Distant Future

android:sharedUserId is already deprecated. Google seems to be engaged on migration
paths for apps that presently rely on it, resembling sharedUserMaxSdkVersion
and EXTRA_UID_CHANGING.
My guess is that android:sharedUserId will likely be ignored in some future Android launch.
If you’re relying upon android:sharedUserId, begin work on some different mechanism,
and look ahead to documentation on how finest emigrate to a non-sharedUserId world.

What Actually Wants Documentation

There’s a new system service, marketed beneath the SUPPLEMENTAL_PROCESS_SERVICE
identify. It’s unclear what that is for.

Mishaal Rahman writes about “hub mode”,
and the docs have issues like showClockAndComplications
that appear to tie into that. Maybe this can debut in a later developer preview.

There may be a TvIAppManager,
described as being the “system API to the general TV interactive software framework (TIAF) structure, which arbitrates interplay between functions and interactive apps”.
Proper now, that system service has no strategies, so the truth that it’s undocumented is
not an enormous loss. This too may present up in some later developer preview.

There are a bunch of latest KeyEvent keycodes
that actually might use some rationalization (e.g., what’s “Video Software key #1”, precisely?).