且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从onpostexecute方法使用的意图传递结果另一个活动

更新时间:2023-11-27 22:51:40

 公共无效onPostExecute(字符串结果){     意向意图=新意图(ThisActivity.this,TargetActivity.class);
     intent.putExtra(YourData,结果);
     StartActivity(意向)}

并通过 getIntent得到它在另一个活动()

How i pass the result obtained from onpostexecute method to another activity or into oncreate method using intent

public void onPostExecute(String result){

     Intent intent = new Intent(ThisActivity.this, TargetActivity.class);
     intent.putExtra("YourData", result);
     StartActivity(intent)

}

and get it in another activity via getIntent()