how to show a AlertDialog while Pressing the HomeButton
<p>Hi I have written the following code:</p>

<pre><code>public boolean onKeyDown(int keyCode,KeyEvent event) {
    if (keyCode==KeyEvent.KEYCODE_HOME) {
        showDialog(MY_DALOG);
        return  true;
    }
    return true;
}
</code></pre>

<p>But when I press the <code>HOME BUTTON</code>, it doesn't call the line <code>if(keyCode==KeyEvent.KEYCODE_HOME)</code> when debugging.</p>

<p>On the other hand, it calls the <code>onPause()</code>. I have put my code in <code>onPause()</code> but still, it shows a <code>SuperNotFound</code> exception in Logcat.</p>

<p>Any idea how to display a <code>dialog</code> by pressing the <code>HOMEKEY</code>?</p>
