Android WebView(Activity A) music still play even user go to Activity B
<p>I would like to find a solution on how to stop the music when user go back to the Main Activity.</p>

<p>My code bellow, user can go back to the Activity A as usually but the music still play from Activity B.</p>

<p>I have 2 Activity as bellow code:</p>

<h1>Layout A</h1>

<pre><code>&lt;Button
    android:id="@+id/buttonUrl"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="My Song" /&gt;
</code></pre>

<h1>Java of Activity A</h1>

<pre><code>public class MySongActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        final Context context = this;

        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

         final Button button = (Button) findViewById(R.id.buttonUrl);
         button.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {

                Intent intent = new Intent(context, WebViewActivity.class);

                startActivity(intent);
         }
     });
}
}
</code></pre>

<h1>Layout B</h1>

<pre><code>&lt;WebView  xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none" /&gt;
</code></pre>

<h1>Java of Activity B</h1>

<pre><code>public class WebViewActivity extends Activity {

WebView mWebView;
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.playlist);

    mWebView = (WebView) findViewById(R.id.webView1);
    mWebView.setWebViewClient(new HelloWebViewClient());
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setPluginsEnabled(true);
    mWebView.getSettings().setAllowFileAccess(true);
    mWebView.loadUrl("http://m.orkun2u.com/msopheap/song/mysongs.htm");
}
private class HelloWebViewClient extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; mWebView.canGoBack()) {
        mWebView.goBack();
        return true;
    }
    return super.onKeyDown(keyCode, event);
}
}
</code></pre>

<p>Kindly please help me. I do appreciate for your help.
**Note: I tried all the way that google it but still doesn't stop the music.</p>
