MKR1310 PMIC.canRunOnBattery() Only works when powered with USB

Hi!
I would like to know when to change the battery. PMIC.canRunOnBattery() command would be appropriate, but it only works if board is connected to USB.
There is a way to make it work without USB only battery?

I know it can be make with a voltage divider, but i just need a signal.

I use <Arduino_PMIC.h> and MKR1310.
Thanks

Yes, it appears you only missed one connection, the one on the left. For me to tell you which one you have to post a Schematic, not a frizzy picture showing how you have it wired including all power, grounds and power supplies. I assume your code is ok as it appears to work in one hardware configuration. Post links to "Technical Information" on all the modules you used. We have no clue to where you are so we cannot see your project so tell us in the language of electronics, schematics.