Page 4 of 5

From cloud to local database in jquery app

Posted: Tue Feb 21, 2017 7:12 pm
by Dennis

Arg! Just had to delete the app from my phone and compile again... Now the mapping is working.

But. The app still doesn't show the data, if I put my phone in flight mode?
What do I need to do, to download all the data from the DB to the phone on install?

Thank you again for your kind help


From cloud to local database in jquery app

Posted: Wed Feb 22, 2017 3:46 pm
by Serhii Kulibaba

You need to:
1) Install the app
2) Read data from the database
3) Turn off the Internet connection
4) Read data again (now the app has to use local data instead of remote )


From cloud to local database in jquery app

Posted: Wed Feb 22, 2017 4:52 pm
by Dennis

But how would I make sure all the different combinations of input and thereoff results of my querys are saved to the phone? And will this data be stored after the app has been shut down?


From cloud to local database in jquery app

Posted: Wed Feb 22, 2017 9:13 pm
by Serhii Kulibaba

Please look at this link for more information about the API Express offline mode:
https://docs.appery.io/docs/apiexpres...


From cloud to local database in jquery app

Posted: Thu Feb 23, 2017 9:12 am
by Dennis

Please have a look at the app here: https://appery.io/app/mobile-frame?sr...

I can't seem to find the answer in the docs. Only the first DB call gets "downloaded" to the phone.


From cloud to local database in jquery app

Posted: Thu Feb 23, 2017 8:32 pm
by Serhii Kulibaba

Please clarify, do you get the same data, if you turn off the internet connection? You have to read it at list once to save it locally.


From cloud to local database in jquery app

Posted: Thu Feb 23, 2017 8:45 pm
by Dennis

Yes, I get the same result.. But as soon as I change by input parameters and the app is making a new service invoke, the new results does not show up in offline mode.


From cloud to local database in jquery app

Posted: Fri Feb 24, 2017 9:47 pm
by Serhii Kulibaba

Do you run the "update" service to update these values in the database?
Please run it. If you are online - Appery.io will update them in the remote database, else - in the local (offline) database, which will update remote one right after the application will get an internet connection


From cloud to local database in jquery app

Posted: Sat Feb 25, 2017 6:23 am
by Dennis

I am not sending data to the database. Only showing records from it. Its very simple, and just based on a query to filter the data. I just want to be sure that all the data from the database is stored locally on the device, so that the user can do this offline.


From cloud to local database in jquery app

Posted: Mon Feb 27, 2017 11:19 am
by Serhii Kulibaba

If you need to store the changed value in the database you have to run the update service, because the read service only reads values, which are stored locally (remotely).

Yes, if you need just copy data from the server to the local database - just run the read service, when the internet connection exists