How to replace local files with updated files from a server?

rwblinn

Well-Known Member
Licensed User
Longtime User
Dear All,

building an app which uses several local sqlite db files. These are stored under File.DirRootExternal.

What is the best way to replace local files by updated files which are stored on a server?

In addition, is there guidance on how to implement a "check for updates" function.

Appreciated,
Rob
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Update data from server to local db on an app

Hi Erel,

I am looking for a solution using a server hosted by my third party web provider. Like transfer from http://mywebadress/myfile to my local app/storagearea/myfile.

Thank You
 
Upvote 0

CARTHO

Member
Licensed User
Longtime User
Hi
I have done that.
I simply put a record in server-database with a version no.
The app contact the server and fetch the record and all it does is a simple compare.
Depending on the result you will know if there is a need for downloading...

Consider if there really is a need for local storage.
Perhaps your app can ask the server and fetch whatever is needed "on the fly".
If there is only small records you will probably not notice the small delay...

Good luck with your project!
 
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
That is a good idea as one route. The other I found out, is using httputils2.

Thanks for your help.
 
Upvote 0

Petrovic

Member
Licensed User
Longtime User
Hi Cartho,

I need that solution for one of my apps, can you please share it with me.
 
Upvote 0

CARTHO

Member
Licensed User
Longtime User
Hi Cartho,

I need that solution for one of my apps, can you please share it with me.

Put a record in server-database with a version No.
Put a variable in your app with version No.
With every startup of your app contact the server and fetch the record and simply compare the two.
Depending on the result you will know if there is a need for downloading...
Thats all to it!
 
Upvote 0
Top