Found the next class to read the html page into a string.
public class HTMLPageDownloader extends AsyncTask<Void, Void, String> { public static interface HTMLPageDownloaderListener { public abstract void completionCallBack(String html); } public HTMLPageDownloaderListener listener; public String link; public HTMLPageDownloader (String aLink, HTMLPageDownloaderListener aListener) { listener = aListener; link = aLink; } @Override protected String doInBackground(Void... params) { // TODO Auto-generated method stub HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(link); String html = ""; try { HttpResponse response = client.execute(request); InputStream in; in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader( new InputStreamReader(in)); StringBuilder str = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { str.append(line); } in.close(); html = str.toString(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return html; } @Override protected void onPostExecute(String result) { // TODO Auto-generated method stub super.onPostExecute(result); if (!isCancelled()) { listener.completionCallBack(result); } } } Now I do not understand how to work with him. I can pass a link to the constructor, but where do I get the listener?