Sign in Go Pro

Storing Data in Android with Room

Creating the Database

11/13/2018

 
Autoplay

Up next

Previous

About

Room - Creating the Database

This lesson will demonstrate how to create a Room database.

This lesson will walk you through the Kotlin code required to define a database and obtain an instance of the database whenever it is required.

Summary of content

  • How to define the Room database
  • Subclassing RoomDatabase
  • @Database annotation
  • How Room version numbers work
  • Obtaining singleton instance of database using a companion object
  • Building Room DB instance using Room.databaseBuilder()
  • Why you should use the applicationContext instead of an Activity context

Links

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in Storing Data in Android with Room