android - How to return the value of the function after completing AsyncTask -


i have funcation updateatserver. there asynctask. want finish background thread first , after function should return values true or false.

but background thread running , getting return values of function before completing asynctask.

public static boolean hasupdateatserver_deletescore = false; public static boolean hasupdateatserver_score= false; public static boolean hasupdateatserver_swing= false; public static boolean hasupdateatserver_coursedetailsholes= false;  public synchronized static boolean updateatserver(context context) {      new updateintoserver(context).execute();      return hasupdateatserver_deletescore && hasupdateatserver_score             && hasupdateatserver_swing && hasupdateatserver_coursedetailsholes;  } 


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

ruby - How do I merge two hashes into a hash of arrays? -