There are many ways , but here is one,
When ever your moving from Activity A to Activity B (probably on button click) pass the inputName to B activity
ActivityA.java
Intent i = new Intent(this, ActivityB.class);
i.putExtra("DATA", "inputName");
startActivity(i);
ActivityB.java doesn't do anything about it but it must be seen before ActivityC.
So the info u pass from A to B you need to check and pass it to C while moving from B to C
Intent newIntent = new Intent(ActivityB.this, ActivityC.class);
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
newIntent.putExtras(bundle);
}
startActivity(newIntent);
In Activity C you can get the data like this and use
Bundle b = getIntent().getExtras();
String data1 = b.getString("DATA");
This is one simple solution and there are many other ways you can try like
- Storing in Shared pref and retrieving
- Using application class
- Using some interface etc but in your case this simple solution is enough i guess