简体   繁体   中英

Storing android app raw files in a specifc directory in internal storage

I am developing an app with checkboxes buttons and all that stuff , but the issue is that i want to store some raw files so that my app can access them and copy them to a desired directory like lets say /system ... (ofcourse m rooted !) here is more explantion ...

say i have myapp.txt ---> where shall i place this in the source code of my app

also i want myapp.txt to be accessable by me only (my app only) how could this be possible if i placed the file in the internal storage?

If you want to add something like "myapp.txt" to every app installation in the internal storage, create a folder called "assets" directly in your app folder (basically beside src and res) and place it there. The correct path to the file from code would then be "file:///android_asset/myapp.txt".

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM