Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Checking whether a certain MIME type is supported on Symbian
This code snippet demonstrates how to use the Document Handler API for querying whether the system supports a certain MIME type.
This snippet can be self-signed.
The following libraries are required:
LIBRARY apmime.lib // TDataType
LIBRARY commonui.lib // CDocumentHandler
private: // Data
iDocHandler = CDocumentHandler::NewL(CEikonEnv::Static()->Process());
TBool result = EFalse;
TRAPD(err, result = iDocHandler->CanOpenL(audioDataType));
if (err == KMimeNotSupported)
// MIME type is not supported
else if (result && !err)
// Basic audio can be handled
else if (!result && !err)
// Basic audio cannot be handled
// Some other error
The Document Handler API has queried whether the audio/basic MIME type is supported by the system.