My app uses a service which needs internet connection to work in the background. However, when android goes to sleep, my service cannot access internet anymore. I've seen that wakelock can fix it, but it seems to be an overkill for just keeping the network up. Is there any other way to achieve this?
How does apps like whatsapp handle this?