First of all, correct me if I’m wrong, but if you close a database connection, you can’t use the Cursor you got from it, correct?
db.open();
Cursor c = db.query(true, "MyTable", columns, null, null, null, null, null, null);
db.close();
// The Cursor is empty now because the db was closed...
c.moveToNext();
Log.v(TAG, c.toString(0));
So is it there any way to use the Cursor after closing the database? Like is there any way to pass it elsewhere and use it kinda like an object? Or do you always have to leave the database connection open until you are done with the cursor?
No, As it says in the link below, if you close the database, the cursor becomes invalid.
Will cursor be still alive after database is closed?