Domanda

I have an Android code like:

protected void onPostExecute(String result){            
parseJSON(result);
replaceResourceSegment();
dummyMethod();
}

My replaceresourceSegment(creates an intent) method takes some time to execute within which dummyMethod() gets called. Do I have a means to order the execution of methods or notify after a method gets completed in Android(like threads in Java)? Please suggest me, if I have to use a Handler or AsyncTask or Thread for accomplishing the same... Any help will be appreciated. Thanks in advance!

È stato utile?

Soluzione

I used startActivityForResult(intent, REQUEST_CODE) and defined the contents of dummymethod() in onActivityResult(int requestCode, int ResultCode, Intent data).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top