title: How to upload a file in android using AsyncTask
body: <p>I am just a beginner at Android so this question might be stupid. PLease help me out of this. </p>
  
  <p>I am working on an App which requires data to be uploaded on the server. The data could be text, image or a video. I tried to use the following link</p>
  
  <p><a href="http://developer.android.com/reference/java/net/HttpURLConnection.html" rel="nofollow">http://developer.android.com/reference/java/net/HttpURLConnection.html</a></p>
  
  <p>and also </p>
  
  <p><a href="http://androidexample.com/Upload_File_To_Server_-_Android_Example/index.php?view=article_discription&amp;aid=83&amp;aaid=106" rel="nofollow">http://androidexample.com/Upload_File_To_Server_-_Android_Example/index.php?view=article_discription&amp;aid=83&amp;aaid=106</a></p>
  
  <p>However I ended up being even more confused. How do I send the data into the server using the ASyncTask doinbackgound method. </p>
  
  <p>Thanks.</p>