I am running a task in back ground, and returning a result out of it.The result is coming null as its returned before the async task completes.how can i resolve it
public Result CallServer(String zObjectNameP, String zMethodNameP, String QueryStringP)
{
aResultM=new Result();
MainAynscTask asyncTask = new MainAynscTask();
try
{
asyncTask.execute(zObjectNameP,zMethodNameP,QueryStringP);
}
catch(Exception ex)
{
}
return aResultM;
}