I have folder with assets. and i need to copy all media to
data/data/packagename/
and create there 5 folders for sounds imgs, videos. How can I do it???
try following,
File path=getFilesDir();
String mypath=path.toString() + "/myfolder";
OutputStreamWriter out;
try {
File f = new File(mypath , "/myfile.txt" );
out = new OutputStreamWriter(openFileOutput(f.getPath(),MODE_PRIVATE));
out.write("test");
out.close();
}
您的应用需要以下权限
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.