Nekomajin42
Nekomajin42

Reputation: 688

Android: Compile data file into app folder

I am developing an Android app, which needs to read a data file, so it can process and display it. This files will be updated from a remote location from time to time.

I have a working code to download this file from a remote location after installation, read it, then write it into the files folder of the app. I also know that I can place it into the res/raw folder and perform the same read->write operation. Both options work, I don't need help regarding these.

But I would like to omit these options if possible, and place this data file into the files folder during development and compile it into the apk.

Is it possible? If so, how can I do it?

Upvotes: 0

Views: 158

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007276

I have a working code to download this file from a remote location after installation, read it, then write it into the files folder of the app.

I am going to guess that by "the files folder", you are referring to something like getFilesDir().

Because I think it's a redundant step to copy a file from one folder to the other, IF I can place it right where I want it.

Sorry, that is not an option.

Upvotes: 1

Related Questions