I have this application that needs to pull data from a server every 30 minutes, after a lot of search I reached this solution: 1- using AlarmManager to notify the application each 30 minutes instead of keeping the service running in the background. 2- using wakelocks with PARTIAL_WAKE_LOCK
My only problem is that Wifi is off at sleep time.
How can I request that I need an internet connection when my alarm is triggered??