I have an application where the user logs in the first time, I save Token
and NIU
, so the next time he accesses the application, he already goes directly to Webview
using this token e NIU
who are in the bank. However, I need to delete this data when the user clicks the "Exit" button on webview
. I already have a treatment for this button (exit), I can enter the database erase treatment here too, how to do it?
BT_SAIR METHOD:
private void SairWV(){
Intent intent = new Intent(Webview.this, MainActivity.class);
startActivity(intent);
finish();
METHOD TO INSERT THE BANK:
public long insere (Token token){
dao = new BancoDeDados(context);
SQLiteDatabase db = dao.getWritableDatabase();
dao.onCreate(db);
ContentValues dados = pegaDadosDoAcesso(token);
long inserir = db.insert(NOMETABELA, null, dados);
db.close();
Log.i(NOMETABELA, inserir + "");
return inserir;
}