Is there a way to know if the telephone is playing anything? for example a ringtone.
My phone doesn't work properly and I sometimes get a call without a ringtone. I mean, I can see the incoming call screen but nothing is heard (of course it is not in silence). It happens sometimes.
So I programmed something to detect incoming calls (a receiver) and play the default ringtone. It works pretty well when my phone fails, because I force it by playing it again.
The problem comes when my phone works! because in that case you can hear both at the same time (phone's and mine) and sounds terrible!
So I need to do one thing of these two:
-Either detect that the phone worked well (it is ringing) so I don't have to play anything. -Or stop any current ringing (if any) and play it myself always.
Any help?
P.S.: I tried isMusicActive() and it doesn't work for the ringing.