Category "android-room"

error: [MissingType]: Element 'xxxxx.AppDatabase.room' references a type that is not present

error: [MissingType]: Element 'xxxxx.AppDatabase.room' references a type that is not present I get the mentioned error in the title when I try to compile my cod

Kotlin Flow returned from Room does not update when an insert is performed from another Fragment/ViewModel

I have a Room database that returns a Flow of objects. When I insert a new item into the database, the Flow's collect function only triggers if the insert was p

How can I solve this issue on Mac M1 Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch64

I solved this issue with the code below in my build.gradle allprojects { configurations.all { resolutionStrategy { force 'org.xerial:sqlite-jdbc:3

How to manually update a kotlin flow

I'm trying to update the source of a Flow in Kotlin and I'm not sure if this is the right approach and if it's possible with Flow at all. I have a database cont

How to Unsubscribe from coroutine flows right after RoomDb call

I'm trying to query Room database(action 1) and then based on the returned results perform another action on the same table. however I noticed that every time I

Kotlin read from room database in fragment

I write an application with room database and I have a problem with reading data and use it in the mine thread. consider tables as those: Table1 | ID | Name |

Do I need to mention the coroutine dispatcher while working with Retrofit and Room?

Recently I saw this - Most data sources already provide main-safe APIs like the suspend method calls provided by Room or Retrofit. Your repository can take adva

Sending an ID or an object as String to the next screen in Jetpack Compose?

I have 30 users displayed in a LazyColumn. On user click, I navigate forward to UserDetailsScreen. My question, is it better to pass the ID of the user and crea

How to filter data by date and month only in room database and ignoring year

@Query("Select * From Mstudent where (strftime('%d%m',dob)) = :todayDate order by (strftime('%d%m',dob))") List<Mstudent> getStudentByBirthDate(Da

How to access and return the result of an AsyncTask from a repository?

I'm new to coding, put already in a lot of hours and feel like I'm progressing step by step. However, I've encountered a problem that I was not able to solve ev

How to delete audio file record and remove checked recyclerview item after user clicks 'Yes' on alert dialog

I have an alert dialog that pops up when the user clicks the delete button. Alert dialog When the user clicks yes, I want the recyclerview item they selected to

Clear table and reset autoincrement primary key

I want to delete all from my table and reset autoincrement primary key. I do this : @Query("delete from sqlite_sequence where name='bin';") void delete(); @

Android Studio Database Inspector always showing database as "closed"

I am trying to use Database Inspector in Android Studio. Why I run the app on the device, it inspector is always showing my application database (highlighted in

Android room persistent: AppDatabase_Impl does not exist

My app database class @Database(entities = {Detail.class}, version = Constant.DATABASE_VERSION) public abstract class AppDatabase extends RoomDatabase { p

Pre-packaged database has an invalid schema error

I'm building an Android application based on an old Android project. In my new application I'm using Room. I have to use the same database that is used in the

Room database reset to default values which was set by prepopulating database when clearing app from background

I have a database which is prepopulated with some tables which is working fine. I have prepopulated my db. like this Room.databaseBuilder( get(),

Room database - edit entities

I have a question. I edited my Room entity from this: @Entity(tableName = "users") public class User { public User(String username, String email, String passwo

Android custom keyboard suggestions

I am building a custom keyboard for android, the one that atleast supports autocomplete suggestions. To achieve this, I am storing every word that user types (n

Room database - edit entities

I have a question. I edited my Room entity from this: @Entity(tableName = "users") public class User { public User(String username, String email, String passwo

Single or multiple DAO and Repository in Android Room database project?

I have a Room database project which has a DAO and a Repository (mediator between different data sources) for each table in the database. It is a lot files and