I want to silence the ring when there is an incoming call, and I setup a button to do a test like this:
silenceButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ITelephony iTelephony = getITelephony();
try {
iTelephony.silenceRinger();
} catch (RemoteException e) {
e.printStackTrace();
}
}
});
but the ring is not silenced when I click the button and the logcat outputs an error:
PhoneInterfaceManager: silenseRinger not supported
I think my getITelephony()
is working correctly because I can decline the incoming call based on it:
declineButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ITelephony iTelephony = getITelephony();
try {
iTelephony.endCall();
} catch (RemoteException e) {
e.printStackTrace();
}
}
});
So why android stops supporting for silence the incoming call? Is there another way to do this?