In my android app, I have a main activity which creates two other sub activites through intent. Now, both the sub activity return result to the main activity. In my main act
You change the requestCode that you use when you call startActivityForResult.
EDIT: for example, I use this:
startActivityForResult(i, App.REQUEST_ENABLE_BT);
and this:
startActivityForResult(i, App.MANUAL_INPUT);
and then you filter the results like this:
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == RESULT_OK){
switch(requestCode){
case App.REQUEST_ENABLE_BT:
if(resultCode != RESULT_OK){
Toast.makeText(this, getString(R.string.label_bluetooth_disabled), Toast.LENGTH_LONG).show();
}
break;
case App.MANUAL_INPUT:
break;
}
}