Thanks to the help of the community I have the second version of my application successfully working. My system uses the LiPo battery as main power source, with a bigger 12V battery charged with a big solar pannel as backup. So my program gets the power from the 12V battery when the LiPo is below certain charge level, and disconnects from the 12V source when the LiPo reaches a certain higher level. By 12V I mean 5V from a 12 V to USB power. I get the LiPo charging level calling FuelGauge’s method getSoC();
My concerns are about the low and hig LiPo levels, that currently are 40% and 99%, and if it will be convenient to let the battery charging some time after reaching the high level, to ensure full charge. All of this is related with battery life and the ways not to shorten it by misuse.
Thank you very much for your advise.