Charging Indicator for any battery (Charge Monitor)
Getting an accurate state-of-charge for a battery is not a trivial thing.  The easiest method is coulombe counting, i.e. how much current for how much time.  Unfortunately it's very inaccurate due to aging of the battery and temperature effects. 

A more accurate method is impedance tracking.  This tracks the internal impedance of the battery over time and allows much more accurate state of charge estimation.  It also requires knowledge of the battery chemistry, capacity, etc.  You can't just switch batteries from one type to another and expect it to work.

You can read about impedance tracking here: Impedance Tracking