Dennis
Posts: 0
Joined: Tue May 05, 2015 1:29 pm

From cloud to local database in jquery app

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

From cloud to local database in jquery app

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 )

Dennis
Posts: 0
Joined: Tue May 05, 2015 1:29 pm

From cloud to local database in jquery app

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?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

From cloud to local database in jquery app

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

Dennis
Posts: 0
Joined: Tue May 05, 2015 1:29 pm

From cloud to local database in jquery app

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

From cloud to local database in jquery app

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.

Dennis
Posts: 0
Joined: Tue May 05, 2015 1:29 pm

From cloud to local database in jquery app

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

From cloud to local database in jquery app

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

Dennis
Posts: 0
Joined: Tue May 05, 2015 1:29 pm

From cloud to local database in jquery app

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

From cloud to local database in jquery app

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

Return to “Issues”