Calling a Service method from Activity
<p>In my activity i have:</p>

<pre><code>play.setOnClickListener(new View.OnClickListener() {

        @Override                           
        public void onClick(View v) {

        service.playSong(MEDIA_PATH);

        }
    });
</code></pre>

<p>and this is in Service:</p>

<pre><code>void playSong(String file) {
        try {

                mp.reset();
                System.out.println(file+songs.get(currentPosition));
                mp.setDataSource(file+ songs.get(currentPosition));

                mp.prepare();
                mp.start();

                mp.setOnCompletionListener(new OnCompletionListener() {

                     public void onCompletion(MediaPlayer arg0) {
                             nextSong();
                     }
             });

        } catch (IOException e) {
                Log.e(getString(R.string.app_name), e.getMessage());
        }
}
</code></pre>

<p>As you see from the code above in my activity when i click the button play I am passing the path into the service in order to play music but it is crashing What is wrong?</p>
