I wanted to save an ArrayList to SharedPreferences so I need to turn it into a string and back, this is what I am doing:
// Save to shared preferences Shared
I ended up using:
ArrayList appList = new ArrayList(Arrays.asList(appsString.split("\\s*,\\s*")));
This doesn't work for all array types though. This option differs from:
ArrayList array = Arrays.asList(arrayString.split(","));
on that the second option creates an inmutable array.