How to disable Doze for an application?

The new Dozemode Android 6disables almost all useful background actions. I have an application that regularly woke up the device (even if it didn’t lock the screen), retained a partial tracking lock, did some scans and reported this to the Internet. This is not a spyware application - this operation is specially known to users of the application.

Now Android 6it doesn’t work with anymore, because the mode Dozeprevents the final connection with my servers.

I found a new setting in the "Battery" section, which allowed me to put my application on the list of those applications that did not support "battery optimization". In the first tests, it seemed like this started my application again.

After some additional tests, I found that even my application did not support Doze, it no longer worked in the background.

Shouldn't this setting be disabled Dozefor certain applications?

Details for Doze are here http://www.androidpolice.com/2015/06/01/android-m-feature-spotlight-this-is-exactly-how-doze-reduces-battery-drain/

+4
source share
2 answers

, , , . Android 6.0 Doze , . . PARTIAL_WAKE_LOCK .

0

Doze Restrictions:

  • AlarmManager [...] .
  • Wi-Fi.

, , . , .

0

Source: https://habr.com/ru/post/1611062/


All Articles