It will be difficult to detect. The Android API provides a way to control Wake Lock. But the manufacturers did TERROMY work on introducing this into the OS on their side. Just awful. You will need to capture PARTIAL_WAKE_LOCK in order to support the central processor of the phones when the screen turns off.
However, not all devices use this and will not respond - half / half of the answer - and some of them respond perfectly.
After reading the comments above, I can tell you that most devices with 2.3+ I used, but have not yet implemented partial tracking lock.
I personally will not rely on what the manufacturer controls, because the SO market is fragmented. I would try to find a way to get the functionality I'm looking for with a different solution.
Hope this helps.
jjNford
source share