Question

I've been playing around with windowManager overrides of WakeLocks in android. I've got it to the point where I can power off the screen so that the video I'm running will "turn off". However, the CPU remains running and consequently so does the audio. I'd like to be able to put the device in sleep mode when I click the power button while the video is running. Is this possible? If so how?

Was it helpful?

Solution

I'm currently running a hack that tests the screen state at certain intervals and stops the video (hence the audio) and leaves the CPU running. I'd be happy if people have a better solution but this is part of the way there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top