TelecomManager.AcceptHandover Method

Definition

Called by an app to indicate that it wishes to accept the handover of an ongoing call to a PhoneAccountHandle it defines.

[Android.Runtime.Register("acceptHandover", "(Landroid/net/Uri;ILandroid/telecom/PhoneAccountHandle;)V", "GetAcceptHandover_Landroid_net_Uri_ILandroid_telecom_PhoneAccountHandle_Handler", ApiSince=28)]
public virtual void AcceptHandover (Android.Net.Uri? srcAddr, Android.Telecom.VideoProfileState videoState, Android.Telecom.PhoneAccountHandle? destAcct);
[<Android.Runtime.Register("acceptHandover", "(Landroid/net/Uri;ILandroid/telecom/PhoneAccountHandle;)V", "GetAcceptHandover_Landroid_net_Uri_ILandroid_telecom_PhoneAccountHandle_Handler", ApiSince=28)>]
abstract member AcceptHandover : Android.Net.Uri * Android.Telecom.VideoProfileState * Android.Telecom.PhoneAccountHandle -> unit
override this.AcceptHandover : Android.Net.Uri * Android.Telecom.VideoProfileState * Android.Telecom.PhoneAccountHandle -> unit

Parameters

srcAddr
Uri

The android.net.Uri of the ongoing call to handover to the caller’s ConnectionService.

videoState
VideoProfileState

Video state after the handover.

destAcct
PhoneAccountHandle

The PhoneAccountHandle registered to the calling package.

Attributes

Remarks

Called by an app to indicate that it wishes to accept the handover of an ongoing call to a PhoneAccountHandle it defines.

A call handover is the process where an ongoing call is transferred from one app (i.e. ConnectionService to another app. The user could, for example, choose to continue a mobile network call in a video calling app. The mobile network call via the Telephony stack is referred to as the source of the handover, and the video calling app is referred to as the destination.

When considering a handover scenario the <em>initiating</em> device is where a user initiated the handover process (e.g. by calling android.telecom.Call#handoverTo( PhoneAccountHandle, int, Bundle), and the other device is considered the <em>receiving</em> device.

For a full discussion of the handover process and the APIs involved, see android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle).

This method is called from the <em>receiving</em> side of a handover to indicate a desire to accept the handover of an ongoing call to another ConnectionService identified by PhoneAccountHandle destAcct. For managed ConnectionServices, the specified PhoneAccountHandle must have been registered with #registerPhoneAccount and the user must have enabled the corresponding PhoneAccount. This can be checked using #getPhoneAccount. Self-managed ConnectionServices must have android.Manifest.permission#MANAGE_OWN_CALLS to handover a call to it.

Once invoked, this method will cause the system to bind to the ConnectionService associated with the PhoneAccountHandle destAcct and call (See ConnectionService#onCreateIncomingHandoverConnection).

For a managed ConnectionService, a SecurityException will be thrown if either the PhoneAccountHandle destAcct does not correspond to a registered PhoneAccount or the associated PhoneAccount is not currently enabled by the user.

For a self-managed ConnectionService, a SecurityException will be thrown if the calling app does not have android.Manifest.permission#MANAGE_OWN_CALLS.

Java documentation for android.telecom.TelecomManager.acceptHandover(android.net.Uri, int, android.telecom.PhoneAccountHandle).

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