Force asset overwriting on a Android device

Hi friends,

I would like to share a trouble concerning updating app in Android. For a better explanation, consider the following example:

  • Suppose I create a very simple app containing a background music (song.mp3) and then I install it on an Android device. This audio file, of course, is stored in the system.ResourceDirectory.

  • Now suppose I would like to update the audio file (with a new song, for exemple), but keeping the same filename (song.mp3).

OK, this works nice on the simulator, but when I generate a new build for Android and try to update the original app on the device, I notice that the original audio file are not overwritten (or remain in some kind of cache). Please, try it.

I’m wondering if there is a native instruction that could be implemented in Corona to force asset overwriting on Android. This is an annoying trouble I face every time I need to update audio and txt assets on an Android device.

Thanks in advance!

EDIT: This problem doesn’t occur with png images. [import]uid: 29154 topic_id: 16662 reply_id: 316662[/import]

I’d like to know this - at the moment I just give each build a different version number and package name (i.e. Game 0.337 & com.mysoft.game0337), so I get a fresh install each time.

Obviously this means having to uninstall each build at some point to get the space back. [import]uid: 93133 topic_id: 16662 reply_id: 62332[/import]

Sorry, my fault. When you update the app on device, png files are overwritten, but not other assets like the audio files and txt files. I will edit the initial post. [import]uid: 29154 topic_id: 16662 reply_id: 62392[/import]

OK, I wrote a simple app to demonstrate the problem. Please, download it here:

http://parreiraeouti.com.br/Stuffs/AssetNotOverwritten.zip

The app just plays a mp3 audio file and sets its volume according to the value read from a txt file.

How to make the test:

  1. Run the app on the Corona simulator, generate a build for Android and install it on the device. Observe how the app runs on the device.

  2. Now back to the resource folder, open the “volume.txt” file and change the volume value (0.3, for example). Save the file.

  3. Repeat the step 1 to update the app on the device (without uninstall it). You will see the volume will not changed.
    Another test:

  4. Replace the original “song.mp3” with a different “song.mp3”.

  5. Repeat the step 1 to update the app on the device (without uninstall it). You will see the audio will not changed. [import]uid: 29154 topic_id: 16662 reply_id: 62424[/import]

I think I know what the problem is. I’m going to bump up the priority of this issue and look into fixing it by next week. Thanks for bringing this issue to our attention… and for the details steps on how to reproduce it. [import]uid: 32256 topic_id: 16662 reply_id: 62437[/import]

Thanks Joshua! :wink: [import]uid: 29154 topic_id: 16662 reply_id: 62549[/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. Again, thank you for reporting this issue. The details you provided us helped us narrow down the issue. [import]uid: 32256 topic_id: 16662 reply_id: 64783[/import]