When someone calls, my app will turn off the ringing tone in order not to distract the user. So could you please tell me how to turn off the ringing sound in Android?
EDIT:
It seems I will need to use this one :http://developer.android.com/reference/android/media/Ringtone.html
I think I’ve found the solution. In case someone else needs it, I copy my solution here:
There is a manager class called
AudioManagerwhich controls the audios and such. And it has a instance methodsetRingerMode(int mode)which accepts a integer flag.Once you’re done with the silence, you can change the status of the ring tone by passing in this flag
RINGER_MODE_NORMAL