User User - 1 year ago 80
Android Question

Implement sounds in an android application

I am developing a game application in android. I have designed all the views and implemented all the functionality. Now in the last screen I have to play sounds in android. Can anybody tell me how to pursue with it?

Answer Source
MediaPlayer mp = MediaPlayer.create(getApplicationContext(), R.raw.AudioFile1);

And then you get all the start/stop/reset/pause/release methods from mp.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download