3

Can you programmatically check to determine if your android device is in deep sleep mode?

Reason being, if it is, you may obtain a wake lock or a wifi lock... however, is it is not, you wouldn't want to obtain a wifi lock if it is not necessary. Since, I also have a delay created when a wifi lock is obtained in order to allow the device time to connect to the network. If it is not needed, I do not want to get the wifi lock and add a delay.

gauglerb
  • 258
  • 1
  • 12
  • May this help : http://stackoverflow.com/questions/6691727/how-to-find-whether-phone-is-in-sleep-idle-mode-for-android – Alexis C. May 20 '13 at 16:56

1 Answers1

0

I got a suggestion for you, Register to screen off and on, when screen off take a one minute timer, if screen on cancel it, when you got to end of timer do your locks, till screen on again.

Chen Kinnrot
  • 20,609
  • 17
  • 79
  • 141