Do you know how to make Room DAO return a LiveData<Cursor> ?
I need to request a lot of objects from my DB.
Because of memory issues, I don't afford an heavy object list, I need a Cursor.
Of course data could be updated and I need to be notify when it occurred.
So a LiveData<Cursor> should be a good solution.
But, when I compile this :
@Dao
public interface FooDao {
@Query("SELECT * FROM foo")
LiveData<Cursor> getFoo();
}
Android Studio says to me :
Error:(22, 22) error: Not sure how to convert a Cursor to this method's return type
Well... Please do not tell me we can't get notify of data updates with a Cursor :/