- context
- the Context to use
- resid
- the raw resource id (R.raw.<something>) for the resource to use as the datasource
Documentation for this section has not yet been entered.
Convenience method to create a MediaPlayer for a given resource id. On success, MediaPlayer.Prepare will already have been called and must not be called again.
When done with the MediaPlayer, you should call MediaPlayer.Release, to free the resources. If not released, too many MediaPlayer instances will result in an exception.
Note that since MediaPlayer.Prepare is called automatically in this method, you cannot change the audio stream type (see MediaPlayer.SetAudioStreamType(Stream)), audio session ID (see MediaPlayer.AudioSessionId) or audio attributes (see MediaPlayer.SetAudioAttributes(AudioAttributes) of the new MediaPlayer.