Místo:
if (player == null) {
player = MediaPlayer.create(context, R.raw.sonar_ping);
}
player.start();
Tam dát:
player = MediaPlayer.create(context, R.raw.sonar_ping);
player.start();
Nebo dokonce jenom:
MediaPlayer.create(context, R.raw.sonar_ping).start();