This is my first encounter with SQLite Database and I tried out this codes from http://www.androidhive.info/2011/11/android-sqlite-database-tutorial/
I have this in my Database Handler
// Deleting single contact
public void deleteContact(Contact contact) {
SQLiteDatabase db = this.getWritableDatabase();
db.delete(TABLE_CONTACTS, KEY_ID + " = ?",
new String[] { String.valueOf(contact.getID()) });
db.close();}
I wish to delete the data from another class (eg: when I click on a button in another java class, it will delete the data from the database.) How do I do that?
I managed to solve it by placing this in Database Handler
and then call this in my ResetActivity class (a different class)