Java Reference
In-Depth Information
private void init() {
showSupportedMedia();
display = Display.getDisplay(this);
if (choiceScreen == null) {
choiceScreen = new List("MultimediaMIDlet", List.IMPLICIT);
choiceScreen.addCommand(new Command("Exit", Command.EXIT, 0));
selectCommand = new Command("Play", Command.ITEM,1);
choiceScreen.setSelectCommand(selectCommand);
choiceScreen.addCommand(selectCommand);
choiceScreen.setCommandListener(this);
choiceScreen.append("Sound", null);
choiceScreen.append("Video", null);
choiceScreen.append("SVG", null);
choiceScreen.append("Camera Capture",null);
}
display.setCurrent(choiceScreen);
}
public void startApp() {
init();
}
private void showSupportedMedia() {
String[] contentTypes = Manager.getSupportedContentTypes(null);
for (int i=0; i<contentTypes.length; i++) {
String protocols[] =
Manager.getSupportedProtocols(contentTypes[i]);
for (int j=0; j<protocols.length; j++) {
String s = contentTypes[i] + ":" + protocols[j];
System.out.println(s);
}
}
}
public void pauseApp() {
endNow = true;
if (svgAnimator != null) {
svgAnimator.stop();
}
if (player!=null) {
player.close();
}
}
 
Search WWH ::




Custom Search