0

I am writing an app that utilizes the use of some custom file types. I would like users to be able to download these custom file types from a website somewhere. By default, the built-in Android Browser app does not allow downloading of unknown file types, but file managers such as Astro allow files of any type to be downloaded in the Browser app. Also, I am aware that Android doesn't really care about file extensions, just MIME types.

Forcing the user to download a 3rd party app is not an option. My application must be able to provide the same type of "download freedom" that apps such as Astro do. I know it is possible because there are numerous applications that provide this sort of functionality.

I have tried all sorts of combinations of intent filters, but none of them seem to do the trick. See these questions for examples:

Register to be default app for custom file type

Register new file type in Android

Register file type for app does not work correctly

These solutions work for allowing a user to Preview the file using the GMail application, but do nothing when it comes to downloading in the browser.

How does Astro (or the other file managers) allow downloading of arbitrary file types? What is the special sauce I am missing from my manifest that will allow this?

Community
  • 1
  • 1
gyoda
  • 1,053
  • 2
  • 11
  • 22
  • I dont know the answer to this either, but I asked a simillar question yesterday so you might want to follw the the thread in case the answer comes up there. http://stackoverflow.com/questions/7968591/android-dowload-file-directly-from-browser – Colin L Nov 02 '11 at 11:14

1 Answers1

0

Have you looked at trying to find or set a broadcast receiver for when a download is completed http://developer.android.com/reference/android/app/DownloadManager.html

However it seems like you could just create a download manager to go out and download the special files you want.

I am not clear on your intent? The android browser allows unknown file types to be downloaded and saved to the disc. However, if it doesn't know the file type it doesn't know what to open it with so it just gets saved and the file browser may know what to open it with.

Bostwick
  • 696
  • 1
  • 12
  • 24
  • Thanks for the suggestion, but I've decided to take my app in another direction. I will keep this in mind if it ever comes up again. – gyoda Nov 29 '11 at 15:56