Thursday, January 27, 2011

[android-developers] Play Wav file with dynamic path

Hi Every One,

I want to play wav file but dynamically means runtime i will decide which wav file will play.
i have added all wav files in raw folder and written below code

MediaPlayer player;
MediaPlayer mp1 = new MediaPlayer(); //= MediaPlayer.create(getBaseContext(), R.raw.Test);

But this code playing only Test file.
i want to decide at run time which file need to play. i have file name in string.

how to get the path of the file and using which api i can play that file.

thank you


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment