Please implement this interface "MediaPlayer.OnCompletionListener".
when the playback of the source has completed, you can play it second time. On Oct 21, 9:26 am, Rafael Maas <rafaelm...@gmail.com> wrote: > i have the following problem: > when i try to play a sound over and over again, it sometimes (actually > most times) is not played. > the documentation says that one should use the media player in the > following sequence if a sound should be played several times: > > private MediaPlayer mediaPlayer; > > onCreate(){ > mediaPlayer = MediaPlayer.create(JogoActivity.this, R.raw.new_pop); > mediaPlayerPrepare(); > > } > > method(){ > mediaPlayer.start(); > > } > > mySecondMethod(){ > method(); > method(); > method(); > method();} > > is this the wrong approach? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en