Here's my app scenario: normally my app does not require any background processes to run, so normally it is not affected by standby or doze mode. However, I want to add an option which allows the user to run an IntentService every selected minutes interval from (15,20,30,40,50,60) for the next 1-24 hours.
So basically I want to have an alarm starting my service every x minutes for the next y hours. The `IntentService` needs network connectivity to fetch data from server by calling webservices. Please note that it is important that if the user sets it for every 20 minutes, to run around that interval, if it's 21-22 minutes it's not a problem. In order to achieve this I set the alarms as this: - for version smaller than KITKAT using `alarmMgr.set` - for versions between KITKAT and M using `alarmMgs.setExact` - for versions bigger and equal to M using `alarmMgr.setExactAndAllowWhileIdle` and I reset the alarm when previous alarm fires. Now I have a few concerns: 1. if the phone enters Doze mode, will the `setExactAndAllowWhileIdle` allow access to network connectivity? From the docs I understand the app is temporary whitelisted and has a 10 sec time to obtain its own wakelock. 2. I don't want to ask the user to whitelist the app for instance by requiring `REQUEST_IGNORE_BATTERY_OPTIMIZATIONS` as I saw comments with apps being disabled by Google (http://stackoverflow.com/questions/32316491/network-access-in-doze-mode#comment54538077_32424117). By using `setExactAndAllowWhileIdle` am I exposing myself to any possible issues to get my app disabled? I find all this process way to complex... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/68f02d73-b5b4-460f-83b1-a0ccd6f96368%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.