title: Why do .ogg files loop?
body: <p>In the following class the playback of the .ogg file is triggered.</p>
  
  <pre><code>public class HomeScreenFragment extends Fragment {
      ...
      private AudioPlayer mPlayer = new AudioPlayer();
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
          ...
          mStandbyButton = (Button)v.findViewById(R.id.standby_button);
          mStandbyButton.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  mPlayer.play(getActivity());
              }
          });
      }
  
      public void onDestroy() {
          super.onDestroy();
          mPlayer.stop();
      }
  }
  </code></pre>
  
  <hr>
  
  <p>Despite of using the setOnCompletionListener() the files keep on looping unlike .wav</p>
  
  <pre><code>public class AudioPlayer {
      private MediaPlayer mPlayer;
  
      public void stop() {
          if(mPlayer != null) {
              mPlayer.release();
              mPlayer = null;
          }
      }
  
      public void play(Context c) {
          stop();
  
          mPlayer = MediaPlayer.create(c, R.raw.hassium);
          mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
              public void onCompletion(MediaPlayer mp) {
                  stop();
              }
          });
          mPlayer.start();
      }
  }
  </code></pre>
  
  <p>How to ensure they don't loop once playback is completed?
  I could possibly work with .wav files but curious as to why this happens and if possible prevent them from looping.</p>