Category: Jetpack

  • Download File With Android Work Manager [Example]

    Download File With Android Work Manager [Example]

    In this tutorial, we are going to download a file using work manager and save it in your location storage in kotlin. WorkManager in Android is one of the parts of Architecture Components and Android Jetpack that runs the postponed background task when the task’s restrictions are fulfilled. WorkManager controls the background task that needs […]

  • Dependency injection on Android with Hilt[Example]

    Dependency injection on Android with Hilt[Example]

    Dependency injection (DI) is a technique widely used in programming and well suited to Android development, where dependencies are provided to a class instead of creating them itself. By following DI principles, you lay the groundwork for good app architecture, greater code reusability, and ease of testing.  The new Hilt library defines a standard way to do DI in your […]

  • View Binding in Android Jetpack [Updated]

    View Binding in Android Jetpack [Updated]

    View binding is the current recommendation from the Google team for importing the views from XML to Activity, Fragment, or Adapter classes. View binding is a feature that allows us to write code that interacts with views. In most cases, view binding replaces findViewById. It supports both Java and Kotlin. To learn more about view binding check out the official documentation. […]

  • How to run task with work manager in android ?

    How to run task with work manager in android ?

    WorkManager is one of the Android Architecture Components and part of Android Jetpack, a new and opinionated take on how to build modern Android applications. WorkManager is an Android library that runs deferrable background work when the work’s constraints are satisfied. Earlier we had AlarmManager, JobScheduler, and FirebaseJobDispatcher for scheduling the background tasks. But the […]

  • MVVM With Retrofit and Recyclerview in Kotlin [Example]

    MVVM With Retrofit and Recyclerview in Kotlin [Example]

    MVVM architecture is a Model-View-ViewModel architecture that removes the tight coupling between each component. Most importantly, in this architecture, the children don’t have a direct reference to the parent, they only have the reference by observables. What is MVVM? MVVM stands for Model, View, ViewModel. Model: This holds the data of the application. It cannot directly talk to […]

  • Make Your Layout Responsive With ConstraintLayout In Android

    Make Your Layout Responsive With ConstraintLayout In Android

    ConstraintLayout allows you to create large and complex layouts with a flat view hierarchy (no nested view groups). It’s similar to RelativeLayout in that all views are layered out according to relationships between sibling views and the parent layout, but it’s more flexible than RelativeLayout and easier to use with Android Studio’s Layout Editor. The ConstraintLayout […]

  • Easy Steps To Setup Room Database In Android

    Easy Steps To Setup Room Database In Android

    Room Database is a part of the Android Architecture components which provides an abstraction layer over SQLite which allows for more robust database access while still providing the full power of SQLite. Room is a persistence library, part of the Android Jetpack Before getting started, check out another post on the jetpack, Getting started with WorkManager [Example] Dependency […]

  • Ultimate guide to jetpack store in android with example

    Ultimate guide to jetpack store in android with example

    Jetpack DataStore is a new and improved data storage solution aimed at replacing SharedPreferences. Built on Kotlin coroutines and Flow, DataStore provides two different implementations: Data is stored asynchronously, consistently, and transactionally, overcoming most of the drawbacks of SharedPreferences. If you’re currently using SharedPreferences to store data, consider migrating to DataStore instead. Before getting started, check out another […]