title: How to attach a file to the post url in Android
body: <p>I am developing a Helpdesk application, in this app I am able to read and reply for the tickets sent by the customer. Now I got a requirement, I have to upload a file also. I have a post url to reply for the ticket, I will use Namevaluepairs to attach message with the url..</p>
  
  <pre><code>nameValuepair("id",ticketId);(nameValuepair is the instance of BasicNameValuePair)
  nameValuepair("subject",subject);
  nameValuepair("reply",message);
  </code></pre>
  
  <p>If file is not there then it will be like the above code. If file is there I one more parameter comes for file. What I have to do is to attach a file and encode it and then include it into Namevaluepair...</p>
  
  <pre><code>nameValuepair("file",encodedfile);
  </code></pre>
  
  <p>How can I Upload the file to this app and encode it.
  I got some resources to attach a file to the default android email client using email intent, that was not helpful  for me.
  Thanks in Advance</p>