我正在通过这样的背面传递一个额外的意图: -
@Override
public void onBackPressed() {
super.onBackPressed();
Intent intent = new Intent()
.putExtra(Constants.FROM_PRELOGIN, true);
setResult(RESULT_OK, intent);
Log.wtf("TAG",""+RESULT_OK);
}
我试图在之前的活动中收到额外的内容: -
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
switch (requestCode)
{
case REQUEST_CODE_PUNCHCARD_ACTIVITY:{
if (resultCode == PunchCardDetailActivity.RESULT_OK){
isFromPrelogin =data.getExtras().getBoolean(Constants.FROM_PRELOGIN);
Log.wtf("Tag","yoyoy");
getOffersAndLocationsList();
}
}
break;
default:
break;
}
}
这是我创建的静态字段
private static final int REQUEST_CODE_PUNCHCARD_ACTIVITY = -1;
问题我没有收到我猜的价值,因为日志没有显示!请帮助。谢谢!