I want to disable a playing alarm when a call comes .
Only the call ringtone should be heard and not the alarm tone.
How to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From an activity, service or a anywhere you have a context object:
Just remember to take off the mute. Or, if your process is unneeded after the call ended, and the system destroys it – the mute goes off.
But, if you keep your process alive, its important that you keep a reference to your AlarmManager. A bug I found is, if you call
setStreamMute(..., true)and then lose your reference, no matter how many times you callsetStreamMute(..., false)it never unmutes.So just hold a static reference to the AudioManager.