How to listen to onKeydown when alert dialog box is open
<p>I have a check box, upon unchecking the box, I show alert dialog. I want to retain the preference when back key is pressed on display of alert dialog pop up.
 I am aware of onKeyDown method and facing problem when I want to use it with alertDialogBuilder. How do I listen to back key/on key down event when there is alert dialog pop up , and retain the checkbox preference when user unchecked>got the pop up>but pressed back key. 
Thanks.</p>
