需要澄清一下:是否可以定义 2 个意图以将相同的数据传递给 2 个不同的活动?第二类 (logout.class) 未被访问。代码是:
protected void onPostExecute(String result) {
if(result != null)
{
Intent tokenIntent = new Intent(mContext, tokenActivity.class);
Bundle bundle = new Bundle();
bundle.putString("responsedata",result.substring(result.indexOf("=")+1,result.length()));
tokenIntent.putExtras(bundle);
startActivity(tokenIntent);
Intent tokenIntent2 = new Intent(mContext,logout.class);
Bundle bundle2= new Bundle();
bundle2.putString("responsedata",result.substring(result.indexOf("=")+1,result.length()));
tokenIntent.putExtras(bundle2);
startActivity(tokenIntent2);
}
}
}