Get battery level does not work

I tried to use expo-battery to get level battery but it doesn’t work the battery status is rendered onlty one time but not updated . I took the example from the site

Hi @anis180793

I have moved your question to the Expo SDK category.

Please let us know what platform you are experiencing the problem on? Android/iOS?

If it’s on Android, then please take note of the following from the addBatteryLevelListener documentation:

See also the notes about iOS.

EDIT: Here’s a proof of concept for getting the battery level at regular intervals instead of using addBatteryLevelListener(). I’m not sure it’s a good idea to do it this way.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.