I am creating a game where you tap the image to increase the score before it disappears. I have 3 activities, the first one is to press the start button, the other one is to play the game and see your score while playing it, the last one is to see your score.
My question is, I want to add a high score section to the last activity. How can I implement that?
Here is my code to increase the score (it is linked with tapped images):
public void increaseScore(View view) {
score = score + 1;
scoreText.setText("Score: " + score);
}
Here is my code to change activity:
public void changeActivity() {
UserScore = scoreText.getText().toString();
Intent intent = new Intent(GameActivity.this, FinishActivity.class);
intent.putExtra("Score", UserScore);
startActivity(intent);
}