Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy file to assets folder

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 )

??

like image 637
Sunny Avatar asked Dec 06 '11 11:12

Sunny


People also ask

What is the Assets folder for?

The Assets folder is where you should save or copy files that you want to use in your project. The contents of the Project Window in Unity shows the items in your Assets folder. So if you save or copy a file to your Assets folder, it will be imported and become visible in your Project Window.

Where is the Assets folder in Android?

In Android Studio, click on the app folder, then the src folder, and then the main folder. Inside the main folder you can add the assets folder.

What should I store in assets folder?

In Android one can store the raw asset file like JSON, Text, mp3, HTML, pdf, etc in two possible locations: assets. res/raw folder.


1 Answers

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.

like image 103
user370305 Avatar answered Oct 12 '22 03:10

user370305