SB1-How to programmatically know if PTT is being used.

I have an app that plays a WAV, but I do not want to play it if it's being received or using a PTT message.

 

Can I do this via code/program???

 

Thank you.