各位大神小弟有一事很是费解,贴出代码
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接收方法根本不走,是什么原因呢?求教
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接收方法根本不走,是什么原因呢?求教