How can I keep an app open/active no matter what on Android/AOSP?
I don't know what is wrong with my custom ROM (Paranoid Android) it is pretty much perfect it lasts all day and beyond (about 10 hrs of SOT with mid usage in my phone from 2020) and yet I struggle with the RAM management.
I am rocking a Poco F2 Pro which is EOL as of now, even when I moved from MIUI long time ago (is not that I don't like it, I just like AOSP more) one awesome feature I loved was the ability to lock an app so the aggressive MIUI RAM management would not kill it in the background, I used to pin a Reddit app for this matter, and now I want to do the same but with my Lemmy clients.
My device has 6GB of RAM and I feel that many apps reload a lot (Discord being one of them) anyway I only want to keep always active the Lemmy app now (only one at time since I use too many).
It's worth to mention that my device is rooted, so whether you know a handy trick to achieve this or with a mod I'd appreciate it... I have tried the battery restrictions feature but I don't think it is working the same as it was compared to MIUI's feature.
Normally a custom ROM handles the RAM way better than any stock ROMs because it comes with less bloatware and whatnot, but I am feeling I can only multitask 2 or 3 apps and nothing else.
The problem you're having may have more to do with the background process limit introduced in android 12 than with ram management. If you're on android 12 I think I remember there being an adb command that can change the limit from 32 to something else, though I may be mistaken. I think on newer versions of android you might be able to change it in developer settings. Though it's worth checking the Dev settings even if your ROM is based on android 12, since its possible the ROM changed or added options regarding the limit.
If that is in fact the problem you're having, and you find a good solution for android 12, let me know, I really need to see about fixing things on my pixel 3 so stuff like tasker and kwgt, and autonotification, don't constantly stop working 🙃