Here is an answer to get you started using an AsyncTask
. You do all of your network operations in doInBackground()
then you can start your next Activity
in onPostExecute()
which will run after doInBackground()
has finished.
doInBackground()
returns its result to onPostExecute()
so if you start your Activity
there then your network operations will be finished.