Closed AzzyC closed 1 month ago
I haven't looked at that part yet. So, you could be right.
Just for further context:
You will notice the notification icon didn't appear as the service didn't start until I launched the app
I will verify if this aspect worked in F-Droid Battery Charge Limit, and edit this comment accordingly
I will verify if this aspect worked in F-Droid Battery Charge Limit, and edit this comment accordingly
I have made the latest fork from the repository (updated in 2020) which isn't the same as the F-Droid version (which was updated in 2018).
Oh okay never mind so much for that then,
But just as an N.B, the F-Droid variant does auto-start Limit service upon charge, so maybe something got written out or not addressed in the 2020 repo update.
Nonetheless, it is not too much of a biggy. I always launch the app anyways to always be sure of the service being on
I've taken a look at it. Apparently, the charging on/off only works if a foreground service is active or if a job schedular is in place. So, the option is to use a job schedular to trigger the service.
I confirm this bug on Android 11 even if app is not battery optimized and installed as system.
The battery charge limit from 2018 is triggered as soon the charger is plugged.
The battery charge limit from 2018 is triggered as soon the charger is plugged.
Yes, it's because the 2018 version targets an older SDK. So, it runs on compatibility mode. I have already outlined the solutions above, but I do not have enough time to work on it right now.
If an app targets Android 8 onwards, ACTION_POWER_CONNECTED is no longer sent to the app. So, there's no way to detect if power is connected.
ROM: ArrowOS Device: Poco F3 / alioth Control File: input_suspend
Problem: Battery Limit service only enables after manually launching the app, not detecting when power is connected. Though the app may have not been launched in a while, the service would still enable upon charge detection in the older versions of this app
Expect to happen: App should detect when power is connected and start the Limit service itself
Anything else: Maybe the app isn't taking advantage of having the privilege of 'Unrestricted' Battery usage (?)