JoaoFilipeClementeMartins JoaoFilipeClementeMartins - 5 months ago 11
Android Question

Android available mime-types?

After several searches online, I couldn't find a place that could tell me every existent mime type for different types of media in android applications.

Here are the ones I know that exist and work:

For Text

"text/plain"


For Image

"image/jpeg"
"image/bmp"
"image/gif"
"image/jpg"
"image/png"


For Video

"video/wav"
"video/mp4"


These are the ones I have and know that work, I am lacking several for video and sound type files. Does anyone know a place where every android mime-type is described or do you guys ever used another mime-type for these different types of media?

EDIT:

I am using this in an application that monitors sms and mms and in the mms type manages the content inside it. The code i have runs for every version above 8.

Answer

I couldn't find a place that could tell me every existent mime type for different types of media in android applications

There are over a million applications on the Play Store, plus others elsewhere (e.g., pre-installed on devices, Amazon AppStore for Android). A given device will have some combination of these apps. A given user will have access to some subset of the apps on the device, if the user is running in an Android 4.3+ restricted profile on a tablet.

Hence, there is no way to know, at compile time, what MIME types a given Android device can support for things like ACTION_VIEW activity requests. The OS itself supports no such MIME types -- they are all provided by applications.

Here are the ones I know that exist and work:

Some devices may have apps pre-installed that support those MIME types. text/plain is the least likely of your set to be supported "out of the box".

Comments