Onpostexecute Method Is Executing Before Doinbackground Fetching Data From Server To Local
In my Android async task class, I'm fetching data from an Azure server to local database inside DoinBackground method But before finishing the DoinBackground method, it's executin
Solution 1:
The requests you are doing inside doInBackground
are made asynchronusly that's means that doInBackground
is already execute before you get the TableQueryCallback
. In other words It's a thread which is launching another thread. I think you do not need to surround it in an AsyncTask
, you could handle your respond on TableQueryCallback.onCompleted()
with a Handler or an Interface.
Post a Comment for "Onpostexecute Method Is Executing Before Doinbackground Fetching Data From Server To Local"