I myself am never experienced in java, I think you will educate me better. There is a code for android 2.1, I want to save certain data (short text files) from one function. It is highly desirable to save not in internal, but on a USB flash drive. The easiest way of course is to pour into the root, but I am an adherent of tearing hands off for that. Therefore, the question is how to determine where to write?
I tend to determine the path in this way (but strains hard coding :))
private String appPrivateDir = Environment.getDataDirectory().toString()+"/data/"+getClass().getPackage().getName().toString()+"/files";
still thinking about this
but it succinctly displays only / sdcard, which is also not very comfortable))
ps and the second abstract question, with the help of sharedPreferences can multiline values be saved? getString () will not be enough ..