hirbod/react-native-volume-manager

Android: isRingerListenerEnabled() is returning silent mode status, not the ringer listener status

harriha opened this issue · 0 comments

Hi,

And thanks for the library, highly useful!

From the docs:

isRingerListenerEnabled(): Promise<boolean>: Asynchronously checks whether a ringer mode listener is enabled.

I might be misinterpreting things here, but I think there's some confusion here. This method seems to return whether the device is set to silent or not, but the docs and name suggest that this would tell whether a ringer listener is enabled or not. Also, to me, the "silent status" and "silent listener status" are a bit mixed up in the codebase. Does this observation make sense or is it just me getting confused for no good reason?

I've been having some struggle with the event listener handling, as e.g. the volume listener and ringer mode listener are working differently, but I guess there's a valid reason for the ringer mode listener to be setup differently than the others. Anyway, considering the current way of how the ringer mode listening is happening, having a way to check whether ringer mode listener is enabled would be useful.