How to use CPU to perform any operation in Deep Sleep mode
I'm new in android . I struggle with my application approximately 3 weeks. I need sent and receive packets in normal mode and sleep mode . My app must exchange data a 5 seconds. I tried using alarmmanager but on android 5 it's not works. On android 5 an interval changes it on 60 seconds. Such a solution makes the battery wears out quickly. When I use normal asynctask, not IntentService , then it works only when screen is ON and app is visible. When app is hidden or I click power OFF then exchange data stops working. What is the best solutions? Even RTC_WAKEUP doesn't help most of the times.