开发者

Android:Handling my function under Power(Red) button programmatiacally

开发者 https://www.devze.com 2022-12-09 14:32 出处:网络
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 s

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消