This app was mentioned in 4 comments, with an average of 1.75 upvotes
you can use an app called disable usb charging to stop it from charging. https://play.google.com/store/apps/details?id=org.bramantya.stopcharging&hl=en
​
so you can drain it to 30%, then stop the charging.
​
for samsung galaxy family, its usually the "Easy" or "number 2" button that works for stopping charging. It need ROOT access.
​
full disclosure: i made that app.
Keep it under 90 percent, over 10 percent.
Keep it cool by disabling USB charging when using it to play long sessions of games or flying a drone
https://play.google.com/store/apps/details?id=org.bramantya.stopcharging
But frankly, it's simpler to just use it normally and then simply replace the battery 1-2 years later.
I'm using a Samsung S7 Edge with my mavic. I use this program to stop it from charging of the controllers battery. Works great but needs root.
https://play.google.com/store/apps/details?id=org.bramantya.stopcharging
While this is supposed to stop charging in the other direction, maybe this will work? https://play.google.com/store/apps/details?id=org.bramantya.stopcharging