Use a Cursor field in another method
- by Mats Hofman
Hi,
In my app i have have a Cursor field and in the onStart() method of my Android Service I create it by fetching records from my database. When i look into my cursor in the onStart() method i find a number of records but when i try to use them in my trigger() method it has zero records.
the field
private Cursor c;
in onStart()
c = dbHelper.fetchAllRecords();
in trigger()
c.getCount() returns null
I didn't close the cursor earlier than in my onDestroy() method