I have an ArrayList that I’m writing out as a string:
blastScores = new ArrayList<String>();
blastScores.add("Hello");
blastScores.add("Yo");
prefs.edit().putString(CaptureActivity.BLAST_SCORES, blastScores.toString());
Whenever I read it in, it is always null:
String blastScoresString = prefs.getString(CaptureActivity.BLAST_SCORES, null);
Why is this?
Have you done a
commit()on theSharedPreferences.Editorobject?