Issue I have a list of rows where each row has a checkbox icon that can be clicked or not. I want to be able to have a user check the box and then my app should save that state.
Continue readingTag: android-room
Android Room: SELECT DISTINCT for getting multiple columns
Issue I have query that gives all available trip numbers from Stations table (see below). Now I need get more columns in this query: tripNumber and also stationStart (timestamp as Long) from the first station of the each trip. Any
Continue readingNull object reference when I try to build room
Issue I want to build room in Kotlin using my function getDatabase(context) and I have this error : W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String java.lang.Package.getName()’ on a null object reference W/System.err: at android.arch.persistence.room.Room.getGeneratedImplementation(Room.java:77) This is very strange because
Continue readingRoom persistance library. Delete all
Issue How can I delete all entries on specific table using Room Persistence Library? I need to drop table, but I cannot to find any information how to do this. Only when database is migrating or to load all entries
Continue readingRoom cannot verify the data integrity
Issue I am getting this error while running a program with Room Database Room cannot verify the data integrity. Looks like you’ve changed schema but forgot to update the version number. You can simply fix this by increasing the version
Continue readingCreate Room Entity for a Table which has a field with LONG datatype in Sqlite
Issue App Database has Items table with a column Price with datatype Long. Db Version = 1 CREATE TABLE items (_id INTEGER PRIMARY KEY AUTOINCREMENT,item_id INTEGER,title TEXT,price LONG, UNIQUE (item_id) ON CONFLICT IGNORE) While trying to migrate to Room I
Continue readingHow to correctly add Room Persistence dependencies to my Jetack Compose Android app
Issue I have been struggling to add Room dependencies for a couple of days now(not proud). There is always an error no matter what i try. I am not the most experienced though. I added the below from the Android
Continue readingCan't add an item to room database
Issue For some reason I can’t add an Item to room database , The rest of my Daos are working ok but it seems @Upsert isn’t (obviously I’m messing up somewhere). I used the query in "App inspection" to add
Continue readingProblem with observing room database flows trough usecases
Issue I’m trying to get to know how to use flows in android app with clean architecture and MVVM using Room database. To do this i want to create basic notes app. Dependency injection is handled by Dagger Hilt. My
Continue readingAndroid Room database – how to get context in Automigration?
Issue I need to change the Room database schema. In addition to the usual things like deleting a database table or renaming columns, I need to do some data transformations. I have created an Automigration class and I want to
Continue reading