I am fond of making a program which will be used for laptops in order to keep a max charging threshold for the battery. It is well known that preventing laptop battery from getting to the maximum or lowest level increases life of the battery. Is there some API that can collaborate with and at first get the battery % level and later if this level is >= from a set level to close the connection with the battery and use AC only?
Thanks in advance.