testsetset
Google today launched Android Jetpack, a set of components, tools, and guidance designed to accelerate app development. Android product manager Stephanie Cuthbertson unveiled the new set of Android components onstage at the company’s I/O 2018 developers conference, calling them “the next generation of Android APIs designed to accelerate app development.”
Think of Jetpack as the successor to Support Library, a set of components that makes it easier to leverage new Android features while maintaining backwards compatibility. Support Library is used by 99 percent of all the apps in the Play Store. At last year’s I/O, Google introduced Architecture Components, designed to make it easier to deal with an app cycle’s data, but now the company wants to go further in helping developers eliminate boilerplate code.
As you can see above, Android Jetpack combines Support Library, Architecture Components, and a five new components. They are broken up into four categories: Architecture, UI, Foundation, and Behavior. Because Jetpack components are built to provide backwards compatibility, your app can run on various Android versions.
Jetpack components are provided as unbundled libraries that are not part of the underlying Android platform so you can adopt only the component you need, as you need it. When new Jetpack functionality is available, Google hopes developers will be able to add it to their apps and deploy the update to Google Play in a single day.
June 5th: The AI Audit in NYC
Join us next week in NYC to engage with top executive leaders, delving into strategies for auditing AI models to ensure fairness, optimal performance, and ethical compliance across diverse organizations. Secure your attendance for this exclusive invite-only event.
Google is releasing the following new Jetpack components today:
- WorkManager alpha: A one-stop solution for constraint-based background jobs that need guaranteed execution, replacing the need for jobs or SyncAdapters. WorkManager provides the ability to work on devices with or without Google Play Services, to create graphs of work, and to query the state of your work.
- Navigation alpha: A framework for structuring your in-app UI with a focus on making a single activity app the preferred architecture. Navigation lets you declare which transitions to handle, automatically builds the correct Up and Back behavior, includes full support for deep links, and provides helpers for connecting into the appropriate UI widgets.
- Paging stable: Manage data in “pages,” pulling in the first chunk of data to give the user a look at their results as quickly as possible while pulling down the next chunk, and the next, etc. Combined with the RecyclerView, this component can add infinite scrolling to your app.
- Slices alpha: A slice is a way to surface your app’s UI inside of the Google Assistant as a result of a search, something Google showed off as part of Android P’s second developer preview.
Kotlin
The fifth component is also an alpha, but it’s one that Google has talked about before: Android KTX. This one takes advantage of Kotlin language features to reduce even more code.
Google announced support for the Kotlin programming language at I/O 2017. Since then, the number of Google Play apps using Kotlin has grown by over 500 percent, and 28 out of the top 100 apps on the Play store have adopted it. Most importantly, Google says 95 percent of developers report they are very happy using Kotlin for their Android development.
Google promised today that the team is continuing to improve the Kotlin developer experience in terms of libraries, tooling, runtime, documentation, and training. In addition to Android KTX and Android Studio improvements, Google has tuned the Android Runtime (ART) in Android P so that apps built with Kotlin can run faster.
As for developers looking to ditch Java, Kotlin code snippets are now in Android’s official documentation, and a Kotlin version of the API reference documentation is being published today. Google also recommends checking out the Kotlin Bootcamp course on Udacity and the Kotlin specialization in the Google Developers Experts Program.