Structure of Android MIME Types

Just as a web site returns a MIME type for a given URL, a content provider has an added responsibility to return the MIME type for a given URI. MIME types work in Android similar to how they work in HTTP. You ask a provider for the MIME type of a given URI that it supports, and the provider returns a two-part string identifying its MIME type according to the standard web MIME conventions. You can find the MIME-type standard here:

http://tools.ietf.org/html/rfc2046

According to the MIME-type specification, a MIME type has two parts: a type and a subtype. Here are some examples of well-known MIME-type pairs:

text/html text/css text/xml text/vnd.curl application/pdf application/rtf application/vnd.ms-excel

You can see a complete list of registered types and subtypes at the Internet Assigned Numbers Authority (IANA) web site:

http://www.iana.org/assignments/media-types/

0 0

Post a comment