CallControl.Disconnect(DisconnectCause, IExecutor, IOutcomeReceiver) Method

Definition

Request Telecom disconnect the call and remove the call from telecom tracking.

[Android.Runtime.Register("disconnect", "(Landroid/telecom/DisconnectCause;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void Disconnect (Android.Telecom.DisconnectCause disconnectCause, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("disconnect", "(Landroid/telecom/DisconnectCause;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.Disconnect : Android.Telecom.DisconnectCause * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

disconnectCause
DisconnectCause

represents the cause for disconnecting the call. The only valid codes for the android.telecom.DisconnectCause passed in are: <ul> <li>DisconnectCause#LOCAL</li> <li>DisconnectCause#REMOTE</li> <li>DisconnectCause#REJECTED</li> <li>DisconnectCause#MISSED</li> </ul>

executor
IExecutor

The Executor on which the OutcomeReceiver callback will be called on.

callback
IOutcomeReceiver

That will be completed on the Telecom side that details success or failure of the requested operation.

                               <code data-dev-comment-type="c">OutcomeReceiver#onResult</code> will be called if Telecom has
                               successfully disconnected the call.

                               <code data-dev-comment-type="c">OutcomeReceiver#onError</code> will be called if Telecom has failed
                               to disconnect the call.  A <code data-dev-comment-type="c">CallException</code> will be passed
                               that details why the operation failed.

        &lt;p&gt;
        Note: After the call has been successfully disconnected, calling any CallControl API will
        result in the <code data-dev-comment-type="c">OutcomeReceiver#onError</code> with
        <code data-dev-comment-type="c">CallException#CODE_CALL_IS_NOT_BEING_TRACKED</code>.
Attributes

Remarks

Request Telecom disconnect the call and remove the call from telecom tracking.

Java documentation for android.telecom.CallControl.disconnect(android.telecom.DisconnectCause, java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Void, android.telecom.CallException>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to