RemoteConnection
class RemoteConnection
kotlin.Any | |
↳ | android.telecom.RemoteConnection |
A connection provided to a ConnectionService
by another ConnectionService
running in a different process.
Summary
Nested classes | |
---|---|
abstract |
Callback base class for |
|
Public methods | |
---|---|
Unit |
abort() Instructs this |
Unit |
addConferenceParticipants(participants: MutableList<Uri!>) Instructs this |
Unit |
answer() Instructs this |
Unit |
Instructs this |
Uri! |
Obtains the address of this |
Int |
Obtains the presentation requirements for the address of this |
CharSequence! |
Obtains the display name for this |
Int |
Obtains the presentation requirements for this |
RemoteConference! |
Obtain the |
MutableList<RemoteConnection!>! |
Obtain the |
Int |
Obtains the capabilities of this |
Int |
Obtains the properties of this |
DisconnectCause! |
Obtains the reason why this |
Bundle! |
Obtain the extras associated with this |
Int |
getState() Obtains the state of this |
StatusHints! |
Obtains status hints pertaining to this |
RemoteConnection.VideoProvider! |
Obtains the video provider of this |
Int |
Obtains the video state of this |
Unit |
hold() Instructs this |
Boolean |
Determines whether this |
Boolean |
Determines if the audio mode of this |
Unit |
playDtmfTone(digit: Char) Instructs this |
Unit |
postDialContinue(proceed: Boolean) Instructs this |
Unit |
Instructs this |
Unit |
registerCallback(callback: RemoteConnection.Callback!) Adds a callback to this |
Unit |
registerCallback(callback: RemoteConnection.Callback!, handler: Handler!) Adds a callback to this |
Unit |
reject() Instructs this |
Unit |
setCallAudioState(state: CallAudioState!) Set the audio state of this |
Unit |
Instructs this |
Unit |
unhold() Instructs this |
Unit |
unregisterCallback(callback: RemoteConnection.Callback!) Removes a callback from this |
Public methods
addConferenceParticipants
fun addConferenceParticipants(participants: MutableList<Uri!>): Unit
Instructs this RemoteConnection
to initiate a conference with a list of participants.
Parameters | |
---|---|
participants |
MutableList<Uri!>: with which conference call will be formed. This value cannot be null . |
answer
fun answer(): Unit
Instructs this Connection#STATE_RINGING
RemoteConnection
to answer.
disconnect
fun disconnect(): Unit
Instructs this RemoteConnection
to disconnect.
getAddress
fun getAddress(): Uri!
Obtains the address of this RemoteConnection
.
Return | |
---|---|
Uri! |
The address (e.g., phone number) to which the RemoteConnection is currently connected. |
getAddressPresentation
fun getAddressPresentation(): Int
Obtains the presentation requirements for the address of this RemoteConnection
.
Return | |
---|---|
Int |
The presentation requirements for the address. See TelecomManager for valid values. |
getCallerDisplayName
fun getCallerDisplayName(): CharSequence!
Obtains the display name for this RemoteConnection
's caller.
Return | |
---|---|
CharSequence! |
The display name for the caller. |
getCallerDisplayNamePresentation
fun getCallerDisplayNamePresentation(): Int
Obtains the presentation requirements for this RemoteConnection
's caller's display name.
Return | |
---|---|
Int |
The presentation requirements for the caller display name. See TelecomManager for valid values. |
getConference
fun getConference(): RemoteConference!
Obtain the RemoteConference
that this RemoteConnection
may be a part of, or null
if there is no such RemoteConference
.
Return | |
---|---|
RemoteConference! |
A RemoteConference or null ; |
getConferenceableConnections
fun getConferenceableConnections(): MutableList<RemoteConnection!>!
Obtain the RemoteConnection
s with which this RemoteConnection
may be successfully asked to create a conference with.
Return | |
---|---|
MutableList<RemoteConnection!>! |
The RemoteConnection s with which this RemoteConnection may be merged into a RemoteConference . |
getConnectionCapabilities
fun getConnectionCapabilities(): Int
Obtains the capabilities of this RemoteConnection
.
Return | |
---|---|
Int |
A bitmask of the capabilities of the RemoteConnection , as defined in the CAPABILITY_* constants in class Connection . |
getConnectionProperties
fun getConnectionProperties(): Int
Obtains the properties of this RemoteConnection
.
Return | |
---|---|
Int |
A bitmask of the properties of the RemoteConnection , as defined in the PROPERTY_* constants in class Connection . |
getDisconnectCause
fun getDisconnectCause(): DisconnectCause!
Obtains the reason why this RemoteConnection
may have been disconnected.
Return | |
---|---|
DisconnectCause! |
For a Connection#STATE_DISCONNECTED RemoteConnection , the disconnect cause expressed as a code chosen from among those declared in DisconnectCause . |
getExtras
fun getExtras(): Bundle!
Obtain the extras associated with this RemoteConnection
.
Return | |
---|---|
Bundle! |
The extras for this connection. |
getState
fun getState(): Int
Obtains the state of this RemoteConnection
.
Return | |
---|---|
Int |
A state value, chosen from the STATE_* constants. |
getStatusHints
fun getStatusHints(): StatusHints!
Obtains status hints pertaining to this RemoteConnection
.
Return | |
---|---|
StatusHints! |
The current StatusHints of this RemoteConnection , or null if none have been set. |
getVideoProvider
fun getVideoProvider(): RemoteConnection.VideoProvider!
Obtains the video provider of this RemoteConnection
.
Return | |
---|---|
RemoteConnection.VideoProvider! |
The video provider associated with this RemoteConnection . |
getVideoState
fun getVideoState(): Int
Obtains the video state of this RemoteConnection
.
Return | |
---|---|
Int |
The video state of the RemoteConnection . See VideoProfile . |
isRingbackRequested
fun isRingbackRequested(): Boolean
Determines whether this RemoteConnection
is requesting ringback.
Return | |
---|---|
Boolean |
Whether the RemoteConnection is requesting that the framework play a ringback tone on its behalf. |
isVoipAudioMode
fun isVoipAudioMode(): Boolean
Determines if the audio mode of this RemoteConnection
is VOIP.
Return | |
---|---|
Boolean |
true if the RemoteConnection 's current audio mode is VOIP. |
playDtmfTone
fun playDtmfTone(digit: Char): Unit
Instructs this RemoteConnection
to play a dual-tone multi-frequency signaling (DTMF) tone. Any other currently playing DTMF tone in the specified call is immediately stopped.
Parameters | |
---|---|
digit |
Char: A character representing the DTMF digit for which to play the tone. This value must be one of '0' through '9' , '*' or '#' . |
postDialContinue
fun postDialContinue(proceed: Boolean): Unit
Instructs this RemoteConnection
to continue playing a post-dial DTMF string. A post-dial DTMF string is a string of digits following the first instance of either TelecomManager#DTMF_CHARACTER_WAIT
or TelecomManager#DTMF_CHARACTER_PAUSE
. These digits are immediately sent as DTMF tones to the recipient as soon as the connection is made. If the DTMF string contains a TelecomManager#DTMF_CHARACTER_PAUSE
symbol, this RemoteConnection
will temporarily pause playing the tones for a pre-defined period of time. If the DTMF string contains a TelecomManager#DTMF_CHARACTER_WAIT
symbol, this RemoteConnection
will pause playing the tones and notify callbacks via Callback#onPostDialWait(RemoteConnection, String)
. At this point, the in-call app should display to the user an indication of this state and an affordance to continue the postdial sequence. When the user decides to continue the postdial sequence, the in-call app should invoke the postDialContinue(boolean)
method.
Parameters | |
---|---|
proceed |
Boolean: Whether or not to continue with the post-dial sequence. |
pullExternalCall
fun pullExternalCall(): Unit
Instructs this RemoteConnection
to pull itself to the local device.
See Call#pullExternalCall()
for more information.
registerCallback
fun registerCallback(callback: RemoteConnection.Callback!): Unit
Adds a callback to this RemoteConnection
.
Parameters | |
---|---|
callback |
RemoteConnection.Callback!: A Callback . |
registerCallback
fun registerCallback(
callback: RemoteConnection.Callback!,
handler: Handler!
): Unit
Adds a callback to this RemoteConnection
.
Parameters | |
---|---|
callback |
RemoteConnection.Callback!: A Callback . |
handler |
Handler!: A Handler which command and status changes will be delivered to. |
reject
fun reject(): Unit
Instructs this Connection#STATE_RINGING
RemoteConnection
to reject.
setCallAudioState
fun setCallAudioState(state: CallAudioState!): Unit
Set the audio state of this RemoteConnection
.
Parameters | |
---|---|
state |
CallAudioState!: The audio state of this RemoteConnection . |
stopDtmfTone
fun stopDtmfTone(): Unit
Instructs this RemoteConnection
to stop any dual-tone multi-frequency signaling (DTMF) tone currently playing. DTMF tones are played by calling playDtmfTone(char)
. If no DTMF tone is currently playing, this method will do nothing.
unhold
fun unhold(): Unit
Instructs this Connection#STATE_HOLDING
call to release from hold.
unregisterCallback
fun unregisterCallback(callback: RemoteConnection.Callback!): Unit
Removes a callback from this RemoteConnection
.
Parameters | |
---|---|
callback |
RemoteConnection.Callback!: A Callback . |