关于跳转传递对象

各位大神小弟有一事很是费解,贴出代码
activity1:case 4:// 点名、40秒刷新一次地理位置
Bundle mBundleRollCallGPS = new Bundle();
mBundleRollCallGPS.putSerializable("user", user);
if (userType == 1) {
// 企业用户访问
teuid = sp
.getString(
ConstantS.SharedPreferencesUtil.Company_TEUID,
null);
} else if (userType == 2) {
// 个人用户访问
teuid = user.getVechile().get(0).getTeuid();
}
mBundleRollCallGPS.putString("teuId", teuid);
Intent intentRollCallGPS = new Intent(MainHome.this,
RollCallGPS.class);
intentRollCallGPS.putExtras(mBundleRollCallGPS);
startActivity(intentRollCallGPS);

activity2:Intent intent=new Intent(CarGroup.this, RollCallGPS.class);
Bundle mBunle = new Bundle();
mBunle.putSerializable("user", user);
mBunle.putString("teuId", teuidStr);
startActivityForResult(intent, 2);

两个activity都要跳至的activity3: @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case 1:
Intent intent = getIntent();
user = (User) intent.getSerializableExtra("user");
teuid = intent.getStringExtra("teuId");

if (user != null) {
new myRollCallGPSAsy(user.getUserId(), teuid, ConstantS.RollCallGPS)
.execute();
} else {
Toast.makeText(RollCallGPS.this, "没有获取到数据", 0).show();
}
break;
case 2:
Intent intent1=getIntent();
user = (User) intent1.getSerializableExtra("user");
teuid = intent1.getStringExtra("teuId");
if (user != null) {
new myRollCallGPSAsy(user.getUserId(), teuid, ConstantS.RollCallGPS)
.execute();
} else {
Toast.makeText(RollCallGPS.this, "没有获取到数据", 0).show();
}
break;
}
super.onActivityResult(requestCode, resultCode, data);
}

activity3接收方法根本不走,是什么原因呢?求教
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值