Is there any way to add a Listener for changes in battery level in react native (non-expo) application?

93 views Asked by At

I am searching for a way where I can constantly listen to the changes in the battery level of the device in a non-expo react native application.

I have tried packages like 'react-native-device-info' and 'react-native-device-battery'. They provide the functionality to get the battery level of the device. But couldn't find a way to add a listener that constantly listens to the battery level.

I have explored some ways to add listeners to the react native application. But none of them seemed like standardized ways.

0

There are 0 answers