Can I read Android MediaPlayer Button Control on EtoBox?
Android MediaPlayer Button Control by dtanonimo is a document available to read on EtoBox.
What is Android MediaPlayer Button Control about?
The document discusses using the Android MediaPlayer to play audio clips from buttons. The original code used two separate MediaPlayer objects, but this caused issues when trying to stop playback and start a new clip. The recommended solution is to use a single MediaPlayer object, call stopPlaying() to stop the current clip, recreate the MediaPlayer with the new audio clip, and start playback. stopPlaying() stops the MediaPlayer, releases it, and sets it to null to avoid issues.
- Author
- dtanonimo
- Language
- EN