I’m very new to programming and I have some doubts.
I have a AsyncTask which is I call as RunInBackGround.
and I start this process like:
new RunInBackGround().execute();
But I wish to wait until this call is finish its executing, before proceeding to the other statements of code.
How can I do that?
Are there any way for it?
You will need to call AsyncTask.get() method for getting result back and make wait until
doInBackgroundexecution is not complete. but this will freeze Main UI thread if you not call get method inside a Thread.To get result back in UI Thread start
AsyncTaskas :