Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
My suggested fix:
src/org/transdroid/preferences/ImportExport.java line 20 change to:
public static final String DEFAULT_SETTINGS_DIR =
Environment.getExternalStorageDirectory().toString() +
"/Android/data/"+this.getPackageName()+"/data";
Might also want to check if the old config json file exists and move it.
Original comment by kellans...@gmail.com
on 25 Apr 2011 at 5:10
You would think that (and it was my first approach) but there is a problem with
that firectory (which is actually the result of calling
getExternalStoragePublicDirectory()): it is removed on update or unintall of
the application. That would mean it looses the settings file every time you
update or uninstall Transdroid - which kind of was the reason to have a
persistent settings file in the first place. Since there is no common directory
to store really-persistent files on the SD card I opted for this approach
instead. Also, you can specify your own directory.
Original comment by erickok@gmail.com
on 26 Apr 2011 at 7:27
Oh, wow. That's good to know. Thanks for the explanation!
Looks like that's a bug, actually:
http://groups.google.com/group/android-developers/browse_thread/thread/b68d40b1f
13e12df/68fae7adf5c545f6
Original comment by kellans...@gmail.com
on 27 Apr 2011 at 12:00
Original issue reported on code.google.com by
kellans...@gmail.com
on 25 Apr 2011 at 4:34