Reputation: 60919
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?
Upvotes: 0
Views: 105
Reputation: 10672
Have you done a commit()
on the SharedPreferences.Editor
object?
Upvotes: 8