how can replaykit recognizes that another app on my phone is turning on recording

I have the conflict when i use replaykit. There is other app or system use the recording. I want my app can recognize them and let them use the replaykit preferentially.

how can replaykit recognizes that another app on my phone is turning on recording
 
 
Q