title: Playing sound only once
body: <p>I'm trying to play an alarm sound exactly once:</p>
  
  <pre><code>    Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
  
      final MediaPlayer mMediaPlayer = new MediaPlayer();
      mMediaPlayer.setDataSource(ctx, notification);
      mMediaPlayer.setAudioStreamType(AudioManager.STREAM_ALARM);
      mMediaPlayer.prepare();
      mMediaPlayer.setLooping(false);
  
      mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
          public void onPrepared(MediaPlayer arg0) {
              mMediaPlayer.seekTo(0);
              mMediaPlayer.start();
          }
      });
  </code></pre>
  
  <p>But the sound plays endlessly, although 'setLooping' is set to false.
  What else can I do to make the sound not loop?</p>