다음을 통해 공유


ConnectionService.OnCreateOutgoingConnection Method

Definition

Create a Connection given an outgoing request.

[Android.Runtime.Register("onCreateOutgoingConnection", "(Landroid/telecom/PhoneAccountHandle;Landroid/telecom/ConnectionRequest;)Landroid/telecom/Connection;", "GetOnCreateOutgoingConnection_Landroid_telecom_PhoneAccountHandle_Landroid_telecom_ConnectionRequest_Handler", ApiSince=23)]
public virtual Android.Telecom.Connection? OnCreateOutgoingConnection (Android.Telecom.PhoneAccountHandle? connectionManagerPhoneAccount, Android.Telecom.ConnectionRequest? request);
[<Android.Runtime.Register("onCreateOutgoingConnection", "(Landroid/telecom/PhoneAccountHandle;Landroid/telecom/ConnectionRequest;)Landroid/telecom/Connection;", "GetOnCreateOutgoingConnection_Landroid_telecom_PhoneAccountHandle_Landroid_telecom_ConnectionRequest_Handler", ApiSince=23)>]
abstract member OnCreateOutgoingConnection : Android.Telecom.PhoneAccountHandle * Android.Telecom.ConnectionRequest -> Android.Telecom.Connection
override this.OnCreateOutgoingConnection : Android.Telecom.PhoneAccountHandle * Android.Telecom.ConnectionRequest -> Android.Telecom.Connection

Parameters

connectionManagerPhoneAccount
PhoneAccountHandle

The connection manager account to use for managing this call. <p> If this parameter is not null, it means that this ConnectionService has registered one or more PhoneAccounts having PhoneAccount#CAPABILITY_CONNECTION_MANAGER. This parameter will contain one of these PhoneAccounts, while the request will contain another (usually but not always distinct) PhoneAccount to be used for actually making the connection. <p> If this parameter is null, it means that this ConnectionService is being asked to make a direct connection. The ConnectionRequest#getAccountHandle() of parameter request will be a PhoneAccount registered by this ConnectionService to use for making the connection.

request
ConnectionRequest

Details about the outgoing call.

Returns

The Connection object to satisfy this call, or the result of an invocation of Connection#createFailedConnection(DisconnectCause) to not handle the call.

Attributes

Remarks

Create a Connection given an outgoing request. This is used to initiate new outgoing calls.

Java documentation for android.telecom.ConnectionService.onCreateOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest).

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