Jump to content
Vandrovnik

Android - new version of file in assets\internal\

Recommended Posts

Hello,

 

I have a text file which I need to load from my app on Android. So I put it in Deployment Manager, remote path = assets\internal\ (tried assets\internal too).

 

For the first time, it works fine - file is deployed and I can read it in my app from tPath.Combine(tPath.GetDocumentsPath, TestFileName);

 

But, when I update the file and deploy again, my application still sees the old version of it. In Deployment Manager, there is a column named Overwrite, I have set it to Always.

When I uninstall and deploy again, application has access to new version of the file.

 

Looking to System.StartUpCopy.pas, it seems that it never overwrites existing files.

 

Please how to solve it? I need my application to be able to read actual version of the file. I probably could change the name of the file each time I make a change in it, but I do not like this way because I will certainly sometimes forget to rename it.

 

Kind regards,

 

Karel

 

Share this post


Link to post

Hmm, for now "solved" for deployed file MyFile.txt on app start:

- if exists, delete MyFile2.txt

- rename (deployed) MyFile.txt to MyFile2.txt

- in the app, use MyFile2.txt

 

Share this post


Link to post

I have had a lot of problems like this in past ; I solved them by downloading the files on boot, with a version id management.

Edited by weabow

Share this post


Link to post
16 hours ago, Vandrovnik said:

Hmm, for now "solved" for deployed file MyFile.txt on app start:

- if exists, delete MyFile2.txt

- rename (deployed) MyFile.txt to MyFile2.txt

- in the app, use MyFile2.txt

 

I use this approach, too.

Share this post


Link to post

What I have been doing is a comparison reading the version inside the file.  If different delete the original file, restart the app and the newer version takes over.  I like this approach much better.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×