Questions tagged [android-room]
For questions related to Android Room Persistence Library (which is a part of Android Architecture Components)
android-room
7,051
questions
0
votes
0
answers
6
views
How to store drawables in a pre-populated room database
I'm working on small app in kotlin for android and i used sql to make a small pre-populated database of books which i then load into a room database. I want to store the images of the books inside the ...
-3
votes
1
answer
43
views
Why is my code not pre-populating the database?
My app collects data for experiments. I am trying to pre-populate the database. I create directories for each experiment and store the database in each of those.
Folder storedData holds the database ...
0
votes
0
answers
21
views
What gradle entries are required for implementing KSP and Room in a Kotlin Multiplatform
I am in the process of converting a kotlin application to kotlin multiplatform (anroid only for now to get through initial configuration) with room. This included moving to a libs.versions.toml file ...
0
votes
3
answers
33
views
App crashes when trying to use a pre-populated room database due to difference between the schemes
I'm trying to make a small app for a project and decided to use a pre-populated database however i keep getting an error that says that the Expected and Found schemes are different, but i don't know ...
0
votes
0
answers
16
views
Observe only affected rows in Room Database table android with LiveData
I have one room database table, and I have query as
@Query("Select * from message WHERE myId = :myId AND createdAt NOTNULL ORDER BY createdAt DESC")
fun getAllMessagesByRoomId(myId: Int): ...
0
votes
1
answer
23
views
Room Flow - How to handle updates of dynamic-based param request?
Given a room Database and a request with a DateTime based parameter :
@Transaction
@Query("SELECT * FROM itemModel WHERE datetime(datetime(`end`), 'localtime') > datetime(:minDate, 'localtime'...
2
votes
0
answers
46
views
Jetpack Compose CRUD application views don't refresh
I'm new to Android Compose. I'm generally teaching my daughter how to code and we decided to start with something that has an UI,so we chose Android to start. I made an app in Jetpack Compose and I ...
1
vote
1
answer
58
views
There is a delay when saving data into a Room Database
I'm trying to create a stop watch application. Everything works fine at first. The stop watch goes up from the milliseconds, to the seconds, to the minutes just fine. There are two timers, one of the ...
0
votes
0
answers
24
views
Android Kotlin Infotainment app with ROOM DB - error: Not sure how to convert a Cursor to this method's return type (java.lang.Object)
I am new to Android infotainment app development, I am storing the data in DB and get the data from DB and place the data in Google maps using PlaceListMapTemplate.
Can we use Room database in Android ...
1
vote
1
answer
42
views
Kotlin Android different (Module:App) build.gradle structures makes tutorials hard to follow
I am quite new to developing in Android for kotlin.
I was trying to follow a tutorial on how to setup a local Room Database in my App, but my build.gradle looks completely different than the persons ...
0
votes
0
answers
21
views
Android - Room Database enter loop on data update
I’m developing an app using Jetpack Compose, Room, Flow, Kotlin, and following the MVVM architecture. My app includes the following screens:
HomeScreen: Displays the budget and a list of products.
...
1
vote
1
answer
26
views
How can I retrieve the value from my roomDatabase before the Text composable needs it so it doesn't display null?
In my app, a Text composable calls the roomViewModel to display the energyState, but it shows null. I want the observer (the Text composable), to display the value of the "energy" column ...
0
votes
0
answers
52
views
Room DataBase in KMP
I have a database ( mysqlite_sampel.db), I want to put it in the files folder and use the information in it, how can I use a database that is in the files folder both in Android and iOS and ROOM and ...
0
votes
1
answer
44
views
KSP library for room
I want to use the room library for database, when I add the room library to my project, I can easily use it and I have no problem, but in order to be able to use room properly, I must I use ksp, well, ...
0
votes
3
answers
89
views
cannot resolve method 'databaseBuilder()' in 'Room', Java
I'm trying to build an app with Android using room as a database. While initializing the database I seem to have a problem using the databaseBuilder() method of room. I always get the error: can't ...