how to turn off doze mode for specific apps in marshmallow devices programmatically
<p>Marshmallow APIs are very different from previous android OS. When screen is off, devices are in doze mode and unable to sync network. So for doing background operations with network we have to prevent from doze mode. </p>