Build Modern Android App with REST API and Ktor Server
- Description
- Curriculum
- FAQ
- Reviews
Hello there and welcome to my course!
This course will be special. Why? Well because I’m going to teach you how to build not just another android application, but also a backend server, your own REST API!
The main purpose of that server will be to provide the data to our Android Application. You will learn how to successfully establish a quality communication between client, or in this case our Android App, and a backend server.
For the backend we will use ktor framework which is built primarily on Kotlin and Coroutines! You will learn everything about that framework, how to create your own endpoints, how to work with client requests, receive query parameters, process that same request on your backend, and finally send a fully prepared response to your clients, or in this case an Android App which we are going to develop as well.
Now, our Android Application will use the newest API’s and libraries. For designing our Application layout we will use a modern UI toolkit called jetpack compose. For communicating with our backend we will use a retrofit, and paging 3 library along with remote mediator, so we can automatically store and cache that data from the server into our Local ROOM database. That way we will be able to load the data into our Application, even if we don’t have an internet connection.
And that’s not all, I will also teach you how to test your Backend Server as well as your Android App. We are going to test all our server endpoints, the most important parts of our Android application and few custom UI components which we are going to build using Jetpack Compose! I’m going to teach you how to create a custom UI component called Rating Widget, using Jetpack Compose, it will look amazing!
Next you will learn how to implement a swipe to refresh functionality in your app, how to implement a palette API so you can display dynamic colors into your layout depending on the image we load into our Screen. And many other different things Bottom Line, there is a lot of work to do, so get ready, because this will be quite of a journey!
So what are you waiting for developers. Let’s get started!
-
1Introduction
Backend Server - Source Code | https://github.com/stevdza-san/BorutoServer
Android App - Source Code | https://github.com/stevdza-san/BorutoApp -
2Project Repositories and Resources
Backend Server - Source Code | https://github.com/stevdza-san/BorutoServer
Android App - Source Code | https://github.com/stevdza-san/BorutoApp
-
3Introducing with the Ktor Framework
-
4Download & Install IntelliJ IDEA
-
5Create Ktor Project Manually
-
6Ktor Project Generator
-
7Servers & Configurations
-
8Modules
-
9Plugins
-
10Introducing with Postman
-
11Requests/Responses
-
12Static Contente
-
13Templating
-
14Auto-Reload
Auto-Reload feature does not work well. Sometimes it might work and sometimes might not. I've searched for an answer but it appears that this feature is still not stable. My suggestion would be not to use it for now. I'll make a new video however when something changes regarding that issue.
-
28Setup the Project - App
-
29Setup Navigation
-
30Create Hero Entity
-
31Create HeroDao & BorutoDatabase
-
32Create HeroRemoteKey Entity & Dao
-
33Create DatabaseConverter class
-
34Setup Dagger-Hilt
-
35Design Splash Screen
-
36Animate Splash Screen & Apply StatusBar Color
-
37Design Welcome Screen - Part 1
-
38Design Welcome Screen - Part 2
-
39Design Welcome Screen - Part 3
-
40Setup DataStore Preferences
-
41Create Repository & First Use Cases
-
42Handle On Boarding Pages & Navigation
-
43Home Screen - Design Top Bar
-
44Create ApiResponse & BorutoApi
-
45Create NetworkModule object
Okay so here I've made a mistake, instead of using 'TimeUnit.SECONDS', I've used 'TimeUnit.MINUTES'. This mistake will be fixed in lecture under the name of 'Display Shimmer Effect' (#59)
-
46Introducing with Paging 3
-
47About Remote Mediator
-
48Implement RemoteMediator and load() function - Part 1
In this video I've made one mistake. In the provideDatabase() function in DatabaseModule, as a return type, instead of "BorutoDatabase" I've added RoomDatabase. That will be fixed in the 'Create GetAllHeroes Use Case' video. :)
-
49Implement RemoteMediator and load() function - Part 2
-
50Create RemoteDataSource & Implementation
-
51Create GetAllHeroes Use Case
-
52Design RatingWidget - Filled Star
-
53Design RatingWidget - Half Filled Star
-
54Design RatingWidget - Empty Star
-
55Design RatingWidget - Calculation
-
56Design HeroItem
-
57Load and Display Data from the Server
-
58Create Animated Shimmer Effect
-
59Display Shimmer Effect
-
60Implement initialize() function - RemoteMediator
-
61Modify Server Test Function
-
62Caching Header Explained
-
63Handle Paging Error
-
64Search Screen - SearchWidget
-
65Search Screen - SearchViewModel
-
66Search Screen - Implement SearchHeroesSource
Here we haven't actually implemented a paging when searching heroes on our backend server. When searching we will receive all hero results in a single page. Because if you recall when sending a response from the server (Search Heroes endpoint), we are not including prevPage/nextPage values. I have decided not to use paging with our endpoint for searching heroes, because in most cases when searching items like that, you just expect to receive a single result matching the query.
However at the end of this course this will be actually your homework. After you complete this whole course you will gather the knowledge necessary to complete this homework, and properly implement paging with our search heroes endpoint as well. The solution will include modifying both server and android app project. It's gonna be fun! I will not upload a solution for that, instead you will have to send that homework directly to me, so I can check it out and maybe give you some hints. :)
By doing this kind of homework you will prove to not just me, but more importantly to yourself that you are capable of resolving this kind of issues directly with the real working projects.And as I already said, I will make a new video at the end of this course explaining this homework. Best of luck!
-
67Search Screen - Implement SearchHeroesUseCase
-
68Search Screen - Display Searched Heroes
-
69Implement Swipe to Refresh
-
70Details Screen - Info Box
-
71Details Screen - Ordered List
-
72Details Screen - LocalDataSource & GetSelectedHeroUseCase
-
73Details Screen - DetailsViewModel
-
74Details Screen - Design BottomSheetContent
-
75Details Screen - Design BackgroundContent
-
76Details Screen - Animate BackgroundContent Image
-
77Details Screen - Animate Sheet Radius
-
78About Palette API
-
79Create PaletteGenerator Object
-
80Implement Palette Colors in Details Screen