react-native-system-setting icon indicating copy to clipboard operation
react-native-system-setting copied to clipboard

Possible to detect iOS silent mode ? Feature request ?

Open Gys opened this issue 6 years ago • 9 comments

Hi !

I am using this package to know if the user can hear sound. The getVolume() works great. But I noticed that on iOS devices the hardware silence switch enabling/disabling does not make a difference. The volume is reported higher then 0, even if the silence mode is switched on. Is it possible to detect that ? And could you add that to this package ?

Gys avatar Dec 24 '18 18:12 Gys

I found this https://github.com/gnestor/react-native-silent-switch component. Maybe it can implemented in the same way.

Gys avatar Dec 25 '18 10:12 Gys

Hello !

I tested react-native-silent-switch and I'm unable to build it on IOS. Actually, there is no workaround for that except create a custom module to make it works... I think It will be good to have a feature for that, or at least, detecting switch silent changes in "addVolumeListener'.

If someone working on this module, feel free to help us to find a solution, because I think it will give big value to the module !

I'm able to help too if needed :)

Sincerely Flo'

Linoa65 avatar Aug 23 '19 10:08 Linoa65

@c19354837 Hello !

I have a precise use case in my app and I need to be able to vibrate, only if I'm not in silent mode. Is it possible to detect this on Android & IOS ? If not, there is a workaround or a module to handle my case ? Because I'm throwing programmatically the vibration (Vibrate in react-native), the vibration is here even if I'm in silent mode. I need to detect this state, did you have some solution, I'm totally blocked because of that...

Thank you ! Florient

Linoa65 avatar Oct 11 '19 14:10 Linoa65

@Linoa65 I'm curious what you ended up going with? I'm trying to solve a similar problem detecting if the mute button is on or not

bneigher avatar Dec 28 '20 22:12 bneigher

I am curious too how to detect silent button on /off in react native

RupamShaw avatar Feb 28 '22 06:02 RupamShaw

Hey anyone has a solution for this ?

I also tried to pick each getVolume options, but on iOS they're all the same value, no way to detect the silent mode ?

lapwil avatar Aug 08 '22 13:08 lapwil

Hey anyone has a solution for this ? this is very easy to use package , but missing this feature, any help would be highly appreciated. @davidgovea @Gregoirevda @MrLoh @halilb @tomer1490

yasir-syed avatar Aug 31 '22 18:08 yasir-syed

@yasir-syed I changed package, removed react-native-system-setting in favor of react-native-is-muted, easy to use, fairly recent package but it does the job that I needed.

lapwil avatar Sep 01 '22 07:09 lapwil

@lapwil expo does not support i guess

atakanbayil avatar Jul 26 '23 14:07 atakanbayil