Android available mime-types?

AndroidMime Types

Android Problem Overview


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.

Android Solutions


Solution 1 - Android

I did some search these days.

maybe you shoud read these links.

Solution 2 - Android

> 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".

Solution 3 - Android

You can use existing mapping in Android (java version)

String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(ext.toLowerCase());

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJoaoFilipeClementeMartinsView Question on Stackoverflow
Solution 1 - AndroidtianyaView Answer on Stackoverflow
Solution 2 - AndroidCommonsWareView Answer on Stackoverflow
Solution 3 - AndroidStrawDragonView Answer on Stackoverflow