Skip to content Skip to sidebar Skip to footer

Android.database.staledataexception : Access Closed Cursor

I am using a custom listview in my activity and trrying to populate it with values. But, I am getting this 'staledataexception', which i dont undersdtand why.... Here is the code,

Solution 1:

You seem to be getting the cursors using managedQuery.

I had problems with restoring an application, which for some reason in Icecream Sandwich did not close the cursors properly. The fix was to do this for all cursors right after using them:

if (cursor != null && !cursor.isClosed()) {
  myActivity.stopManagingCursor( cursor );
  cursor.close();
}

Post a Comment for "Android.database.staledataexception : Access Closed Cursor"