mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Android: Added the ability to associate a particular file-extension to a mime-type at runtime
This commit is contained in:
parent
e30f6e7c0d
commit
4054e25052
5 changed files with 698 additions and 649 deletions
|
|
@ -270,6 +270,13 @@ void FileChooser::finished (const Array<URL>& asyncResults)
|
|||
callback (*this);
|
||||
}
|
||||
|
||||
#if ! JUCE_ANDROID
|
||||
void FileChooser::registerCustomMimeTypeForFileExtension ([[maybe_unused]] const String& mimeType,
|
||||
[[maybe_unused]] const String& fileExtension)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
FilePreviewComponent::FilePreviewComponent() {}
|
||||
FilePreviewComponent::~FilePreviewComponent() {}
|
||||
|
|
|
|||
|
|
@ -293,6 +293,19 @@ public:
|
|||
*/
|
||||
static bool isPlatformDialogAvailable();
|
||||
|
||||
/** Associate a particular file-extension to a mime-type
|
||||
|
||||
On Android, JUCE needs to convert common file extensions to mime-types when using
|
||||
wildcard filters in native file chooser dialog boxes. JUCE has an extensive conversion
|
||||
table to convert between the most common file-types and mime-types transparently, but
|
||||
some more obscure file-types may be missing. Use this method to register your own
|
||||
mime-type to file extension conversions. Please contact the JUCE team if you think
|
||||
that a common mime-type/file-extension entry is missing in JUCE's internal tables.
|
||||
Does nothing on other platforms.
|
||||
*/
|
||||
static void registerCustomMimeTypeForFileExtension (const String& mimeType,
|
||||
const String& fileExtension);
|
||||
|
||||
//==============================================================================
|
||||
#ifndef DOXYGEN
|
||||
class Native;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue