Currently Empty: £0.00
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.
Basic Compose
-
1Project introduction
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.
-
2Get NASA Api key (optional)
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.
-
3Basic understanding of Flow Kotlin coroutine
Thought a simple basketball example we will describe the observable pattern with Flow.
-
4Code organization
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.
-
5Quiz Code organization and Flow coroutine
Let's verify if you have understand concept of the project layer.
-
6Android Studio setup
Compose Navigation
Display a compose list based on a network request
Create a list with image
Create a bottom navigation
Save data in the application
-
23How to create a bottom navigation
-
24Create a bottom nav component
During this lecture, we will add a bottom bar to choose between all the rovers photos and the saved photos.
In the resource, find the Android Studio project with the result expected at the end of the video. Also find the rover icon in the resources.
Material3 : Update colors and fonts
-
25How to use Room
Reading of the Room documentation to understand how we will use it inside the Android application.
-
26Create a database and add data
We will create the sqlite marsRover.db using Room. We will define one table for this database by creating the MarsRoverSavedLocalModel. In addition, we will create the DAO to access the data.
Then we will use Flow Combine to mix network data with local data. In order to display the rover photo with the status save/not save. We will also make the photo card clickable to change this status.
-
27Display data from the database
Create the saved screen accessible from the bottom bar with the saved photo that came from the database. In the downloadable material, you will find the Android project at the end of this stage.
-
28Debug database
In this video, we will use Android Studio to explore what data is written in our local database.
Unit test
-
29How to update colors
This article describes how to create light and dark theme for our app. The next video is a live coding of it.
-
30Update colors
Define a light and dark theme with personalized colors to create the unique Mars Rover Explorer Android application.
-
31Update fonts
Learn how to change to font of the app using Material3 theme.
-
32Create animation for the save icon
In this lecture, we will animate the save/unsave icon when the user saves or unsaves the photo. The animation will be a scale-in/scale-out type. We will also play with duration.
UI test
-
33Manifest Convertor Unit Test
-
34Manifest ViewModel Test with mockk and MainCoroutineRule
In this lecture, we will create a MarsRoverManifestViewModelTest to test the MarsRoverManifestViewModel.
Mockk dependency will be added to mock a MarsRoverManifestRepo and control answers for this repo.
We will also add a MainCoroutineRule to use coroutines in our test.
In addition, we will refactor MarsRoverManifestViewModel to use the IoDispatcher in our coroutine.
-
35Manifest Repo Test
We will write tests for the MarsRoverManifestRepo and use mockk to predefine answers for the MarsRoverManifestService (success and error).
-
36Photo List ViewModel Test
We will use test with coverage to verify that we test all the lines in the MarsRoverPhotoViewModel.
-
37Photo Repo Test
In this video, we will write unit tests on the function that combines data from the Retrofit interface (network request) and the Dao interface (room database) into a single model.
Bonus
-
38Creation the first UI test for the rover list
We will create a composeTestRule to manipulate composable functions automatically. We will also update the version numbers for the BOM and Junit4 UI tests.
-
39Create the UI test that will test the manifest list (second screen of the App)
In this lecture, we will have a UI test that will start the Manifest compose function. For this, we will create a fake list of RoverManifestUiModel, then use composeTestRule to start the screen and run text assertions.
-
40Create the UI test for the photo list (third screen of the App)
We will create on automated test that display a predefined list of photo and verify that some texts are display and id our screen contains item with the content description "save icon".
How long do I have access to the course materials?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Can I take my courses with me wherever I go?
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
Stars 5
29
Stars 4
11
Stars 3
4
Stars 2
3
Stars 1
0