Hello Friends,
Welcome to my channel "Android Pro"
In this video series, I am going to show you how to implement Room database in your project.
Now we use MVVM architecture to complete this project.
To know basics of MVVM check out my blog:- / basics-of-mvvm-android
Add this following dependency:-
implementation "android.arch.lifecycle:extensions:1.1.1"
We also use CoroutineScope in this project. As we are going to do some Database operation, as we don't know how long it will take,
so this type of task is not recommended to do on Main Thread. So, we are using coroutines.
Application Name:- TodoApp
Steps to follow:-
a. Create a new Android Project and give name as TodoApp
b. Create Entity class and give name as Todo
c. Create Dao Class and named as TodoDao
d. Create Database Class and named as TodoDatabase
e. Create TodoRepository and TodoViewModel class