我对我没有任何感觉,真的…无论如何,作为
onActivityResult
将永远是相同的一部分
Activity
启动了第三方活动,您只需将数据保存在活动的某个位置即可。例如:
private Intent intentForThat3rdPartyActivity = null; // long name, huh?
public void hereYouLaunchThings(){
if( intentForThat3rdPartyActivity == null ){
intentForThat3rdPartyActivity = new Intent(YourActitity.this, The3rdPartyActivity.class);
intentForThat3rdPartyActivity.putExtra("weird", "data");
}
startActivityForResult(intentForThat3rdPartyActivity, 9999);
}
@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
// this should have the same data you passed
String foo = intentForThat3rdPartyActivity.getStringExtra("weird");
}