I have two activities, one is a clicker game (where you click a button and the textView displays an int (increasing per click). The other activity is where I display that int. I've tried many times of different ways of how to pass this data to the next activity, however nothing seemed to work. I assume that this could be because this int does not stay the same, and is constantly changing. Could anyone suggest what to do?
Clicker:
Intent getNumber = new Intent(this, Shop.class);
getNumber.putExtra("passedMoney", clicks);
startActivity(getNumber);
Stats:
Intent getNumber = getIntent();
int clicks = getNumber.getIntExtra("passedMoney", 0);
clicks is the int, which is 0.
Thanks in advance :)