Play the music on the specified SD card. Use mmediaplayer. setdatasource ("\ sdcard \") sets the path of the file to be played, and then calls start (), stop (), and pause () to start, stop and pause playback.
However, if the app comes with its own music (such as the sound effects in the game), it is not the music in the sdcard. Normally, there will be 'res \ AW \' under the app directory, it is very easy to set the playing path of the music. You only need to change the setdatasource () method to a mediaplayer object created by the create method to specify the resource index, that is, mmediaplayer = mediaplayer.Create(Context
Context, int resid ).
However, there is a problem here. It should be noted that the size of resid is smaller than 1 MB. If it is large, an error will occur ..... I have been entangled in this issue for a long time. I have checked a lot of information and posted it for your reference ....