-1

I need to build some sort of "downloader".

Basically what I need is an application that

  • is called when the user clicks on a download link in the browser (or in the email client);
  • the app opens up
  • the app saves the file inside a directory defined by the app itself.

Please could somebody point me in the right direction?

Please note: the suggested answer does not cover the point:

- is called when the user clicks on a download link in the browser (or in the email client);

therefore it should be able to "listen" somehow to the download request "event" from the browser or the email client and start itself

Application like "Download Manager" or "Easy Downloader Pro" have such capability...

user229044
  • 232,980
  • 40
  • 330
  • 338
Lisa Anne
  • 4,482
  • 17
  • 83
  • 157
  • 1
    http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog – dutt Aug 23 '13 at 10:47
  • @dutt thanks, but this is not what i am looking for. :-) Thanks .LISA – Lisa Anne Aug 23 '13 at 10:53
  • then I'm not sure what you're looking for – dutt Aug 23 '13 at 10:59
  • @dutt I need to "listen" somehow to the download "event" when is triggered by the browser of the email client. I do not know if it is possible... – Lisa Anne Aug 23 '13 at 11:03
  • Ahaa, I really did not get that the first time. I'm not sure if that's doable. – dutt Aug 23 '13 at 11:22
  • @dutt Application like "Download Manager" or "Easy Downloader Pro" have such capability... – Lisa Anne Aug 23 '13 at 11:26
  • Hm I guess that is possible with a special intent listener based on a mimetype. That will take some time for research... I may could add this tomorrow to my answer. – rekire Aug 23 '13 at 11:32

1 Answers1

1

Set SocketTimeouts to detect timeouts and check the HTTP spects vor the ranges headers, this is used for partial downloads which are nesseary if you need to continue downloads.

Check also headers related witch caching like the stag.

rekire
  • 47,260
  • 30
  • 167
  • 264
  • please I do not follow you, could you explain it a bit more in detail please? Thank – Lisa Anne Aug 23 '13 at 10:52
  • Do you know the HTTP protocol? Did you implement a TCP socket connection? – rekire Aug 23 '13 at 10:56
  • do I need to do that? Wouldn't the socket have been already open by the browser (or the email client)? I think I need to intercept the download "event" somehow – Lisa Anne Aug 23 '13 at 11:02
  • Your question points to implement a download app. That means in my opinion that you don't want to use the ready to use download manager of android. So far yes you need to know that stuff. If you want to use the build in functions please add this to your question or in a comment. – rekire Aug 23 '13 at 11:07