Using the Room Database and Testing
Android applications can benefit significantly from storing data locally. The Room persistence library harnesses the power of SQLite. In particular, Room offers excellent benefits for Android developers. Furthermore, Room offers offline support, and the data is stored locally. In this chapter, we will learn how to implement Room, a Jetpack Library.
In this chapter, we’ll be covering the following recipes:
- Implementing Room in your applications
- Implementing Dependency Injection in Room
- Supporting multiple entities
- Migrating existing SQL database to Room
- Testing your local database
It is also important to mention there are a couple more libraries are used with Room – for example, RxJava and Paging integration. In this chapter, we will not focus on them but instead on how you can utilize Room to build modern Android apps.