For example i have activity1, activity2, activity3 and lastly valueAllActivity? how do I pass the data from activity1, activity2, activity3 to --> valueAllActivity?
I used a method in an activity to call another activity. It starts a game with two variables (resume and number of players).
private void MethodToCallAnotherActivity(int resume, int players) {
Intent intent = new Intent(CurrentActivity.this, NextActivity.class);
intent.putExtra(NextActivity.RESUME, resume);
intent.putExtra(NextActivity.PLAYERS, players);
startActivity(intent);
}
in the 'onCreate' of the NextActivity, I used
int resume = getIntent().getIntExtra(Game.RESUME, 1);
to read the variable I wanted.
Good luck!