Random Ideas on Android 14 Developer Preview 1
It is that point once more!
When Google releases a brand new developer preview, I assessment the API diff report, the high-level overviews, and even the discharge weblog put up, to see if there are issues that deserve extra consideration from builders. I attempt to emphasize the core options that any developer may moderately use, together with the issues that won’t get as a lot consideration, as a result of they’re hidden away within the JavaDocs.
What may make you need to wait
Apparently you may solely run your app as soon as on Android 14 DP1 from Android Studio, after which you must uninstall it. And the repair will probably be in a canary model of Studio, reasonably than a patch model within the present manufacturing model.
What could possibly be much less “Orphan Black” and extra “She-Hulk”
Mishaal Rahmann studies that Android 14 may help app cloning. Right here “app cloning” appears to imply that the person can configure an app to have a number of totally different units of inside storage (for instance, getFilesDir()
in Context
). This could enable them, for instance, to make use of a number of logins for a similar software, just by altering the clone they run.
This could trigger some compatibility points, as a result of some builders refuse to make use of strategies like getFilesDir()
and as a substitute hardcode the file system paths. That hasn’t been dependable in a few years. Nevertheless, many app builders can get away with this, as a result of the situations the place the hardcoded path may not work are uncommon (eg, a number of gadget profiles, work profiles). App cloning can add one other state of affairs the place these hardcoded paths are an issue, and a few apps will find yourself getting destroyed.
FWIW, pitchers might must play together with this; see ACTION_PROFILE_ADDED
.
Which may get entry to the photographs in a bigger gherkin
Mishaal additionally studies that Google could also be sad with Photograph Picker’s adoption charge, and that Google may wedge Photograph Picker into the permissions stream. I agree with the premise that this could enhance privateness and safety. Nevertheless, this variation doesn’t look like documented, and it is going to be fascinating to see what the impacts are from a compatibility standpoint.
What Else screams “compatibility considerations”
There’s a lengthy checklist of issues which might be documented which may break apps for unsuspecting builders. A few of these will have an effect on many present functions, reminiscent of:
Others will emerge later in 2023, when their targetSdkVersion
to regardless of the magic quantity is for Android U:
There are often some undocumented (or late documented) compatibility challenges as nicely.
What would it not matter if gadget producers had been cheap?
There are new forms of foreground providers, reminiscent of for well being. It might be even higher if this truly mattered, since gadget producers routinely reduce their foreground service anyway.
There’s a new sort of knowledge switch Job
. Possibly the gadget producers will take note of these and allow them to work.
Which makes me think about using Jedi thoughts methods
Android 14 has CredentialManager
and CredentialProviderService
and a bunch of different code tied to “credentials”. This appears to be appropriate with a Jetpack library to combine conventional logins, entry keys, single sign-on providers, and so on.
Ideally this may be superior. Google’s monitor report makes me much less , at the very least till this code is severely examined. At the least it is a part of the AOSP; I might have anticipated this to be a part of the closed supply Play Companies SDK.
However severely: an working system that has an entire class hierarchy for commercials Would not appear to be precisely the sort of OS to me the place I need to rely closely on the OS itself.
Notice that View
now you could have isCredential()
and setIsCredential()
, to mark UI parts linked to credentials. It is unclear what impression this has, though it could be good in the event that they had been routinely eliminated within the screenshots.
What could possibly be indicators of competitors
An software utilizing PackageInstaller
Now you can request the property software for the replace. In different phrases, if Retailer A installs an app and requests it, different shops will want permission from the person to replace the app, even from these different shops. INSTALL_PACKAGES
and in any other case you may set up apps freely. This may also be requested within the manifest, it appears.
I suppose the Play Retailer will apply this to every thing you put in… however this suggests that Google sees a future with extra shops.
what else is wealthy
setStyleShortcutsEnabled()
in EditText
apparently permits frequent hotkeys like Ctrl+B to use formatting. That is the primary small step in direction of first-class wealthy textual content modifying on Android, which might be welcome, if present help is restricted to individuals utilizing keyboards.
In considerably associated information, help for handwriting recognition appears to be improved, with a number of new strategies in View
and ViewConfiguration
.
What we may be allowed to do
There are lots of new permissions. Of be aware:
What options may we require?
there are some new <uses-feature>
gadgets we are able to add, together with:
-
I help the above
CredentialsManager
which means that this is not going to be obtainable on all units -
Extremely-wideband help
-
Help for constantly altering the refresh charge
Which suggests we will not have good issues
one other novelty <uses-feature>
The merchandise is for “gadget lock” help. That is in all probability associated to DeviceLockManager
. The principle use case cited: a “funded gadget, the place the monetary establishment has the power to dam the gadget within the occasion {that a} fee isn’t made.”
The idea of getting units financed is okay. The idea that financiers and complicit gadget producers can brick your gadget for non-payment isn’t a surprise. Have this “characteristic” baked into the working system it’s disturbing
What amazes me took so lengthy
As a local English speaker, I’m usually unaware of all of the totally different nuances of different languages. However I am just a little stunned that we have gotten this far with out help for grammatical genders.
What is going on… going…
Standards
APIs based mostly on LocationManager
they’re now deprecated.
What else intrigues me
Now we are able to lastly discover out what different app began our app.
There is a VirtualDeviceManager
. It isn’t documented what this refers to, apart from it is in all probability not the Android SDK emulator. Nevertheless, it’s also associated to the notion of making a “gadget Context
”. And, given this listener, this appears to be to maneuver an app to a distinct gadget, like out of your cellphone to the pill/hub Google is rumored to be constructing.
Greater than Well being Join is built-in into the working system now, with the addition of
HealthConnectManager
.
TextView
now you may have highlights. It isn’t clear how this pertains to the illustration of Spanned
objects, which was our conventional manner of highlighting sure elements of textual content.
You may get the form of a Show
. It is unclear if it is designed for Put on OS or different situations.
There are new sorts of KeyEvent
together with the stylus buttons.
StrictMode
now you may complain when you manually request rubbish assortment.
As a part of including a couple of hundred OpenJDK 17 courses, we received StackWalker
. I can see this being helpful for diagnostic instruments like LeakCanary.
Media projection APIs now help screenshots for a particular or chosen person Show
.
Our present runtime useful resource overlay (RRO) help is being prolonged with fabricated runtime useful resource overlay (FRRO) help.
There is a AltitudeConverter
hopefully not for Android plane.
Android now helps Dvorak keyboards, though worldwide keyboard sorts are literally extra necessary.
Now we are able to learn how a lot reminiscence the person was informed their gadget has, which could not appear like the quantity of reminiscence on their gadget. In reality has.
Apps on Chromebooks can now request to go full display.
And at last, we are able to now ask for a be aware to be created, even on the lock display.
— February 11, 2023
–
Random Musings on the Android 14 Developer Preview 1