Android Question power button keycode (samsung Android 9)

Discussion in 'Android Questions' started by peacemaker, Jul 29, 2019.

  1. peacemaker

    peacemaker Well-Known Member Licensed User

    HI, All

    Is it possible to just trap the power key click, or long tap ? Even if root access is avalable.
     
  2. DonManfred

    DonManfred Expert Licensed User

    I don´t think this can be captured.
    You need to check Google Documentation (or search google) on how about it works or not on rooted devices. But even here i expect NO.
     
    BillMeyer and Erel like this.
  3. peacemaker

    peacemaker Well-Known Member Licensed User

    "android.intent.action.SCREEN_OFF" intent is got via BroadcastReceiver OK.
    The puzzle is to get root ... to try to use "reboot" and "shutdown".

    p.s. but the power bitton keycode is also existsing, and maybe can be cought with root ... :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice