I need to use some files in my app. They are kept in asset folder. I saw discussions on SO, where the files are being copied from asset folder, to /data/data/ on the internal storage, and then being used. I get the code, but what I do not get is, what is the need to copy the assets to internal storage ? If anybody has experience with this, help !
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I think you can't edit/modify data in asset folder in run time or after application installed .So we move files into internal folder then start working on it.
Try this:(Use all three method its work for me and assign destination path in "toPath" string object)
One reason that just popped up for me is when using existing C/C++ code with NDK that requires a path to a file and you don't want to modify that code.
For example, I'm using an existing C library that needs some data files and the only existing interface is some "load( char* path )" function.
Perhaps there is actually some better method but I have not found any yet.