Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I programmatically stop a notebook battery from charging

There is some easily available information on finding the status of a battery, or weather it's charging or not. (GetSystemPowerStatus API or System.Windows.Forms.SystemInformation.PowerStatus).

I want to be able to stop a battery from charging based on some criteria, e.g. battery power > 20%.

Is there an API to do this?

like image 346
Marcel Avatar asked Jul 07 '09 11:07

Marcel


People also ask

How do I stop my laptop from charging automatically?

Go to the Save Power tab, click Battery Conservation. Enable Conservation Mode, which will avoid fully charging the battery on each charge, or disable it, then the battery will be charged fully.

How do I stop my battery from charging Windows 10?

Open the app and go to “Device > Power.” Scroll down and navigate to the Battery Settings section. Turn on the Battery Charge Threshold button. Click on the START CHARGING WHEN BELOW and STOP CHARGING AT drop-down menus and select the desired percentage.

How do I stop my Dell laptop battery from charging?

Some Dell laptops have an optional hotkey on the keyboard that will disable charging. For example, Fn + F2 . If your computer has this option, use it to enable charging. To learn more about hotkeys, see the User Manual of your Dell laptop.


1 Answers

I think it's impossible, because you have need some API for battery or battery charger.

And this API can provide to you manufacturer of notebook and battery or battery charger support this.

like image 160
MicTech Avatar answered Sep 21 '22 13:09

MicTech