You should start by writing instructions that will allow you to know what media formats and protocols which are supported by the terminal on which to install our software. When you create the project, with WTK, you must check the box on Mobile Media API (JSR 135) on the Settings for Project. The first class, we use, is the Manager class that allows us, using the methods getSupportedContentTypes and getSupportedProtocols , to discover the compatibility of our terminal (which obviously has to support MMAPI):
Code:
.. / /
String [] protocols = Manager.getSupportedProtocols (null);
String [] contentType = null;
formtrial = new Formtrial ("Supported");
StringItem si = null;
for (int k = 0, k <protocols.length k + +)
{
Manager.getSupportedContentTypes contentType = (null);
for (int i = 0; i <contentType.length i + +)
{
is = new StringItem ("Content Type" + (i +1) + "for protocol '+ protocols [k] +": ", contentType [i]);
formtrial.append (yes);
}
}
display.setCurrent (formtrial);
....//
The method getSupportedProtocols accepts one argument, the content type for which you want to know the supported protocols: null letting you get a complete list of all those supported regardless of the type of content.
Bookmarks