milan wrote:
> Hello -
> I have set up the MediaPlayer in my Java class attempting to play a
> file from my local drive.
>
> mp.setDataSource("C:/Java/MyProgram/res/raw/something.mp3");
Android does not have a C: drive.
> mp.prepare();
> mp.start();
>
> Have I set something up incorrectly above because I am not hearing
> anything that comes out of AVD (should the sound be coming out of my
> sound card?)
You need to put the file in the emulator. Use mksdcard to create a fake
SD card image, then use the -sdcard switch when launching the emulator
to tell it to use your specified SD card image. Then, change your
setDataSource() to point to the SD card.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android App Developer Training: http://commonsware.com/training.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---