I am working phonegap application. I had done the remember me functionality in my application. so if user used the remember me option. just i redirect the user to inbox mail page. but the database are deleted when application close and open the second time. the Issue is database value not loaded in my inbox. I don't want to delete the database when user close the app without logout. please help me.
I created the database body onload="init()"
function init() {
document.addEventListener("deviceready", onDeviceReady, false);
delete init;
}
function onDeviceReady() {
if(window.localStorage.getItem("remember") == null)
{
db = window.openDatabase("SampleDB","0.1","Name DB", 5000000);
db.transaction(createDB, errorDB, txSuccess);
}
}