經安全檢測,此網站為安全網站,請放心前往原始網址!

Overriding the power button in Android - Stack Overflow

I don't know what you intend to do, but you could use a BroadcastReceiver and listen for the android.intent.action.SCREEN_OFF or Intent.ACTION_SCREEN_OFF which is sent when power button is pressed (and screen is on). Unfortunately this intent will be sent

stackoverflow.com

網址安全性掃描由 google 提供