I want data to be synchronized between two Activities. I have TextView1 inside 1st Activity and TextView2 inside 2nd Activity. The 2nd Activity is started form the 1st. After that the data in TextView2 is changed. When I'll be back to the 1st Activity, the data in TextView1 has to be the same with TextView2's data. I've tried to use intents, but it's not possible to be as the 1st Activity is crashed because it's waiting for the data, I suppose.
The 1st Activity:
.....
level = getIntent().getExtras().getString("level");
score = getIntent().getExtras().getString("score");
.....
The 2nd Activity:
.....
Intent intent = new Intent(2nd_activity.this, 1st_activity.class);
intent.putExtra("level", Integer.toString(level));
intent.putExtra("score", Integer.toString(score));
.....
I guess you have figured it out why it doesn't work. What do I need to do to solve this problem?