Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Android Jetpack Compose with Retrofit Room Hilt in Kotlin
Rating: 4.4 out of 5(57 ratings)
11,339 students

Android Jetpack Compose with Retrofit Room Hilt in Kotlin

Develop an app that displays Mars photos with ViewModel and Repositories with dependency injection and Flow coroutines
Created byAlexandre Genet
Last updated 8/2024
English

What you'll learn

  • Create an modern Android application with Jetpack Compose in Kotlin
  • Organize the code with separate layers (ViewModels MVVM, repositories and data layers)
  • Room database and Retrofit
  • Understand the basic of Flow and Kotlin coroutine
  • Start Jetpack composable in a UI tests
  • Write unit tests
  • Create animations
  • Create a theme using Material3 with dark and light modes and custom fonts
  • Use Hilt for dependency injection (a dagger-based framework)
  • Create a Bottom Navigation and Navigate between screens

Course content

11 sections39 lectures7h 46m total length
  • Project introduction3:40

    In this first part, we will explore the Android App that we will building during this course. We will also look at the NASA API used to get the data and image to be displayed.

  • Get NASA Api key (optional)1:17

    We will see how we can create a NASA API key on the api.nasa.gov website. This step is optional, using the DEMO_KEY is possible for this course.

  • Basic understanding of Flow Kotlin coroutine1:38

    Thought a simple basketball example we will describe the observable pattern with Flow.

  • Code organization3:52

    Discover how the code will be organized into 4 layers:

    • Activity/Compose elements

    • ViewModels

    • Repositories

    • Data layers (Retrofit for API network requests and Room for local database)

     

    We will describe the observation pattern to illustrate how the data are updated on the screen.

     

    This lecture will feature some code examples to explain the relationship between layers.

  • Quiz Code organization and Flow coroutine
  • Android Studio setup5:22

Requirements

  • Basic knowledge of Kotlin and Android

Description

During this course, we will develop an Android application that will display photos taken by the rovers on Mars using Android Studio.


This app will use all the latest Jetpack technologies:

  • Compose (no more XML)

  • Hilt (Dagger Dependency Injection Framework)

  • Room (Jetpack component to create a lite database)

  • Retrofit (REST client)

  • Coroutines and Flow (To create asynchronous tasks and request our database)


You also use ViewModels with Jetpack to use an MVVM Repository architecture.


With this example, you should be able to create an Android App to the industry standard.


Navigation with Jetpack Compose could be challenging, so we will create a simple example with 4 screens and a BottomNav to understand it. A Scaffold will be use to create the BottomNav.


Your productivity will be improve as Jetpack Compose is easier to write and reuse.


You will improve your knowledge of Kotlin. If you still use Java, this course is an opportunity to learn.


Compose is a new way to create a UI on Android. It is more concise and reusable. Therefore, it helps to develop faster Android applications.


In this app we will use Jetpack Compose Components from Materal3:

  • Card

  • LazyColumn

  • Column

  • Row

  • AsyncIamge (from the Coil lib to display an image from a server)

  • Text

  • Image

  • NavHost (to use navigation)

  • NavigationBar

  • NavigationBarItem

  • Box

  • Scaffold

We will also see how we can use a modifier to define padding.


Who this course is for:

  • Android developers who wants to learn Jetpack Compose
  • Android developers who wants to increase code quality