I would like to play an audio file from the sdcard. How can I read the audio file and play it? Below is my code to play audio file:
int sound1; sound1 = mS
Use the code below it worked for me.
MediaPlayer mp = new MediaPlayer(); mp.setDataSource("/mnt/sdcard/yourdirectory/youraudiofile.wav"); mp.prepare(); mp.start();