My application needs a configuration file. In the order of priority:
1) User should be able to update it by connecting the phone to the pc & select mass storage mode
2) My application needs to be able to read & overwrite
3) I should be able to distribute it with my installer
How can I do this? I checked “Using the External Storage” on this this page but getExternalFilesDir(null).getAbsolutePath() returns /mnt/sdcard/Android/data/com.MyApp/files and I think I cannot put files in that location with installer.
First you can’t use the external storage ( sd card ) because it is mounted when connected to PC so you won’t have access to it. If you want to have access to the config file while connected to pc you have to store it in PhoneStorage. Here is the documentation for the internal storage. In order to distribute your config file with the installer you can use pre-defined config file in the Assets folder and copy it in the InternalStorage at install. So these are the basic steps
If you have some issues implementing them please feel free to ask.