Check out 'App power saving' settings

Even if you identify and remove power-hungry apps from your phone, there are plenty of other apps you want to keep around but are still unnecessarily running in the background. The best way to handle this is in the Galaxy S7's "App power saving" settings, which can be found inside the Battery area of your phone's settings.

With App power saving turned on, your phone will restrict the ability of apps to run in the background if you haven't used them in more than five days. For example, if you haven't opened up the Foursquare app in five days, it won't be able to run rampant in the background because you've expressed that you aren't interested in having it running all the time. The app will still work when you open it up and that'll reset the counter for it to be optimized again.

In the settings you can define on an app-by-app basis what the settings will be, if you wish — the default will have the app save power after five days of inactivity, but you can also set it to always save power or never save power. For example, you may want a travel utility like the American Airlines app to always be able to run for flight updates, even though you may not open it every five days.