Stop Sound when Hold key is pressed
<p>I want to stop media sound when the user press hold key or power key
I do this</p>

<pre><code>    public boolean onKeyDown(int keyCode, KeyEvent event) {
    if(keyCode == KeyEvent.KEYCODE_ENDCALL || keyCode == KeyEvent.KEYCODE_POWER){
        pauseSound();
    }
    return super.onKeyDown(keyCode, event);
}
</code></pre>

<p>But this override function didn't invoke when Power or end call is pressed</p>

<p>Any idea?</p>
