mercredi 4 mai 2016

Show progress until and unless all data is inserted into Sqllite database in cordova

Recently I got stuck to one issue in my Hybrid mobile app using cordova and angular Js, I have come to an situation wherein data is to be pre-filled in sqllite(websql) database on app load / device ready event.

Now the problem here is i have 20 tables in which data is to be stored and each table carries >= 50 records which is inserted using FOR loop, I am able to insert those records but it takes too much time, and the progress bar for inserting data disappears after some time; so what i want is, is there any method by which i can make sure that all tables are created and records are inserted into the table and the progress bar remains until and unless everything is done..

I have done couple of things but they didn't worked - 1) tried nested the table for insertion i.e. until and unless insertion is done on one table other table insertion won't start. 2) tried to capture success callback and stop the progress bar on success, but still insertion of records is going on in background.

Please help me on this.

Thanks. Krunal

Aucun commentaire:

Enregistrer un commentaire