title: android - DownloadTask - how to put source code in dialog box
body: <p>i have following code i put it on click i would like to put urlAll (source code) in AlertDialog</p>
  
  <pre><code>        String urlAll="localhost/admin";
          new DownloadTask().execute(urlAll);
  
          new AlertDialog.Builder(PrintDemo.this).setTitle("Message").setMessage(urlAll).setPositiveButton(android.R.string.ok, null).setCancelable(false).create().show();
  </code></pre>
  
  <p>at the movement i am getting following message</p>
  
  <h2>Result of above code (but i want source code) i am using DownloadTask</h2>
  
  <p>localhost/admin</p>
  
  <h2>here is downloadtask funtion</h2>
  
  <pre><code> private class DownloadTask extends AsyncTask&lt;String, Void, String&gt;{
  
       @Override
       protected String doInBackground(String... urls) {
           HttpResponse response = null;
           HttpGet httpGet = null;
           HttpClient mHttpClient = null;
           String s = "";
  
           try {
               if(mHttpClient == null){
                   mHttpClient = new DefaultHttpClient();
               }
  
  
               httpGet = new HttpGet(urls[0]);
  
  
               response = mHttpClient.execute(httpGet);
               s = EntityUtils.toString(response.getEntity(), "UTF-8");
  
  
           } catch (IOException e) {
               e.printStackTrace();
           } 
           return s;
       }
  </code></pre>
  
  <p>thanks for your help.</p>