Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background service dies after short period despite disabling all optimizations #14

Open
maloryware opened this issue Mar 19, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@maloryware
Copy link

Platform: Xiaomi Redmi Note 12S
OS: LineageOS 20.0 (Unofficial port for Redmi Note 12S)
Issue: After ~30 seconds of exiting the app, the service stops running altogether, causing the app to not function at all.
I'm aware Xiaomi is very insistent and annoying with its battery-saving policies, but I've just about tried everything I could to have it not die after a few seconds. Unrestricted battery usage, all permissions it could need, battery manager disabled. Currently attempting to set up "Automation" with a rule to auto-start it every 30 seconds, which is definitely going to melt my battery, but is the only replacement I could think of.

@xfarrow
Copy link
Owner

xfarrow commented Mar 20, 2024

Hi @maloryware , I am sorry to hear that. I have a Xiaomi Note 11S and it does work well, I am then unsure what the problem could be.
What about "pinning" the app in the recent apps? I personally did not do that, but it should not occupy too much memory.
In any case, I will investigate the problem.

Thank you for your patience.

@maloryware
Copy link
Author

Hey, thank you for the speedy reply!
While MIUI HyperOS has that functionality, LineageOS doesn't seem to - or at least the fork I'm using (which is, unfortunately, for the time being, the only one available for the 12S)
I'm not very well versed in how Android apps work, and attempted to delve into the app's source code to see if there was a service I could start every 30 seconds, or prioritize, but the only thing keeping the app alive is a cached background process.
image
I honestly don't know how difficult this is, as my development experience with Android is very limited, but I believe starting a service associated to the app should fix the problem

@xfarrow
Copy link
Owner

xfarrow commented Mar 20, 2024

Oh thank you for the huge help, this could indeed work. To be honest I am not super accustomed to Android development either, I'll try to research and deep into it!

@xfarrow xfarrow added the bug Something isn't working label Mar 20, 2024
@maloryware
Copy link
Author

Glad to be of assistance, let me know if there's anything I can do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants