Is it possible to get a device to wake up from sleep (screen dark) by detecting a touch to the screen?

后端 未结 1 964
遇见更好的自我
遇见更好的自我 2021-02-09 17:22

I want to get an android device to wake up from sleep or however the state in which the phone gets after a certain amount of inactivity when the screen goes dark, by detecting a

1条回答
  •  野性不改
    2021-02-09 18:01

    Am I misunderstanding the purpose of this flag?

    AFAIK, yes. There is a slice of time between when the screen turns off and when the device falls asleep. During this time, if the user touches the screen someplace where the window has this flag, the screen turns on again and the inactivity timer is reset.

    I can find no other use of this flag in the Android source code.

    Is there some other way?

    No. If the device is asleep, touch screen events are not registered.

    0 讨论(0)
提交回复
热议问题