Changing txt file between builds requires uninstalling and reinstalling

I have level data stored in .txt files in the root of my project directory. If I update one of these by hand it works great in the simulator. When I build and deploy on my Android phone it still loads the old .txt level data. If I completely uninstall and then reinstall the apk, it loads the new levels.

Any ideas why it wouldn’t be copying over these txt files unless I completely reinstall? Thanks! [import]uid: 84258 topic_id: 14224 reply_id: 314224[/import]

I think it is supposed to be working that way… just think of the situation when you are releasing version 2 of your app. do you want your game progress or data saved in your text files to be gone by installing that version ? [import]uid: 71210 topic_id: 14224 reply_id: 52430[/import]

Ya, that’s a good point. Although that’s what I thought the system.DocumentsDirectory would be for. To store things like user settings or saved games.

The files I have are static and never modified by the user. They are just level data. Once my app is put on the market I’d like a way to tweak some levels slightly (for bugs, exploits, etc), and I could do it by changing these files in my root folder and sending out a new version. Is there a better way to store data like this? [import]uid: 84258 topic_id: 14224 reply_id: 52431[/import]

Hmm, if you increase the version number assets should be overwritten. Of course files generated by your app (save files etc) shouldnt/wouldnt be. [import]uid: 8872 topic_id: 14224 reply_id: 53550[/import]

Nope, just tried increasing version number and .txt files in system.ResourceDirectory do not get overwritten. Any other ideas? [import]uid: 84258 topic_id: 14224 reply_id: 54564[/import]

That is a very frustrating issue on Android. Every time I want to update an asset (like an image, an audio or a level file) from the system.ResourceDirectory, I need to change its filename. This is the only way I found to avoid the problem. Consequently, the original asset becomes a trash in the installation.

When you try to update an app on the device, Android seems to save the new/updated asset file, but it doesn’t overwrite the original one. You can confirm this by cleaning the app data (in the Application Manager from the device) and restarting the app. This, of course, is not a solution, because it also clears other important data previously saved on the system.DocumentsDirectory.

Since this problem doesn’t happen in iOS, it’s something that can easily (and dangerously) go unnoticed when we generate builds for both systems. [import]uid: 32230 topic_id: 14224 reply_id: 61998[/import]

Everyone,

I’ve written up a bug report on this issue and marked it high priority. We’ll look into fixing it next week. Thank you for reporting this issue to us. I apologize for the trouble this issue has caused you. [import]uid: 32256 topic_id: 14224 reply_id: 62448[/import]

Everyone,

This issue is now fixed. The fix will be in daily build #653, which will be available to you if you are a paid subscriber. [import]uid: 32256 topic_id: 14224 reply_id: 64784[/import]

Thank you very much, Joshua. I’ll try the build #653. [import]uid: 32230 topic_id: 14224 reply_id: 65039[/import]