Im performing certain database operations after which I attach Cursor to the SimpleCursorAdapter for display List on my ListActivity. If I close the cursor in finally block (or anywhere after the code below), nothing is displayed in the list
SimpleCursorAdapter scAdapter = new SimpleCursorAdapter(this,
R.layout.list_row, cursor,
new String[] { Constants.KEY_TITLE }, new int[] { R.id.text1 });
If the cursor is not closed, Android throws exception when activity makes request to another activity or is passivated.
PS I tried closing cursor inside onPause(), but android complains before onPause is called.