Implement sounds in an android application

后端 未结 5 1783
遥遥无期
遥遥无期 2020-12-28 18:38

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.

5条回答
  •  無奈伤痛
    2020-12-28 19:30

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

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

提交回复
热议问题