On Android 8 and below, i'm using TelephonyManager to terminate incoming call. But on android 9, my code is not working. I found on Google docs, they said that we had an official API for rejecting calls on Android. https://developer.android.com/reference/android/telecom/TelecomManager#endCall() But it's Java code. I don't know how to use that method in my xamarin project. By the way, do we have any way to terminate a phone call programmatically on Android 9? Please help me. I am new to xamarin.
Asked
Active
Viewed 688 times
0
-
`endCall` could be used in Android P (since Beta 2) and above, based on my research, it cannot be used in Android 9 now. – Leon Mar 26 '19 at 02:32
-
:( So do we have any way to terminate a phone call in Android P? – Karr Mar 26 '19 at 02:42
-
Did you request the permission `Manifest.permission.ANSWER_PHONE_CALLS`?If you did that, I found only solution that could replace it, is by extending InCallService class, but by doing so you must also have your app become the default dialer app. – Leon Mar 26 '19 at 03:19