I have an Sqlite database that has a collection of locations. And a continuously running service which runs in background and get location and compare with stored locations available in database.
Currently I am reading data through SQLiteDatabase.query method which returns cursor. But application is crashing due to this (Already cursor closed error)
My question is How can we access database or use cursor in service? What would be the best way to use cursor in service?
I don't know about content provider much. But have doubt that I need to implement ContentProvider for this purpose.
I am stuck here. Please guide me for this.
Thanks in Advance.
Aucun commentaire:
Enregistrer un commentaire