Question

In J2ME, How do I come to know that what is the capability of emulator to play certain media file though it is .mp3 or .wav or any other file

I am using Netbeans with WTK emulators & also nokia SDK 1.1.0 emulator....

No correct solution

OTHER TIPS

Try this code. It uses the same Manager API that you used in your last question.

import javax.microedition.media.Manager;

...

  String supportedTypes[] = Manager.getSupportedContentTypes(null);
  for (int i = 0; i < supportedTypes.length; i++) {
     if (supportedTypes[i].startsWith("audio")) {
        System.out.println("Device supports " + supportedTypes[i]);
     }
  }

running this for me produced the following output on a BlackBerry 9550:

[0.0] Device supports audio/x-tone-seq
[0.0] Device supports audio/midi
[0.0] Device supports audio/mpeg
[0.0] Device supports audio/x-wav
[0.0] Device supports audio/amr
[0.0] Device supports audio/x-gsm
[0.0] Device supports audio/mp4
[0.0] Device supports audio/aac
[0.0] Device supports audio/x-ms-wma
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top