title: How to use mediaplayer.stop()?
body: <p>I'm learning Java in combination with Android at the moment. Today I wanted to learn about mediaplayers. I've made three buttons: play, pause and stop. Play and pause work properly, but whenever I press the stop button, the music stops and I'm not able to start it again. I have to reopen the app to let the music play again. What is my mistake?</p>
  
  <pre class="lang-java prettyprint-override"><code>public class MainActivity extends AppCompatActivity {
  
  
      MediaPlayer mymediaplayer;
  
      public void Play (View view){
          mymediaplayer.start();
      }
  
      public void pause (View view){
          mymediaplayer.pause();
      }
  
      public void stop (View view){
          mymediaplayer.stop();
      }
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          mymediaplayer = MediaPlayer.create(this,R.raw.mysoundfile);
  
      }
  }
  </code></pre>