Here's where I store values into SharedPreferences in one activity:
sharedPref = context.getSharedPreferences("sharedPref", Context.MODE_PRIVATE);
String firstPlace = new String("1");
String secondPlace = new String("2");
String thirdPlace = new String("3");
editor = sharedPref.edit();
editor.putString("first", firstPlace);
editor.putString("second", secondPlace);
editor.putString("third", thirdPlace);
editor.commit();
And try to retrieve them in another activity. However, the retrieve doesn't seem to be getting the values I put in and is just using the defaults (so "1st Place: " "2nd Place: " and "3rd Place: " end up with a 'no' next to them).
SharedPreferences sharedPref = getSharedPreferences("sharedPref", MODE_PRIVATE);
String firstPlace = sharedPref.getString("first", "no");
String secondPlace = sharedPref.getString("second", "no");
String thirdlace = sharedPref.getString("third", "no");
highScore1.setText("1st Place: " + firstPlace);
highScore2.setText("2nd Place: " + secondPlace);
highScore3.setText("3rd Place: " + thirdlace);