Reputation: 4905
Does anyone know how to handle Android HTC device Red (power) button programatically to stop my operation. I want to stop running some of my operation when user presses REd button when user is in my screen. I know for other buttons like Back button i could use "keyCode == KeyEvent.KEYCODE_BACK" event. But what is for Power(End) Red button? I'm not getting any keycode events for Red button when i'm in my application.
thanks.
Upvotes: 2
Views: 1021
Reputation: 1007099
AFAIK, you cannot override the END_CALL
key event in an Activity
or View
.
Upvotes: 3