-1

I have three activities in my android application, and i am trying to get user input data from the first activity and pass it to the third activity while at the same time I launch the second activity which also gets the user input data and will also pass the data to the third activity. any ideas on how i should go about this?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

1 Answers1

1

The Way of passing data from Intent is shown below, try passing data same way from ActivityOne -> ActvityTwo -> ActivityThree.

Intent intent = new Intent(ActivityOne.this, ActivityTwo.class);
intent.putExtra("some_key_from_one", some_value_from_one);
startActivity(intent);

Then in the new Activity, retrieve those values:

Bundle extras = getIntent().getExtras();
if (extras != null) {
    String value = extras.getString("some_key_from_one");
    //The key argument here must match that used in the other activity
}
W4R10CK
  • 5,502
  • 2
  • 19
  • 30