Using Mediaplayer to replay the same file
<p>Im hoping you can provide some guidance. I created a 'final' instance of a mediaplayer (mp1) and on a button click it plays a mp3 file. I then need to stop the file when I click a second button. This works fine until I try to play the file again - nothing happens. I think that because the mp1 instance is 'final', when I stop it, it stops for good until I relaunch the app. I dont want to pause the file, I want to stop it and then restart it afresh. Any ideas welcome. I tried putting the  mp1 creation within the button. This worked until the app crashed - probably because multiple mediaplayer creations used all the device memory?</p>

<p>Thanks!!!</p>

<pre><code>// const mediaplayer
mp1 = MediaPlayer.create(getApplicationContext(), R.raw.mysound);

...

// in button 1
if (radSound1.isChecked()) {
               radSound2.setChecked(false); // ...set radiobutton 2 to false
                mp1.start();                 // ...play the mp3 file
               }

...


// in button 2
if (mp1 != null){
                  mp1.reset();
                   //mp1.setDataSource();
                   // mp1.prepare(); 
              }
</code></pre>
