2

I want phone to sleep when user use my app. When user looks the screen it should be wake up. I tried to use proximity sensor but user must approach very close. Is there another way?

user
  • 113
  • 1
  • 11

1 Answers1

1

You could look at the phone movement, i.e. if the phones orientation is altered. See here for more info Detecting movement using accelerometer - (Orientation is not changing)?

Community
  • 1
  • 1
cultrixx
  • 11
  • 2