Hello, I'm working on an iOS app whose purpose is to execute an HTTP POST request when the user starts/finishes a call (mobile call or a VOIP call via Skype, Teams and similar).
The main scenario is: there is a REST server that is in charge of managing the volume of a radio. Radio volume should be lowered when someone in the room is busy in a call and then restored when no one is at the phone.
My idea is to react when the microphone is activated/deactivated and execute the HTTP request to the server.
Is there anything I can use to notice when these two events occurs (even if the app is in background/closed) ? Some sort of notifications or native event from the O.S. I could register to?
I found this question: https://developer.apple.com/forums/thread/76731, but no answer has been reported (it's a 4 years old topic). I don't need to know which app is using the microphone, I only need to know that the microphone is in use and execute a very small code.
Thanks in advance