I'm writing an android application that depends on network activity and the alarm manager sometimes waking the phone up from a sleeping state.
My question is how can I reliably test this on device? Ideally, how can I force the phone into a full-on sleeping state. Failing that, how can I know for sure when the phone has fully gone to sleep?
How do you test your Alarm Manager / Wake Lock / Sleep handling code?