0

I am looking to send a file on android asyncronously. Using c#, I would use WebClient.uploadFileAsync. I found the Java equivelent... AsyncHttpClient. However, I find this cannot be used in Android. I want to be able to get the progress of the upload. More importantly though I dont want to load the whole file in memory; the files are large images and they have trouble uploading all at once.

So my question is simple, is there an Android alternative to .Net's WebClient.uploadFileAsnyc?

Sam Hosseini
  • 813
  • 2
  • 9
  • 17
Tom Fobear
  • 6,729
  • 7
  • 42
  • 74

1 Answers1

1

In Android 2.3 and higher, use DownloadManager. In Android 2.2 or lower, you would need to roll it more yourself using HttpClient or something.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I am ending up taking the easy route, I am going to send chunks of the file through a webservice. This will solve the memory and the progress bar issues. Thanks for the info though. – Tom Fobear Mar 07 '11 at 13:59