Connection Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a phone call or connection to a remote endpoint that carries voice and/or video traffic.
[Android.Runtime.Register("android/telecom/Connection", ApiSince=23, DoNotGenerateAcw=true)]
public abstract class Connection : Android.Telecom.Conferenceable
[<Android.Runtime.Register("android/telecom/Connection", ApiSince=23, DoNotGenerateAcw=true)>]
type Connection = class
inherit Conferenceable
- Inheritance
- Attributes
Remarks
Represents a phone call or connection to a remote endpoint that carries voice and/or video traffic.
Implementations create a custom subclass of Connection
and return it to the framework as the return value of ConnectionService#onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest)
or ConnectionService#onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest)
. Implementations are then responsible for updating the state of the Connection
, and must call #destroy()
to signal to the framework that the Connection
is no longer used and associated resources may be recovered.
Subclasses of Connection
override the on*
methods to provide the ConnectionService
's implementation of calling functionality. The on*
methods are called by Telecom to inform an instance of a Connection
of actions specific to that Connection
instance.
Basic call support requires overriding the following methods: #onAnswer()
, #onDisconnect()
, #onReject()
, #onAbort()
Where a Connection
has #CAPABILITY_SUPPORT_HOLD
, the #onHold()
and #onUnhold()
methods should be overridden to provide hold support for the Connection
.
Where a Connection
supports a variation of video calling (e.g. the CAPABILITY_SUPPORTS_VT_*
capability bits), #onAnswer(int)
should be overridden to support answering a call as a video call.
Where a Connection
has #PROPERTY_IS_EXTERNAL_CALL
and #CAPABILITY_CAN_PULL_CALL
, #onPullExternalCall()
should be overridden to provide support for pulling the external call.
Where a Connection
supports conference calling #onSeparate()
should be overridden.
There are a number of other on*
methods which a Connection
can choose to implement, depending on whether it is concerned with the associated calls from Telecom. If, for example, call events from a InCallService
are handled, #onCallEvent(String, Bundle)
should be overridden. Another example is #onExtrasChanged(Bundle)
, which should be overridden if the Connection
wishes to make use of extra information provided via the Call#putExtras(Bundle)
and Call#removeExtras(String...)
methods.
Java documentation for android.telecom.Connection
.
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.
Constructors
Connection() |
Create a new Connection. |
Connection(IntPtr, JniHandleOwnership) |
Fields
AudioCodecAmr |
Obsolete.
Adaptive Multi-rate audio codec. |
AudioCodecAmrWb |
Obsolete.
Adaptive Multi-rate wideband audio codec. |
AudioCodecEvrc |
Obsolete.
Enhanced Variable Rate Codec. |
AudioCodecEvrcB |
Obsolete.
Enhanced Variable Rate Codec B. |
AudioCodecEvrcNw |
Obsolete.
Enhanced Variable Rate Narrowband-Wideband Codec. |
AudioCodecEvrcWb |
Obsolete.
Enhanced Variable Rate Wideband Codec. |
AudioCodecEvsFb |
Obsolete.
Enhanced Voice Services Fullband audio codec. |
AudioCodecEvsNb |
Obsolete.
Enhanced Voice Services Narrowband audio codec. |
AudioCodecEvsSwb |
Obsolete.
Enhanced Voice Services Super-Wideband audio codec. |
AudioCodecEvsWb |
Obsolete.
Enhanced Voice Services Wideband audio codec. |
AudioCodecG711a |
Obsolete.
ITU-T G711A audio codec. |
AudioCodecG711ab |
Obsolete.
ITU-T G711AB audio codec. |
AudioCodecG711u |
Obsolete.
ITU-T G711U audio codec. |
AudioCodecG722 |
Obsolete.
ITU-T G722 audio codec. |
AudioCodecG723 |
Obsolete.
ITU-T G723 audio codec. |
AudioCodecG729 |
Obsolete.
ITU-T G729 audio codec. |
AudioCodecGsmEfr |
Obsolete.
GSM Enhanced Full-Rate audio codec, also known as GSM-EFR, GSM 06. |
AudioCodecGsmFr |
Obsolete.
GSM Full-Rate audio codec, also known as GSM-FR, GSM 06. |
AudioCodecGsmHr |
Obsolete.
GSM Half Rate audio codec. |
AudioCodecNone |
Obsolete.
Indicates that the audio codec is currently not specified or is unknown. |
AudioCodecQcelp13k |
Obsolete.
Qualcomm code-excited linear prediction 13 kilobit audio codec. |
CapabilityAddParticipant |
Obsolete.
When set, indicates that this |
CapabilityRemotePartySupportsRtt |
Obsolete.
Indicates whether the remote party supports RTT or not to the UI. |
EventCallHoldFailed |
Connection event used to inform Telecom when a hold operation on a call has failed. |
EventCallMergeFailed |
Connection event used to inform |
EventCallPullFailed |
Connection event used to inform |
EventCallRemotelyHeld |
Connection event used to inform |
EventCallRemotelyUnheld |
Connection event used to inform |
EventCallSwitchFailed |
Connection event used to inform Telecom when a switch operation on a call has failed. |
EventMergeComplete |
Connection event used to inform |
EventMergeStart |
Connection event used to inform |
EventOnHoldToneEnd |
Connection event used to inform Telecom that it should stop the on hold tone. |
EventOnHoldToneStart |
Connection event used to inform Telecom that it should play the on hold tone. |
EventRttAudioIndicationChanged |
Connection event used to inform an |
ExtraAnsweringDropsFgCall |
Boolean connection extra key set on a |
ExtraAnsweringDropsFgCallAppName |
String connection extra key set on a |
ExtraAudioCodec |
The audio codec in use for the current |
ExtraAudioCodecBandwidthKhz |
Float connection extra key used to store the audio codec bandwidth in khz for the current
|
ExtraAudioCodecBitrateKbps |
Float connection extra key used to store the audio codec bitrate in kbps for the current
|
ExtraCallSubject |
Connection extra key used to store the subject for an incoming call. |
ExtraChildAddress |
Connection extra key used to store a child number associated with the current connection. |
ExtraIsRttAudioPresent |
Boolean connection extra key set on the extras passed to
|
ExtraLastForwardedNumber |
Connection extra key used to store the last forwarded number associated with the current connection. |
ExtraLastKnownCellIdentity |
Last known cell identity key |
ExtraSipInvite |
String Connection extra key used to store SIP invite fields for an incoming call for IMS call |
PropertyAssistedDialing |
Obsolete.
Set by the framework to indicate that a connection is using assisted dialing. |
PropertyCrossSim |
Obsolete.
Connection is using cross sim technology. |
PropertyHasCdmaVoicePrivacy |
Obsolete.
Indicates that the connection has CDMA Enhanced Voice Privacy enabled. |
PropertyHighDefAudio |
Obsolete.
Connection is using high definition audio. |
PropertyIsAdhocConference |
Obsolete.
Set by the framework to indicate that a call is an adhoc conference call. |
PropertyIsExternalCall |
Obsolete.
When set, indicates that the |
PropertyIsRtt |
Obsolete.
Set by the framework to indicate that a connection has an active RTT session associated with it. |
PropertyNetworkIdentifiedEmergencyCall |
Obsolete.
Set by the framework to indicate that the network has identified a Connection as an emergency call. |
PropertySelfManaged |
Obsolete.
Set by the framework to indicate that the |
PropertyWifi |
Obsolete.
Connection is using WIFI. |
VerificationStatusFailed |
Obsolete.
Indicates that verification by the network failed. |
VerificationStatusNotVerified |
Obsolete.
Indicates that the network could not perform verification. |
VerificationStatusPassed |
Obsolete.
Indicates that verification by the network passed. |
Properties
Address | |
AddressPresentation | |
AudioModeIsVoip |
Requests that the framework use VOIP audio mode for this connection. |
CallAudioState |
This member is deprecated. |
CallerDisplayName | |
CallerDisplayNamePresentation | |
CallerNumberVerificationStatus |
Gets the verification status for the phone number of an incoming call as identified in ATIS-1000082. -or- Sets the verification status for the phone number of an incoming call as identified in ATIS-1000082. |
Class |
Returns the runtime class of this |
Conference | |
Conferenceables |
Returns the connections or conferences with which this connection can be conferenced. -or- Similar to |
ConnectionCapabilities |
Returns the connection's capabilities, as a bit mask of the |
ConnectionProperties |
Returns the connection's properties, as a bit mask of the |
CurrentCallEndpoint |
Obtains the current CallEndpoint. |
DisconnectCause | |
Extras |
Returns the extras associated with this connection. -or- Set some extras that can be associated with this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
RingbackRequested |
Returns whether this connection is requesting that the system play a ringback tone on its behalf. -or- Requests that the framework play a ringback tone. |
State | |
StatusHints |
Sets the label and icon status to display in the in-call UI. |
ThresholdClass | |
ThresholdType | |
VideoState |
Returns the video state of the connection. |
Methods
CapabilitiesToString(ConnectionCapability) |
Renders a set of capability bits ( |
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
CreateCanceledConnection() |
Return a |
CreateFailedConnection(DisconnectCause) |
Return a |
Destroy() |
Tears down the Connection object. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetVideoProvider() | |
HandleRttUpgradeResponse(Connection+RttTextStream) |
Notifies this connection of a response to a previous remotely-initiated RTT upgrade
request sent via |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
NotifyConferenceMergeFailed() |
Called by a |
OnAbort() |
Notifies this Connection of a request to abort. |
OnAddConferenceParticipants(IList<Uri>) |
Supports initiation of a conference call by directly adding participants to an ongoing call. |
OnAnswer() |
Notifies this Connection, which is in |
OnAnswer(VideoProfileState) |
Notifies this Connection, which is in |
OnAvailableCallEndpointsChanged(IList<CallEndpoint>) |
Notifies this Connection that the available call endpoints have been changed. |
OnCallAudioStateChanged(CallAudioState) |
Notifies this Connection that the |
OnCallEndpointChanged(CallEndpoint) |
Notifies this Connection that the audio endpoint has been changed. |
OnCallEvent(String, Bundle) |
Notifies this Connection of a |
OnDeflect(Uri) |
Notifies this Connection, which is in |
OnDisconnect() |
Notifies this Connection of a request to disconnect. |
OnExtrasChanged(Bundle) |
Notifies this |
OnHandoverComplete() |
Notifies this |
OnHold() |
Notifies this Connection of a request to hold. |
OnMuteStateChanged(Boolean) |
Notifies this Connection that its audio mute state has been changed. |
OnPlayDtmfTone(Char) |
Notifies this Connection of a request to play a DTMF tone. |
OnPostDialContinue(Boolean) |
Notifies this Connection whether the user wishes to proceed with the post-dial DTMF codes. |
OnPullExternalCall() |
Notifies this Connection of a request to pull an external call to the local device. |
OnReject() |
Notifies this Connection, which is in |
OnReject(Int32) |
Notifies this Connection, which is in |
OnReject(String) |
Notifies this Connection, which is in |
OnSeparate() |
Notifies this Connection of a request to separate from its parent conference. |
OnShowIncomingCallUi() |
Notifies this |
OnSilence() |
Notifies this Connection of a request to silence the ringer. |
OnStartRtt(Connection+RttTextStream) |
Notifies this |
OnStateChanged(CallState) |
Notifies this Connection of an internal state change. |
OnStopDtmfTone() |
Notifies this Connection of a request to stop any currently playing DTMF tones. |
OnStopRtt() |
Notifies this |
OnTrackedByNonUiService(Boolean) |
Inform this Conenection when it will or will not be tracked by an non-UI
|
OnUnhold() |
Notifies this Connection of a request to exit a hold state. |
OnUsingAlternativeUi(Boolean) |
Inform this Connection when it will or will not be tracked by an |
PropertiesToString(Int32) |
Renders a set of property bits ( |
PutExtras(Bundle) |
Adds some extras to this |
QueryLocationForEmergency(Int64, String, IExecutor, IOutcomeReceiver) |
Query the device's location in order to place an Emergency Call. |
RemoveExtras(IList<String>) |
Removes extras from this |
RemoveExtras(String[]) |
Removes extras from this |
RequestBluetoothAudio(BluetoothDevice) |
Request audio routing to a specific bluetooth device. |
RequestCallEndpointChange(CallEndpoint, IExecutor, IOutcomeReceiver) |
Request audio routing to a specific CallEndpoint. |
SendConnectionEvent(String, Bundle) |
Sends an event associated with this |
SendRemoteRttRequest() |
Informs listeners that the remote side of the call has requested an upgrade to include an RTT session in the call. |
SendRttInitiationFailure(RttSessionModifyResult) |
Informs listeners that a previously requested RTT session via
|
SendRttInitiationSuccess() |
Informs listeners that a previously requested RTT session via
|
SendRttSessionRemotelyTerminated() |
Informs listeners that a currently active RTT session has been terminated by the remote side of the coll. |
SetActive() |
Sets state to active (e. |
SetAddress(Uri, Presentation) |
Sets the value of the |
SetAudioRoute(CallAudioRoute) |
Sets the audio route (speaker, bluetooth, etc. |
SetCallerDisplayName(String, Presentation) |
Sets the caller display name (CNAP). |
SetConferenceableConnections(IList<Connection>) |
Sets the connections with which this connection can be conferenced. |
SetDialing() |
Sets state to dialing (e. |
SetDisconnected(DisconnectCause) |
Sets state to disconnected. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetInitialized() |
Sets state to initialized (the Connection has been set up and is now ready to be used). |
SetInitializing() |
Sets state to initializing (this Connection is not yet ready to be used). |
SetNextPostDialChar(Char) |
Informs listeners that this |
SetOnHold() |
Sets state to be on hold. |
SetPostDialWait(String) |
Informs listeners that this |
SetPulling() |
Sets state to pulling (e. |
SetRinging() |
Sets state to ringing (e. |
SetVideoProvider(Connection+VideoProvider) |
Sets the video connection provider. |
SetVideoState(VideoProfileState) |
Set the video state for the connection. |
StateToString(ConnectionState) | |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |