I have one Android application that will talk to the 24 * 7 server via Wi-Fi, but when the phone goes into sleep mode, it stops talking to the server, so the socket is closing, so for this I added a code to get a partial lock tracking in the onCreate () service and release it on the OnDestroy () method, so even if the phone goes into sleep mode, my application can talk to the server.
The problem is this: if you keep the device in standby mode for a longer period (more than 8 hours), it stops communicating with the server and WiFi is turned off. I heard about the device’s deep sleep mode, in this case it will turn off the CPU, WiFi, etc., So how to limit it to disable the processor and Wi-Fi?
Please help me with an example.
Regards, Peaks
source
share