Refactor. Create AsyncTask object. Put network connection calls in another class. Add the Internet Permission in manifest