Question

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!

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top