java - Database clear each time my application runs -
does know how reset database everytime application executes in real device ?
i have code not work...
public void dodbcheck() { try{ file file = new file(context.getexternalfilesdir(null).getabsolutepath()); file.delete(); }catch(exception ex) { } }
any solutions ?
public void cleardatabase() { sqlitedatabase db = helper.getwritabledatabase(); db.delete({tablename},null,null) // write line each table in db. }
Comments
Post a Comment