Vinay Patil
Vinay Patil

Reputation: 77

develop web app depending on existing android app which has sqlite database

I have developed android app in ionic 3 with sqlite offline database which sync to server when there is a network available. this is working perfectly now.

Now i want to move on and develop PWA app for same, but i think sqlite not works in browser platform. if works how to make it work. Now its giving "error typeerror cannot read property 'executesql' of undefined in browser platform ionic 3" after running app.

i have struck here please help me out how to move on now.

Basically i want to develop web app depending on existing android app which has sqlite database.

Thank you

Upvotes: 0

Views: 312

Answers (1)

alexortizl
alexortizl

Reputation: 2680

For PWA offline storage usually the best choice is to go with IndexedDB. It is a database API built in the browser. It is not a SQL database so you would have to migrate your tables. Here you can find more information. Also IndexedDB is a little tricky to work with, you might wanna give a try to PouchDB. It is a database for browsers that uses IndexedDB under the hood and is easier to work with.

Upvotes: 1

Related Questions