Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MP3/J2ME

 
Ould Nadif
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

first of all, happy new year 2006 to everyone.

By the way I have one question:
1-I would like know if it is possible to play a mp3 file from J2ME with MMAPI ?
2-If no, is there an onother way to do it (extern API for example)

OULD NADIF
 
payal agrawal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the URL below:

Playing MP3 files from your server on J2ME devices
http://www.java-tips.org/content/view/153/73/

Playing MP3 from your local file on J2ME devices
http://www.java-tips.org/content/view/154/73/
 
Alfredo Estrada
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heeey, First review:

Each phone souports diferent protocols and file formats, for create aMedia content from a Manager.createPlayer(...);

In the target Cell Phone, install a MIDlet that display the results of this code:
//-------------------------------------------------------------------------
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.media.*;

public class MediaInformationMIDlet
extends MIDlet
implements CommandListener {
private Form mInformationForm;

public void startApp() {
if (mInformationForm == null) {
mInformationForm =
new Form("Content types and protocols");
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++) {
StringItem si = new StringItem(contentTypes[i] + ": ",
protocols[j]);
si.setLayout(Item.LAYOUT_NEWLINE_AFTER);
mInformationForm.append(si);
}
}
Command exitCommand = new Command("Exit", Command.EXIT, 0);
mInformationForm.addCommand(exitCommand);
mInformationForm.setCommandListener(this);
}

Display.getDisplay(this).setCurrent(mInformationForm);
}

public void pauseApp() {}

public void destroyApp(boolean unconditional) {}

public void commandAction(Command c, Displayable s) {
notifyDestroyed();
}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic