
Tip: Stop those unwanted apps/games from running in the background
I just wanted to share this, as I have been looking for a solution like this for a long time. I use Shappky (https://github.com/YasserNull/shappky) to find and identify unwanted apps running in the background. I use no_more_background (https://github.com/adil192/no_more_background) to easily apply battery rules for them to not run in the background. However I was slowly in the process of making a app that would instantly kill/stop any foreground app, losing focus, as I didn't find anything that could do that, until I stumbled upon OnStop2FinishAndRemoveTask (https://github.com/takusan23/OnStop2FinishAndRemoveTask) and I can not praise it enough. These are all Shizuku apps and on Github, so I use Obtainium (https://github.com/ImranR98/Obtainium) to keep them all up to date. I got tired of constantly seing apps like Samsung Browser, Copilot, Edge, and whatever they use to keep their own apps running again in the background, and firing them up by themselves, so I added those to Hail (https://github.com/aistra0528/Hail) for deep sleep, as I barely use them at all. I am not affiliated with any if these developers. Battery life has gone through the roof. Hopefully one day Android will implement this "Strict" option of mine as a 4th option to "Unrestricted" under battery settings for every app, but until then, I can highly recommend that you give this a try.