I have a couple asset files stored in the assets folder.
I use AssetManager getAssets and copy those files to an external dir:
in = assetManager.open(filename);
File outFile = new File(getExternalFilesDir(null), filename);
out = new FileOutputStream(outFile);
String filePath = outFile.getAbsolutePath();
Then I use the file paths to open the files:
this.mydat = new RandomAccessSteamIn();
this.mydat.setFile(filePath1);
this.mydat = new RandomAccessFile(filePath2, "r");
to read the binary asset files.
This is my first time deploying an Android app, so I have some questions:
On every app upgrade, I would like to replace the binary files in the assets folder (with newer versions), but keep the file names. Will this be a problem, if every time I detect an app upgrade, I copy the files over again to the external dir?
Is there a better way for achieving this?