Copy file to assets folder

Sunny picture Sunny · Dec 6, 2011 · Viewed 8.6k times · Source

After searching 1 hour i do not found any solution to my problem.

I want to move a file from sdcard to assets folder and also overwrite the existing file in assets folder (both file are sqlite database have same name with just a little difference in data )

??

Answer

user370305 picture user370305 · Dec 6, 2011

Actually, The behaviour of the android .apk file is read only so the directory structure which are in that apk file follows the same, So no one can write this files or make changes on that at runtime,that's why You can't make a changes in /asset folder at runtime. you can read file from it (means copy files which are available in asset to any internal storage or /sdcard but not write it to vice-versa)

Its apply on all the directories which are build in .apk files. As per docs.