Search code examples
javajava-memobilemp3emulation

Play mp3 in JME


I want to know how to play a single mp3 file in my program not from the server, but from the local memory stick files, I want some clear details how to give the path for emulator in pc and how to give path in mobile.


Solution

  • An example of how to play music files is found here using MMAPI (Mobile Media API). The trick is to get the input stream for the file. For that you will need to use the File Connection API, as described here. The paths will vary, though, you'll have to figure out what's right for you.