Java Reference
In-Depth Information
Framework (MMF). This direct link between the two frameworks is
because Java ME on Symbian OS tightly integrates with the native
Symbian OS MMF. A clear benefit of this approach is that Java ME
applications are consistent with the Symbian OS platform in regards to
supported content, playing and recording behavior.
In order to give a Java application a way to query the system about its
multimedia capabilities, the MMAPI Manager class defines two methods
that you can use:
Manager.getSupportedContentTypes(String protocol)
returns the list of supported content types for a given protocol. For
example, if the given protocol is http , then the returned value would
be the supported content types that can be played back with the HTTP
protocol. To get all the supported content types, you can pass NULL
as the protocol.
Manager.getSupportedProtocols(String contentType)
returns the list of supported protocols for a given content type, which
identify the locators that can be used for creating MMAPI players. For
example, if the given content type is video/mpeg , then the returned
value would be the supported protocols that can be used to play back
video/mpeg content. To get all the supported protocols, you can
pass NULL as the content type.
The snippet of code below, which can also be added to the Java ME
Detectors MIDlet, detects the supported content types and protocols and
displays them:
private void detectSupport() {
try {
form.append("getSupportedContentTypes:");
String[] supportedContentTypes =
Manager.getSupportedContentTypes(null);
for(int i = 0; i < supportedContentTypes.length; i++) {
form.append(supportedContentTypes[i]);
} form.append("getSupportedProtocols:");
String[] supportedProtocols = Manager.getSupportedProtocols(null);
for(int i = 0; i < supportedProtocols.length; i++) {
form.append(supportedProtocols[i]);
}
} catch (Exception e) {
form.append(e.getMessage());
}
}
Another source of information is the MMAPI properties that can be
queried by System.getProperty(String key) . JSR-135 MMAPI
defines the following keys:
 
Search WWH ::




Custom Search