1
Hello, would you like to know how to call a more efficient sound? 'Cause I’m using this method :
Button button1;
MediaPlyer mp;
button1 = (Button)findViewById(R.id.button1);
button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mp = MediaPlayer.create(Teste.this, R.raw.som);
mp.start();
}
});
and I’m in trouble because it works, when you click several times there are times that the sound doesn’t come out anymore.
this error is appearing
The method killMediaPlayer() is undefined for the type MediaPlayer
and– Vale
@Rodolfo Take a look at my updated response.
– André Ribeiro