I have some file on my device, which I want to upload (and later download) to Google Drive. When creating a file on Drive, I have to set it's MIME type:
MetadataChangeSet.setMimeType("text/xml");
So, we have some specific MIME types, which allows us to upload different files.
But what I have to do if my file formats are not in this MIME-list? How can I upload/download files with formats like .style, .map, etc.?
Actually, I've found a solution.
You can specify your own MIME type like this (for example .style
):
String mimeType = MimeTypeMap.getSingleton().getExtensionFromMimeType("style");
It worked for me, at least.