NOTE: This app requires ROOT access to work - if you don't know what it is, it is highly probable that your device doesn't have it. There is no other way this app can work on non-rooted phones. Not all devices may be supported as well! If your device is not supported, please follow the help & support text below. Also, checkout xda-developers.com for more information on rooting devices.
The app works when the device is plugged in and starts charging below the max threshold and will stop once the device is either unplugged or hits the max threshold, completely stopping charging!
The app is OPEN SOURCE, with the source code found on Github: https://github.com/sriharshaarangi/BatteryChargeLimit
Check out the XDA thread for more help & support:
XDA forum link: https://forum.xda-developers.com/android/apps-games/root-battery-charge-limit-t3557002
Help & Support
To request support for a device/issue, please open an Issue on GitHub and a developer will assist you soon!
This app is not responsible for unintended behavior - though any changes done by it are usually temporary and typically do not survive a reboot.