0

I 'm trying to display keycode when user press specific key in my program. I can get all of keys keycode, i.e. vol_up / vol_down / Camera etc. But the screen will be locked/off when I press Power button, and I can't see the keycode of power key in the screen. Could someone tell me how to get the keycode of Power button and the screen won't be off/locked when pressing it?

Thanks a lot. Qin

Andro Selva
  • 53,910
  • 52
  • 193
  • 240
Qin
  • 1
  • 1
  • 2

1 Answers1

0

You can't. See this answer by Mark Murphy, from Google: https://groups.google.com/forum/#!topic/android-developers/pNtN7xvaqNk

espinchi
  • 9,144
  • 6
  • 58
  • 65