Rejecting Whatsapp calls Android

65 Views Asked by At

When using TelecomManager.endCall() I can successfuly end VOIP calls when for example ending a Wi-Fi call.

But this does not work for Whatsapp calls. I get 'true' from endCall() and phone state changes to IDLE, but the call does not end. I tried to cal it in the main thread and also on a background thread but with no success.

Any ideas?

These are my project configs:

const val compileSdk = 33
const val compileSdkVersion = "33"
const val buildToolVersion = "33.0.2"
const val minSdk = 30
const val targetSdk = 33

I do not want to use NotificationListenerService.

Using TelecomManager.endCall() used to work for me under this configs:

compileSdkVersion 29
minSdkVersion 26
targetSdkVersion 29
0

There are 0 best solutions below