Reputation: 840
I have an Activity that has some form elements. This can be called from other activities.. When the form activity loads, how do I know which one called it?
Thanks in advance..
Upvotes: 0
Views: 37
Reputation: 200130
The easier way is to explicitly indicate that in the intent:
Intent i = new Intent(blnah);
i.putExtra("who", "Activity1");
startActivity(intent);
Then, on the other activity:
// this is the activity with the form
String who = getIntent().getStringExtra("who");
Upvotes: 1