Music doesnot stop after pressing backkey
<p>I have an activity A which invokes Activity B on Button Click,and a Button click on Activity B invokes Class C. When button is clicked in Activity B , B calls a static method in Class C which passes its reference as one of the argument to method in C and other argument is path to the sound file that needs to be played. Once control reaches class C , Audio is played. But when Backkey is pressed Audio doesnot stop it continuous to play. How can I make the Audio to stop when BackKey is pressed. More over when Backkey is pressed control is coming to Activity A instead of Activity B. Can any one help me in solving this issue?</p>

<p>class activityA extends Activity  <br>
{
   startIntent(ActivityB)  on ButtonPress <br>
}
<br></p>

<p>class ActivityB extends Activity <br>
{
   classc.playAudio(ActivityB.this,audiopath); <br>
} <br></p>

<p>class c <br>
{
  playAudio(Activity a, audiopath) <br>
   {
    sound code to play audio is done here. <br>
    } <br>
} <br></p>
