Implement sounds in an android application

后端 未结 5 1784
遥遥无期
遥遥无期 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:41

    Just place the sound file in /res/raw (after creating the folder) and then use MediaPlayer to init, start and then stop playing the sound. MediaPlayer documentation can be found here.

    HTH,
    Sriram.

提交回复
热议问题