Random Musings on the Android 14 Developer Preview 1

Random Musings on the Android 14 Developer Preview 1

It’s that time once again!

When Google releases a new developer preview, I rummage by means of
the API variations report
the significant-amount overviews,
and even the launch blog site publish,
to see if there are items that warrant additional focus from
developers. I try to emphasize mainstream features that any developer
may well fairly use, alongside with matters that may possibly not
get really as much attention, simply because they are buried in the JavaDocs.

What May Make You Want to Hold out

Seemingly, you can only run your application when on Android 14 DP1 from Android Studio, and you then have to uninstall it.
And the repair is going to be in a canary release of Studio, instead than a patch release
on the existing creation variation.

What Could Be Fewer “Orphan Black” and More “She-Hulk”

Mishaal Rahmann stories that Android 14 may support application cloning.
Listed here, “app cloning” appears to imply that the consumer can set up an application to have
many distinct sets of interior storage (e.g., getFilesDir() on Context).
This can make it possible for them to, say, use a number of logins for the exact same app, only by switching
which clone they operate.

This may perhaps lead to some compatibility challenges, due to the fact some developers refuse to use
solutions like getFilesDir() and as a substitute hardcode filesystem paths. That has not been
reliable in numerous decades. Even so, a lot of application developers can get absent with it, because
the scenarios exactly where the hardcoded route could possibly not operate are unheard of (e.g., several machine
profiles, operate profiles). Application cloning may well add nevertheless yet another circumstance in which all those hardcoded
paths are a issue, and some apps will wind up having smashed.

FWIW, launchers may well need to enjoy alongside with this —
see Action_PROFILE_Additional.

What Could Get Photograph Entry In a Even bigger Pickle

Mishaal also reviews that Google may be unsatisfied with the level of Photograph Picker adoption, and that
Google might shoehorn the Picture Picker into the permissions circulation.
I concur with the premise that this can strengthen privacy and protection. However, this
adjust does not appear to be documented, and it will be exciting what the impacts
are from a compatibility standpoint.

What Else Screams “Compatibility Concerns”

There is really the listing of matters that are documented that may well split apps
from unwary developers. Some of these will impact lots of present apps, these as:

Others will crop up later in 2023, when you raise your targetSdkVersion to what ever
the magic variety will be for Android U:

Ordinarily, there are some undocumented (or late-documented) compatibility challenges
also.

What Would Make any difference If Gadget Suppliers Were being, Y’Know, Affordable

There are new foreground services kinds, this sort of as for overall health.
It would be even nicer if these essentially mattered, as gadget suppliers routinely
nerf your foreground support in any case.

There is a new details transfer kind of Position.
Possibly product suppliers will fork out awareness to these and allow them basically operate.

What Will make Me Look at Working with Jedi Mind Tricks

Android 14 has CredentialManager
and CredentialProviderService
and a bunch of other code tied to “credentials”. This appears to be in assistance
of a Jetpack library
for integrating conventional logins, passkeys, solitary-signal-on companies, and so forth.

Ideally, this would be wonderful. Google’s track document
helps make me significantly less than intrigued,
at least right up until this code receives critically vetted. At minimum it is part of the AOSP —
I would have predicted this to be portion of the closed-supply Enjoy Services SDK.

But, very seriously: an OS that has an overall course hierarchy for advertisements doesn’t just strike
me as the form of OS where I want to be trusting the OS alone very a great deal.

Observe that Watch now has isCredential() and setIsCredential(), to flag UI things
tied to qualifications. It is unclear what affect this has, though it would be awesome
if they have been routinely redacted in screenshots.

What May Be Symptoms of Competitors

An app utilizing PackageInstaller can now request enforcement of update ownership.
In other terms, if Store A installs an application and requests this, other stores will
require permission from the person to update the app, even of people other stores
keep Install_Packages and can or else freely install apps. This also can
be requested in the manifest,
evidently.

My guess is that the Play Retail store will apply this to anything it installs… but
this indicates that Google sees a long run with more outlets.

What Else Is Prosperous

setStyleShortcutsEnabled() on EditText
evidently allows prevalent hotkeys like Ctrl+B utilize formatting. This is the initially tiny
action in the direction of acquiring very first-class loaded-textual content enhancing in Android, which would be welcome,
if the present-day guidance is limited to persons applying keyboards.

In somewhat relevant information, support for handwriting recognition seems improved,
with numerous new methods on Look at
and ViewConfiguration.

What We Could possibly Be Allowed To Do

There are lots of new permissions.
Of observe:

What Capabilities Might We Require

There are a few new features we can include, such as:

  • Assist for the aforementioned CredentialsManager, which indicates that this will
    not be readily available on all products

  • Aid for extremely wideband

  • Support for seamless refresh rate switching

What Indicates We Just cannot Have Nice Items

An additional new factor is for “device lock” assistance. This probably
ties to DeviceLockManager.
The main cited use case: a “financed device, exactly where the financing entity has the functionality to lock the unit in situation of a missed payment”.

The concept of possessing financed gadgets is wonderful. The idea that financers and
and complicit product producers can lock the system for non-payment is unsurprising.
Acquiring this “feature” baked into the OS is disturbing.

What I’m Surprised Took This Extended

As a indigenous English speaker, I am routinely unaware of all of the unique nuances
of other languages. But I am a little bit stunned we built it this considerably with out
assist for grammatical genders.

What Is Going… Going…

Requirements-dependent
APIs on LocationManager are now deprecated.

What Else Intrigues Me

We can now, ultimately, figure out
what other application began our application.

There is a VirtualDeviceManager.
It is undocumented what this pertains to, other than probably not the Android SDK emulator.
Even so, it also ties to the idea of producing a “device Context.
And, provided this listener,
this appears to be for transferring an app to a diverse machine, this sort of as from your cellular phone
to the rumored tablet/hub thingy that Google is developing.

Extra of Wellbeing Link is baked into the OS now, with the addition of
HealthConnectManager.

TextView can now have highlights.
It is unclear how this associated to the rendering of Spanned objects, which
was our common way of highlighting specified parts of the text.

You can get the form of a Screen.
It is unclear if this is created for Wear OS or for other eventualities.

There are new kinds of KeyEvent,
such as for stylus buttons.

StrictMode can now complain if you manually request garbage assortment.

As aspect of incorporating a couple of hundred OpenJDK 17 courses, we acquired StackWalker.
I can see this currently being helpful for diagnostic applications like LeakCanary.

The media projection APIs now support
screenshots for a certain or person-selected Display.

Our present runtime resource overlay (RRO) help
is having expanded with
fabricated runtime useful resource overlay (FRRO) help.

There is an AltitudeConverter,
hopefully not for Android-powered airplanes.

Android now supports Dvorak keyboards,
while definitely the worldwide keyboard kinds are more essential.

We can now discover out how substantially memory the consumer was instructed their system has,
which might not resemble how a great deal memory their device really has.

Applications on Chromebooks can now request to go to whole-display mode.

And, eventually, we can now request to produce a observe,
even on the lock screen.