Random Musings on the Android 14 Developer Beta 2

Random Musings on the Android 14 Developer Beta 2

When Google releases a new beta, I rummage through
the API differences report
the high-level overviews,
and even the release blog post,
to see if there are things that warrant more attention from
developers. I try to emphasize mainstream features that any developer
might reasonably use, along with things that may not
get quite as much attention, because they are buried in the JavaDocs.

Not surprisingly, the pace of change is down now that Beta 2 is out.
My focus is
on the developer side; see Mishaal Rahman’s Twitter thread for a broader look at Beta 2.

Of note:

  • A fair number of APIs were removed. That is not surprising at this stage and probably
    represents ideas that were not going to be “fully baked” in time for the Android 14
    release. One example is the PersistableBundle-based extras on PendingIntent
    that I covered in the Beta 1 preview
    — those are now removed.

  • Similarly, a few things that had been deprecated are now undeprecated. Whether
    that is because they found new use cases or their replacements were not yet
    ready is unclear. Examples include the getApplicationRestrictions() methods
    on UserManager and RestrictionsManager.

  • WindowManager gained a series of PROPERTY_COMPAT constants, such as
    certain behaviors, such as forcing activities to landscape. You specify these
    via <property> child elements of <application> in the manifest.

  • MotionEvent has getEventTimeNanos() and getHistoricalEventTimeNanos(),
    to get finer-grained resolution than the millisecond-based methods like getEventTime().

  • Google continues baking the notion of financed devices into the OS
    DeviceManager, as I mentioned back in musings on Developer Preview 1.
    DevicePolicyManager lets you determine if the device is financed and
    find out about changes in the financing state.

  • TextView now explicitly has setLineHeight(),
    rather than only being able to specify line spacing.

  • There is a new PROVIDE_OWN_AUTOFILL_SUGGESTIONS permission, but it is only available
    to “the Browser application”, however Google is defining that.

  • Similarly, there are new permissions related to credentials, such as

It is likely that this is the last set of random musings for Android 14, unless something
unexpected happens with the next release.