Persistence of SQLite

This is exactly I faced in our internal team app. Some of the users were reporting being logged out every now and then. Problem with my case was app was unintentially using websql sometimes instead of sqlite.

I mentioned it here and here

Maybe it can help you. See this gist - https://gist.github.com/aggarwalankush/0b700328e797e22a1d9994cb35afdf09

And sample usage in my app -
https://github.com/aggarwalankush/ionic2-mosum/blob/master/src/providers/database.service.ts
https://github.com/aggarwalankush/ionic2-mosum/blob/master/src/providers/sql.ts