title: Convert ArrayList<<NameValuePair>> to string android java
body: <p>How to Convert ArrayList&lt;> to string ...</p>
  
  <p>Details:</p>
  
  <p>step1: send e-mail address to php mySql database 
  step2: if email address match database content, echoed success
  step3: retrieved the php echoed value ("success")
  step4: assign the the response to a string phpEchoedVal
  step5: compare phpEchoedVal with "success"
  step6: write email to sd card</p>
  
  <p>is this one ok 
  //url = email address</p>
  
  <p>ArrayList nameValuePair = new ArrayList(1);</p>
  
  <pre><code>    nameValuePair.add(new BasicNameValuePair("url", url));
  
    try {
          //open an httpclient connection
  
          HttpClient httpclient = new DefaultHttpClient();
  
          HttpPost httppost = new HttpPost(strLink);
  
          httppost.setEntity(new UrlEncodedFormEntity(data));
  
  
              //response retrieve "success" echoed from server
  
          ResponseHandler&lt;String&gt; handleResponse = new BasicResponseHandler();
  
              //converts server response to string.
  
          String phpEchoVal = httpclient.execute(httppost, handleResponse);
  
  
          txtInfo.setText(phpEchoVal);
  
          String containEmail = txtInfo.getText().toString();
  
  
  
              //compare response from server with local string
  
              // if successful write email to sd card
  
          if ((containEmail.equals("success"))){
  
              //create a new text file
  
              File myFile = new File("/sdcard/moLarouteReg.txt");
  
              myFile.createNewFile();
  
              FileOutputStream fOut = new FileOutputStream(myFile);
  
              OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);
  
              myOutWriter.append(containEmail);
  
              //close writer
              myOutWriter.close();
  
          fOut.close();
  
          //Open menu
  
            Intent openMenu = new Intent("com.molaroute.mu.Menu");
  
              startActivity(openMenu);
  
              finish();
  
          Log.d("test","fileWritten: "+myOutWriter);
  
          }else {
  
  
  
              ...
          }
     }
  </code></pre>