Doze mode will help save the battery from your phone, but you can easily disable it if you want.
New in Android marshmallow is a feature called “the Doze mode,” which prevents tasks from running if you’re phone has been sitting idle for a while. The idea here is to save battery life by reducing power draw when you’re not using your phone.
But if you have a particular application that you want to let run unchecked, no matter what, you can disable Doze mode for this application. Here is how.
Open the Settings app and tap the battery. Press the Options menu button (three dots in the upper right corner), then press the battery optimization. Tap the arrow pointing down, and then tap All applications on the menu that appear.
Read more>> 6 Best Battery Saver Apps for Android
Next, tap the name of the app for which you want to switch off Doze mode, and in the box that appears, tap Don’t optimize. Once you’re done, tap Done.
Then press the name of the application you want to disable Doze mode, and in the box that appears, type Do not optimize. Once you’re finished, tap Done.
You can enable Doze Mode back at any time, just repeat the above process, but when prompted, press Optimize instead.