I have a kind of heavy Android app and you want it to never be ANR.
I moved my database queries from the user interface thread (in AsyncTasks), but I am still reading the cursor in the ui thread, since I believe that the returned cursor is stored somewhere in memory, that is, its actual reading does not go all the way to the database. Is this correct or do I really need to move all cursor reads to uninitialized threads?
More specific:
Is there, for example, http://developer.android.com/reference/android/database/Cursor.html#getInt(int ) read from memeory, or does it use some kind of read lock from a real SQLite database.
I assume that the Cursor implementation in my case is SQLiteCursor, since the ContentProvider is implemented using the SQLite database.
source
share