1,118 questions
1 vote
0 answers
33 views
Display data from a Cursor in a LazyColumn
I'm converting an android app to Jetpack Compose and would like to convert a RecyclerView that displays hundreds of thousands of rows into a LazyColumn. I used a RecyclerView.Adapter for the ...
0 votes
3 answers
296 views
How to get a Cursor from Room in a coroutine?
Trying to get this cursor: @Query("SELECT * FROM category") fun getCursor() : Cursor with this code: lifecycleScope.launch { binding.category.adapter = ...
0 votes
1 answer
101 views
The query() method from RoomDatabase doesn't work as expected. How does the query() work under the hood?
While exploring the capabilities of the Room library and the RoomDatabase class, I decided to test the query() method. Since the description in the official documentation does not contain any ...
0 votes
1 answer
112 views
How change the bottom leaf color of the cursor in flutter
In the following code, I want to change that blue leaf color to black (have attached the image) I know how to change the cursor color but how to change this leaf color? I am not even sure that's the ...
0 votes
1 answer
151 views
Android MatrixCursor not adding new row
I need to mock a Cursor for some content provider unit tests, but the addRow method is not working for some strange reason. After adding a row, the count always remains 0. What am I missing? @Test fun ...
0 votes
1 answer
315 views
how can i get date_taken value of photo in media store?
The app analyzes emotion by taking all the photos in the phone's MediaStore and sending the photos containing the face(s) in the loop to our model. However, instead of looking at the whole MediaStore ...
0 votes
1 answer
594 views
How can I get photos from MediaStore in 2 different time periods in Android Studio?
The app analyzes emotion by taking all the photos in the phone's MediaStore and sending the photos containing the face(s) in the loop to our model. However, instead of looking at the whole MediaStore ...
0 votes
1 answer
498 views
Is there another any reason a CursorWindowAllocationException might happen other than unclosed cursors?
I have gone through and made sure all my Cursors are closed. I am running with strict mode with detectLeakedSqlLiteObjects and detectLeakedClosableObjects and that never gets triggered. But when ...
0 votes
1 answer
50 views
Unable to print out generated list with SQL Database statements [Android Studio]
I have coded some code that connects to a databse in the internal storage of the device, runs a SQL statement to filter out excercises, then iterate through the results and create a list that can be ...
0 votes
1 answer
111 views
cursor adapter getview problem at position 0
I'm working o a calendar app with events and I save them in MyDatabaseHelpe, the events are shown in a listview by day, my problem is that in onitemclicked, I want the data of the event to be shown in ...
0 votes
1 answer
194 views
Make sure the Cursor is initialized correctly before accessing data from it
I am new to android using kotlin.I am getting this error message in my log. Caused by: java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is ...
0 votes
1 answer
616 views
"Cannot figure out how to read this field from a cursor" when trying to get List of entries inside a custom return type
I was trying to return multiple values from the table with such a query: ` @Query("SELECT *, AVG(engineCapacity) as avgCapacity FROM Car WHERE bodyType=:bodyType") fun getByBodyType(bodyType:...
1 vote
2 answers
59 views
How to get the only phone number from the device contact, not whats app and duo number, etc
How to get the only phone number from the device contact, not whats app and duo number, etc... Example: I got the device contact number, but that return Phone Number What's App Number Google Duo ...
1 vote
1 answer
68 views
Text Selector Cursor is Not disapeared After Switching the Fragments
I am building a android app in which there is a screen in which there are two tabs in form of fragment fragments are basically used for language translation. The problem is when i input something ...
1 vote
1 answer
208 views
error: Not sure how to convert a Cursor to this method's return type (com.madstone.tageditor.database.TrackFileAndSong)
I'm getting the error following error when building the project in android studio error: Not sure how to convert a Cursor to this method's return type (com.madstone.tageditor.database....