Android Error: android.database.StaleDataException: Attempted to access a cursor after it has been closed

During my android development, I came across this during run time:

android.database.StaleDataException: Attempted to access a cursor after it has been closed

I looked over the internet to look for solution on this issue. Many suggestions came out but only one suggestion solved “android.database.StaleDataException: Attempted to access a cursor after it has been closed” error.

It is by using startManagingCursor(cursor). The “cursor” is your result holder of your db query. Do not close you cursor for this time it is handled by the startManagingCursor in its proper time.

Hope this helps.

Advertisements