


VERBOSE is the upper level of logging - everything that can be logged will be logged.Īdb shell setprop VERBOSE In our case, I wanted to see SQLite statements that Room is generating, so it will look like this. Instead of %TAG%, put the tag you want to be logged. To enable logging aforementioned logs in logcat, you would need to fire up your command line interface and execute the following command.

One sunny day, one of our testers reported a bug about wrong behaviour on one of our screens. If this contact will be changed in the database sometime in the future, new Flow emission will notify us about * FROM contacts WHERE id = :contactId")Ībstract fun getContactStream(contactId: Long): Flow For example, here we have a method that returns Flow of a contact. Since we are strong Kotlin Coroutines supporters 💪, we mostly use Room in conjunction with Kotlin Coroutines. The most popular would be RxJava Observable, Kotlin Coroutines Flow and PagingSource from Paging library. When querying, there are a lot of adapters which can be used to return different types of data. In this post, we are going to learn how to use some of the debugging tools that SQLite/Android Room library provides in case standard tools are not helping. For Android, there is Android Room library, which is essentially a wrapper around SQLite. SQLite uses SQL and therefore allows the use of all its features such as inserting, updating, deleting data, joining tables, querying, etc. SQLite is one of the most popular databases when it comes to choosing persistence technology for Android.
