From the course: Android Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Manage an SQLite database with Room

Manage an SQLite database with Room - Android Tutorial

From the course: Android Development Tips

Manage an SQLite database with Room

- [Instructor] The Android Architecture Components that were announced at Google I/O in 2017 have quickly become an important set of tools for the Android developer community. There are four components, and they're designed to work together, but the Room persistence library is particularly useful on its own. It lets you define an SQLite database and its tables and implement all of the required queries to manage the database with a very small amount of code. Now, it still takes a certain amount of code to create a database this way, so rather than do all the typing here in the video, I've created an app that already defines the database. I'll walk through all that code and then show you how to use it in an activity or a fragment. In this application, under the model package, there's a class named Note. Now, for the most part, this is a simple POJO class. It has a couple of different constructors, it has setters and getters for its private fields, and it has a toString method for…

Contents