Sunday, May 5, 2024
HomeJavaAndroid Extension SDK Goals to Simplify the Use of Modular System Parts

Android Extension SDK Goals to Simplify the Use of Modular System Parts


Launched with Android 10, Modular System Parts allow updating end-user units exterior of the conventional Android launch cycles. The brand new Extension SDK framework, now public, goals to make their integration easier for builders.

Android 10 or larger converts chosen system elements into modules, a few of which use the APEX container format (launched in Android 10) and a few of which use the APK format. The modular structure allows system elements to be up to date with essential bug fixes and different enhancements as wanted.

One main examples of how Google plans to leverage API componentization is the rolling out of the brand new Privateness Sandbox beta to Android 13 units, without having to attend for the subsequent Android launch. As well as, modular elements additionally intention to type of backporting present options to units working older Android variations. That is exemplified by the PhotoPicker API, launched in Android 13, that’s obtainable for Android 11 and 12, too, because of Modular System Parts.

Utilizing the brand new SDK Extension framework, developer can simply examine whether or not a given function is obtainable on a tool and conditionally allow its use of their apps. For instance, the official documentation for the above talked about PhotoPicker API states that it’s obtainable beginning with Android 13 in addition to on units working Android R (11) extension 2. With this info, a developer planning to reap the benefits of the brand new PhotoPicker API of their app would first examine whether or not the SDK extension model is no less than the minimal required for that API, i.e.:


enjoyable isPhotoPickerAvailable(): Boolean {
        return SdkExtensions.getExtensionVersion(VERSION_CODES.R) >= 2
    }

Earlier to SDK Extensions, builders may examine the worth of Construct.VERSION.SDK_INT, e.g. Construct.VERSION.SDK_INT >= 33, to make sure a minimal SDK degree was obtainable. Whereas nonetheless right and supported, this examine would fail for units working an SDK degree lower than 33 whereas having R extension model >= 2.

The SDK Extensions API will probably be additional built-in with Jetpack Compose to make its use extra idiomatic, Google says.

Modular System Parts are much like Google Play Providers of their intent to make Android units simpler to replace with out requiring a brand new OS launch. The important thing distinction between the 2 options lies with Modular System Parts being a part of AOSP, the Android Open Supply Platform, whereas Play Providers are a proprietary answer solely obtainable to Google and licensing companions. Being a part of AOSP signifies that modularized system elements can be delivered by a third-party over-the-air infrastructure along with Google Play, which would be the default for Google and licensing companions.



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments