Android: Listen for power key press

前端 未结 3 802
一生所求
一生所求 2020-12-03 13:20

I am currently trying to listen for when the power button is pressed. Ultimately I would like to have some code run when the power button is pressed twice, to check whether

3条回答
  •  余生分开走
    2020-12-03 13:45

    AFAIK, it's not possible for Power key.

    You might want to refer to this answer: http://groups.google.com/group/android-developers/browse_thread/thread/a4db4def1bdaa8d9

提交回复
热议问题