View Single Post
Old 02-07-2011, 09:50 PM   #5
jsstylos
Junior Member
jsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud ofjsstylos has much to be proud of
 
Posts: 3
Karma: 27344
Join Date: Feb 2011
Device: Kindle 3
For those who are interested, this just got a whole lot easier with firmware 3.1 and Kindlet-1.2.jar, and no longer requires any extra permissions:

Code:
AudioManager audioManager = context.getAudioManager();
try {
	Audio audio = audioManager.createAudioPlayer(new MediaSource(new FileInputStream(context.getHomeDirectory().getAbsolutePath() + "/" + "test.mp3")));
	audio.play();
} catch (FileNotFoundException e) {
	e.printStackTrace();
} catch (AudioException e) {
	e.printStackTrace();
}
jsstylos is offline   Reply With Quote