On the occasion of Google I / O, Google has announced a new project called Android Jetpack. This is simply the renaming of the components of the library support.
Google I / O is primarily a developer conference. Last year, the Kotlin language was notably formalized as an alternative to Java. This year there will certainly not be such a change, but the new features will still be synonymous with transformations for Android developers.
Support libraries become Android extension libraries
Many of the applications on your phone use so-called support libraries. Specifically Google is aware that developers have to manage many versions of Android and support libraries are primarily intended to retro-wear the new system features on the older ones. A good example is the Material Design which was not available on Android 4.x.
This library support is not new since it started more than 7 years ago now. The history is that today developers are lost between v4, v7, v13 ... This is how we will no longer call them support libraries, but Android extension libraries (or AndroidX).
The features do not evolve, but the package name will be clearer: androidx. ** instead of android.support. **. It will be the same for the Architecture Components. Another change: the support libraries which evolved according to the version number of Android (27 for Android Oreo 8.1), will now go back under a standard numbering of type 1.0.0.
But what is JetPack?
Google quickly spoke to Android Jetpack during its keynote, making the concept somewhat obscure. In the end, Android Jetpack represents neither more nor less than the various components of Android extension libraries and some of its extensions. It seems unclear, but it is the same set of tools that has more or less the same name.
Within Android Jetpack, we will find four main types of tools: foundations, architecture, behavior and graphics. All this is materialized by the well known AppCompat, Android KTX, the management of the multidex, the elements relating to Architecture Components, Android TV ...
However, several novelties are on the program:
WorkManager that allows you to manage jobs running in the background
Slices that display portions of the interface in particular search
The Paging API goes into stable release
A new framework to manage navigation
WorkManager?
Going into a little more detail, the WorkManager is thinking a lot about the JobScheduler introduced with Android Lollipop, since it consists of scheduling a task according to criteria (example: launch a task when the phone is connected to the sector and has 'a stable internet connection).
It is however more powerful, since it relies on the Firebase JobDispatcher and the AlarmManager. Unlike JobScheduler Jobs, the WorkManager allows you to link several tasks one after the other automatically or to check the execution status of the job.
Manage navigation more easily
With a new component called Navigation Architecture Component, developers will be able to simplify the implementation of navigation in their applications. By adding very simple code and thanks to Android Studio, the order of appearance of the screens can evolve with a simple click. The tests should be easier in the development process.