Search code examples
androidmp3android-video-player

Playing mp3 voice for android application on clicking button


hi i am developing android application in which i need to play a saved mp3 voice when someone click on button. on clicking button another activity will be opened and saved voice should be played how can i do it??

Regards


Solution

  • First, you need a service to play MP3 via android.media.MediaPlayer

    Second, you can put your saved MP3 in res/raw folder. (manual create it, if it doesn't exist)

    And this could help : Get URI of .mp3 file stored in res/raw folder in android

    ......

    cheers~