Android:Handling my function under Power(Red) button programmatiacally
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 button开发者_运维技巧s 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.
AFAIK, you cannot override the END_CALL
key event in an Activity
or View
.
精彩评论