I have an async task that loads image urls from server.After loading urls than i load the images one by one through another asynctask. On the click of a button i start the first asynctask
public void getit(View v)
{
new getdata().execute("http://10.0.2.2/geturls.php");
// line no 2
}
After i get the urls i use another async task to load images. How can i find out when the image urls have been loaded and i can call the second async task at line no 2. if i use a boolean variable which i toggle in the onpostexecute
@Override
protected void onPostExecute() {
urlgot=true;
}
then i shall have to use some repeating loop inside getit method at line no 2 to check the status of this variable urlgot. but it may take more time than allowed for ui thread. Can there be a more cleaner method to do this check. thanks