How to overwrite android asset?

android, download-manager, file, java, overwrite

Solution

You cannot replace an asset -- assets, like resources, are read-only.

Instead, you will need to adjust your application to detect if you have downloaded the replacement file and use that instead of the asset if it is available.

Problem

I have small XML(KB) file in my assets folder. My application draws data from it. But then I have downloaded an updated version of the file I need to replace it somehow and I don't know how to? Since I am developing on higher API`S I can use DownloadManager class.

Original source