I am using Android Studio Jellyfish to write Kotlin.
Let’s say I have a file called “database.csv”, and need to read and write from it as part of the functioning of the application. I do not want the user to be able to access this file directly from their phone.
I tried placing it in the assets and res/raw folders before discovering that I can’t write to them after compile time.
I’ve seen some things about a data/data folder, but can’t seem to locate it in Android Studio.
If that’s the right way, how and where do I create it in my Android Studio project folder?
0
I’ve seen some things about a data/data folder, but can’t seem to locate it in Android Studio
Internal storage is on the phone. While you can view internal storage via the Device File Explorer tool in Android Studio, internal storage is not part of your project. You can access it at runtime using getFilesDir()
on a Context
. You can copy your asset or raw resource to internal storage, and from there use the copy on internal storage for reading and writing.