Android Jetpack – All Things Need To Know

0
1095

What is Android Jetpack?

Android Jetpack is a collection of Android software components which helps us in building great Android apps.

Android Jetpack components are provided libraries that are not part of Android platform. This means that you can adopt each component at your own speed, at your own time. When new Android Jetpack functionality is available, you can add it to your app, deploy your app to the Play Store and give users the new features all in a single day (if you’re quick)!  Android Jetpack libraries have all been moved into the androidx.* namespace. (AndroidX Support)

Android Jetpack Components:

Foundation Components :

These components provide cross-cutting functionality like backward compatibility, testing, and Kotlin language support.

All the foundation components are as follows:

  • App Compat: Degrade gracefully on older versions of Android with material design user interface implementation support.
  • Android KTX: Set of Kotlin extensions to write more concise, idiomatic Kotlin code.
  • Multidex: Provide support for apps with multiple DEX files.
  • Test: An Android testing framework for unit and runtime UI tests.
  • Security : Read and write encrypted files and shared preferences by following security best practices.

Architecture Components :

These components are a collection of libraries that help you design robust, testable, and maintainable apps.

All the architecture components are as follows:

  • Data Binding: It is a support library that allows you to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
  • Lifecycles: These components help you produce better-organized, and often lighter-weight code, that is easier to maintain.
  • LiveData: It is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services. This awareness ensures LiveData only updates app component observers that are in an active lifecycle state.
  • Navigation: Handle everything needed for in-app navigation.
  • Paging: Gradually load information on demand from your data source.
  • Room: These  library provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
  • ViewModel: Manage UI-related data in a lifecycle conscious way.
  • WorkManager: Manage every background jobs in Android with the circumstances we choose.

Behaviour Components :

These components help your app integrate with standard Android services like notifications, permissions, sharing and the Assistant.

All the behaviour components are as follows:

  • Download Manager: Schedule and manage large downloads in background with auto-retry support.
  • Media & playback: This explains how to separate a media player app into a media controller (for the UI Controller) and a media session . It describes two media app architectures: a client/server design that works well for audio apps and a single-activity design for video players.
  • Notifications: A notification is a message that Android displays outside your app’s UI components to provide the user with reminders, communication from other people, or other timely information from your app. Users can tap the notification to open your app or take an any action directly from the notification .
  • Permissions: Compatibility APIs for checking and requesting permissions in-app.
  • Preferences: Create interactive settings screens for users to configure.
  • Sharing: Provides common ways that  you can send and receive simple data (like text, images and files) between applications using the Android Sharesheet Dialog and Intent Resolver with Intent objects.
  • Slices: Create flexible UI elements that can display app data outside the app and can be extended all the way back to Android 4.4.

UI Components :

It’s provide widgets and helpers to make your app not only easy, but delightful to use. Learn about Jetpack Compose, which helps simplify UI development

All the UI components are as follows:

  • Animation and transitions: The transitions framework, which enables you to easily animate changes between two view hierarchies. The framework animates the views at runtime by changing some of their property values over time.
  • Emoji: It’s support library aims to keep Android devices up to date with the latest emoji. It prevents your app from showing missing emoji characters in the form of ☐, which indicates that your device does not have a font to display the text.
  • Fragment: A basic unit of composable UI.
  • Layout:A layout defines the structure for a user interface in your app, such as in an activity. All elements in the layout are built using a hierarchy of View and ViewGroup objects.
  • Palette: The palette library is a support library that extracts prominent colors from images to help you create visually engaging apps.
  • TV: Components to develop Android TV apps.
  • Wear: Components to develop Wear apps.