Example #1
0
  @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();
  }
Example #2
0
  @Override
  protected void onResume() {
    SharedPreferences prefs = getSharedPreferences("CatTailCatchData", MODE_PRIVATE);
    String tmpScore = prefs.getString("GameScore", "1");

    gpv.setScore(Integer.valueOf(tmpScore));

    super.onResume();
  }
Example #3
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   gpv.onDestroy();
 }