Preparing a mediaPlayer is the most expensive operation. calling stop() or pause() and then start() works best for me. You can also peek at the MediaPlaybackService for inspiration.
Why do you think it will get into the bad state? On Nov 3, 7:14 pm, Moto <[email protected]> wrote: > What is the best way to use the MediaPlayer when needed multiple > times? > > Reuse the instantiated MediaPlayer throughout the session? Or > constantly stop() release() and instantiate a new MediaPlayer() ? > > If I reuse I'm afraid the player could be in a bad state? > What about performance wise? what's better? reuse or renew? > > Note: This is for using as a music player so one audio be present at > one given time... > > Thank! > -Moto! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

