Hi, this is me posting again to my thread. Another idea:
We can not possibly cover all extensions -> MIME type mappings ever
used. An application may come up with a custom extension and use the
vnd... type of MIME types - still it would be nice if the File browser
could launch their files correctly.
What about the following idea:
Each application can to declare which MIME types it supports, together
with what file extensions this would correspond to. Then at least for
those applications installed OI File Manager could find out about
their supported extensions and MIME types.
I can think of 2 possible implementations:
1) This info is stored in the Manifest in Meta-data. e.g.
<meta-data android:name="org.openintents.meta.extension2mime"
android:value=".mp3 audio/mp3 .wav audio/wav .oif application/
vnd.openintents.flashlight" />
2) There could be a broadcast intent SEND_MIMETYPES, and all listeners
reply with their list of extensions / mime types.
Advantage of 2) is that only those applications need to be polled that
support this feature, which could be quicker.
Advantage of 1) is that the information is available through the
PackageManager, but many applications have to be queried to find the
few that may implement this.
Then again, one should not need to poll this information too often, so
probably putting this information into the Manifest is the easiest for
us and application developers.
Opinions?
Peli
On Dec 10, 3:10 pm, Peli <
peli0...@googlemail.com> wrote:
> By the way: this is the list of currently supported extensions and
> mime types:
http://code.google.com/p/openintents/source/browse/trunk/FileManager/...