Override android headset hook long press
<p>I need to override the android heaset hook button, the long press causes the music player starts auntomatically and I need  to avoid this.</p>

<p>Is it possible in Android?</p>

<p>I try:</p>

<pre><code>@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_HEADSETHOOK) {
        return true;
    }
    return false;
}
</code></pre>

<p>But it not works.</p>

<p>Thanks,</p>
