Error with MediaPlayer
<p>I am trying to make music play in my app and have a song play after the first one has finished but i get some errors that i cannot resolve any help?</p>

<pre><code>public class Music {
    int count;
    String[] titles = new String[] { "title1.mp3", "title2.mp3", "title3.mp3", "title4.mp3" };

    public void GameMusic(){
        count = 0;
        MediaPlayer mp = MediaPlayer.create(this, R.raw.title1);
        mp.start();
    }

    void onCompletion(MediaPlayer mp){
        mp.stop();
        if (count == titles.length -1) {
            count = 0;
        }
        mp.setDataSource(titles[count]);
        count++;
        mp.prepare(); 
        mp.start();
    }
}
</code></pre>

<p>The errors are on:</p>

<pre><code>    MediaPlayer mp = MediaPlayer.create(this, R.raw.music); 
</code></pre>

<p>(The method create(Context, int) in the type MediaPlayer is not applicable for the arguments (Music, int)</p>

<pre><code>    mp.setDataSource(titles[count]);
</code></pre>

<p>(Unhandled exception type IOException)</p>

<pre><code>    mp.prepare();
</code></pre>

<p>(Unhandled exception type IOException)</p>

<p>Any help would be appreciated.</p>
