-3

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

  • Send a bundle of data with the intent, then in the new Activity catch it by overriding the onNewIntent() method. – cYrixmorten Mar 18 '14 at 10:06
  • 1
    Please don't just open another question. Instead edit your previous question and provide the additional information requested by the users trying to help you – super-qua Mar 18 '14 at 10:07
  • Check this link to get result to main activity. Once you got the result, you can pass it to next activity: http://stackoverflow.com/questions/12575068/how-to-get-the-result-of-onpostexecute-to-main-activity-because-asynctask-is-a – Lokesh Mar 18 '14 at 10:09

1 Answers1

1
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()

Mathias Müller
  • 22,203
  • 13
  • 58
  • 75
NullPointerException
  • 3,978
  • 4
  • 34
  • 52