Google Offers Public Preview of SDK Extensions for Android
- By John K. Waters
- January 10, 2023
Google announced this week the release of the first public preview its SDK Extensions, which leverage modular system components to add APIs to the public SDK for certain previously released API levels.
Modularized system components make it possible for Android 10-based devices and higher to be updated outside major API-level releases, and make new functionality backward compatible on already-released Android versions, the company says. The new SDK Extensions leverage modularized system components to add APIs to the public SDK for certain previously released API levels. The result: Android partners are able to distribute updates broadly, quickly, and seamlessly to end-user devices in a nonintrusive manner, the company says.
These APIs are delivered to devices when end-users receive module updates through Google Play system updates. App developers can utilize them in their apps to provide additional functionality that wasn't originally available in the SDK for these previous versions of Android.
"Having the ability to introduce new functionality outside of major API level releases allows faster innovations," said Google software engineer Anton Hansson, in a blog post. "As shared in a previous post, beginning this year we plan to roll out the initial Privacy Sandbox on Android Beta release to Android 13 devices. You can start using the Extension SDK to integrate your solutions with the AdServices APIs to prepare for limited production testing. Learn more on how to participate in the Privacy Sandbox Beta release, and set up your development environment with a test device or emulator."
Extension SDKs also allow Google to extend the support of certain platform functionality to existing Android versions, Hansson explained, increasing user reach. "For example," he wrote, "the PhotoPicker APIs previously available only on API level 33 (Android T) and above are now also available all the way back to API level 30 (Android R) through the Extension SDK on devices with an R extension version of at least 2."
To help developers identify extension API availability, Google added additional information to the API reference that indicates the API levels and minimum extension versions for which the API is available. An example provided in Hansson's post: the API reference for ACTION_PICK_IMAGES indicates its availability on “Android R Extensions version 2” and above.
Google has also added Extension versions tooling support to Android Lint's NewApi check. Since the release of Android Studio Flamingo, it can auto-generate the correct version checks for APIs that have been launched via SDK extensions. Using these new version checks is completely optional, Hansson added, but adopting them could help lead to more widespread use of new APIs when they exist.
"We’re just beginning the SDK Extension developer journey and plan to make more features available in the future," Hansson wrote. "You can get the latest SDK extension 4 available in the SDK Manager today. Learn more about the SDK Extensions and our documentation on the Privacy Sandbox Beta and the photo picker."
John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS. He can be reached at [email protected].