https://batteryuniversity.com/index.php/learn/article/how_to_prolong_lithium_based_batteries
https://forum.xda-developers.com/android/apps-games/root-battery-charge-limit-t3557002
I just stumbled on this recently. I think the information should be spread. Recent studies show: manufacturers love you keeping your battery at 100% and burning it out so you trash your equipment and buy new equipment every two years.
Keeping your battery at a lower voltage increases battery life by 200-500%.
Android allows you to kill the charging while still plugged in at
/sys/class/power_supply/battery/battery_charging_enabled
writing a 0 to stop, 1 to charge
someone discovered this and wrote an app to monitor and charge only inside of certain thresholds. depending on your phone and the proprietary drivers that are implementing this toggle, it may work better than even the app claims it does.
on my phone atleast, when using this, when battery_charging_enabled is ticked to 0 and it remains plugged in, the battery does not appear to be used at all. the app is supposed to let it drain to X threshold, and then charge it back up to Y, but the phone may be able to power itself via the charging port and not use battery at all, so the battery won't drain, and you can now keep your battery at perfect storage voltage for maximum battery life while plugged in.
this is also possible on linux with thinkpads
www.thinkwiki.org/wiki/Tp_smapi
most laptops will not do this, it's completely dependent on the charting hardware in the laptop and the drivers the manufacturer ships.
i'm surprised android devices have this capability at all, it supposedly has wide support, though it isn't implemented at all officially in android.