The network connection is now carried out in an AsyncTask. This allows a network connection to be run on a thread outside of the UI thread.