0

i am new on android and i am develop an alarm aplication i have found this error when i set alarm

Finalizing a Cursor that has not been deactivated or closed.
database = /data/data/com.time/databases/Salarm.db, table = ASTimer,
query = SELECT _id, description, altime, status, frequency, prealarm FROM ASTimer WHERE status='ON'

Code :

public Cursor getAllAlarmON()
{
Log.i("alarm","Fetching records from the database...");

Cursor cursor= db.query(tableName, new String[]{"_id","description","altime","status","frequency","prealarm"}, "status='ON'", null, null, null, null);

return cursor;
Squonk
  • 48,735
  • 19
  • 103
  • 135

1 Answers1

0

Make sure you close your cursor using cursor.close() before closing the database or use startManaginCursor(cursor).


Take a look at : finalizing-a-cursor-that-has-not-been-deactivated-or-closed-non-fatal-error

Community
  • 1
  • 1
Imran Rana
  • 11,899
  • 7
  • 45
  • 51