Volume listener doesn't work
therealtgd opened this issue · 2 comments
therealtgd commented
I've installed the library, ran pod install
and added the volume listener, but nothing gets logged out to the console when the system volume changes.
Im running the app on iOS 16.1 in XCode Simulator.
Below is the code for the volume listener.
useEffect(() => {
const volumeListener = VolumeManager.addVolumeListener((result) => {
console.log(result.volume);
setVolume(result.volume);
});
return () => volumeListener.remove();
}, []);
hirbod commented
This Library doesn't work inside an iOS Simulator. You need to test on a real device.
https://github.com/hirbod/react-native-volume-manager#simulators--emulators
therealtgd commented
This Library doesn't work inside an iOS Simulator. You need to test on a real device. https://github.com/hirbod/react-native-volume-manager#simulators--emulators
Oh, my bad. Thank you for the info.