Code example for MediaPlayer

Methods: stop

0
  } 
 
  public void stop() { 
    if( mediaPlayer == null ) return;
    try { 
      mediaPlayer.stop();
    } catch( IllegalStateException e ) {
    } 
  } 
 
  private void stop( int soundID ) {
    setSound( soundID );
    loopEnabled = false;
    start(); 
  } 
 
  public void onCompletion(MediaPlayer mp) {
    //mediaPlayer.release(); 
    //mediaPlayer = null; 
  }