@Override protected void onPause() { SharedPreferences prefs = getSharedPreferences("CatTailCatchData", MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); String tmpScore = Integer.toString(gpv.getScore()); editor.putString("GameScore", tmpScore); editor.commit(); super.onPause(); gpv.killThread(); }