Savail
Savail

Reputation: 867

Is it possible to update assets in .apk without rebuilding and access to source code?

I need to share my .apk file with a team member but would like him to be able to change some assets (some .txt files in the assets folder). Afterwards could he install the .apk on his device with updated assets without having access to source code files of the project? Is this possible?

Upvotes: 0

Views: 934

Answers (1)

iamkaan
iamkaan

Reputation: 1515

Afaik, there is no way to change, insert or delete anything in already packed project.

So, I think it would be a good practice to use external storage instead of using assets. You are probably doing something like:

BufferedReader reader = new BufferedReader(
    new InputStreamReader(getAssets().open("something.txt")));

Instead of this, save your file somewhere in external storage and use this:

File sdcard = Environment.getExternalStorageDirectory();
File file = new File(sdcard, "something.txt");

Upvotes: 2

Related Questions