harveyslash
harveyslash

Reputation: 6034

Pack the app with some files in the data->data->files directory

I have some files that I want to read from my app.Currently, I have to do the following:

  1. Check if the file exists in the files directory.
  2. If it doesnt, then copy the files from assets to the files directory
  3. If it does, then, skip step 2

So, is it possible to not copy the files ? This increases the size of my app (uselessly) as there is an extra copy of all the files.

Note, that I have to access the file using getfiles(). I am using a library that doesnt work if I give the uri of my assets folder.

So, it it somehow possible to compile the app with some files already in the files directory ?

Upvotes: 1

Views: 132

Answers (1)

Damian Petla
Damian Petla

Reputation: 9103

Internal storage for you app is created when application is installed so there is no way to provide files there during compile time, that would be magic.

You could try creating ContentProvider for sharing your files stored inside assets folder.

Besides, you should tell which library you are using. Then I may be able to suggest something more precise.

Upvotes: 1

Related Questions