07-01-2010 12:56 PM
Right now I am able to play audio files by retrieving them from a file location path.
Ex: file:///SDCard/BlackBerry/music/file.wav
String theFile = "file:///SDCard/BlackBerry/music/file.wav"; Player player = Manager.createPlayer(theFile); player.realize(); player.prefetch(); //start the player player.start();
How do I play a file that I have included in my project file?
Solved! Go to Solution.
07-01-2010 01:09 PM
I suspect this will help.
Don't forget to add the file to your project.
07-01-2010 01:09 PM
Use the Class.forName().getResourceAsStream(). There are several examples if you search.
07-01-2010 03:19 PM - edited 07-01-2010 03:57 PM
Thanks! That got it working.