when will this happen?
After the screen turns off, based on user settings for inaction.
Will the CPU sleep, and are my threads suspended?
Yes.
when will this happen?
You already asked about it.
To prevent the processor from hibernating, can I use a lockout lock or PARTIAL_WAKE alarm manager?
AlarmManager can cause the phone to AlarmManager up, but only very briefly. A WakeLock prevents the device from WakeLock sleep mode.
How to prevent software shutdown of Wi-Fi and 3G connection in sleep mode from my application?
Use WifiLock to prevent Wi-Fi radio from turning off. Radiotelephone communications are not affected by sleep mode.
What is the best way to achieve this?
If the user is not actively using the device, allow the connection to stop working. By definition, they do not participate in an instant messaging session if their device falls asleep.
I know about the C2DM platform
It has been replaced by GCM, which has the same basic characteristics.
source share