Learning Android Development

Learning Android’s Room Database Made Easy

Android’s Room definitely much easier than vanilla SQLite, LoaderManager, and Cursor

Photo by Crew on Unsplash

I came to the game late. Very late. Room database has been introduced to Android in 2017, more than 5 years ago!!

Nonetheless, not a bad thing to skip it, as it does undergo some changes, needed over the years, e.g. incorporating Coroutin Flow, instead of LiveData. (That was in 2019 too 🫢… okay, have to admit, I’m still late).

There are some tutorials around. I thought I would have easily found something that my brain can wrap around. But it still took me a few days to comprehend it. (nonetheless, I thankfully have them, as they help much in my learning endeavor).

Given various features were added to Rooms from time to time (e.g. Coroutine, Flow, etc), hence finding all info in one place is tricky.

Here I put them together, as part of my notes compiling them together, and hope to make it the simplest possible (at least for me 😅 for my future recollection).

It contains

  • The latest Room Database Dependencies of 2.5.0 and using KSP with Kotlin 1.8.0, working with Jetpack Compose with design example

--

--