Pausing MediaPlayer in a service from an activity
<p>This is probably a newbie question, but how can I pause and resume my media player in a service from my activity. Here is what I have set up so far, but it is not working.</p>

<pre><code>pause.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            MyService.pauseSong();
        }
    });
</code></pre>

<p>In my service is this:</p>

<pre><code>public void pauseSong(){       
    if (mediaPlayer.isPlaying() == true){
        mediaPlayer.pause();
        notificationManagerPlay.cancel(5);
        pauseplay = 0;
    }
}
</code></pre>

<p>Your help is appreciated so much!</p>
