4

I am trying to reproduce instagram behaviour here, meaning :

  • If phone is silent and user changes volume, quit silent mode. (I manage to do that by switching the audioSession category from ambient to playback)

  • If the user switch silent mode off and on again, reverse to default behaviour aka muting the sound.

So my current issue here is to getting notified when there is a change from the silent mode switch.

I have seen several hacks to detect if the device is into silent mode or not but none whatsoever to get notified of said change. To be fair there is this question :

Detect ring/silent switch position change But it doesn't seem like someone actually answered it? Or the only way possible is to spam the system at all time to know if there is a change?

Community
  • 1
  • 1
thibaut noah
  • 1,474
  • 2
  • 11
  • 39

0 Answers0