RemoteConnection

class RemoteConnection
kotlin.Any
   ↳ android.telecom.RemoteConnection

A connection provided to a ConnectionService by another ConnectionService running in a different process.
Requires API level 23 (Android 6.0, Marshmallow)

Summary

Nested classes
abstract

Callback base class for RemoteConnection.

RemoteConnection.VideoProvider associated with a RemoteConnection.

Public methods
Int

Obtains the presentation requirements for this RemoteConnection's caller's display name.

Unit

Instructs this RemoteConnection to stop any dual-tone multi-frequency signaling (DTMF) tone currently playing.

Bundle!

Obtain the extras associated with this RemoteConnection.

Int

Obtains the presentation requirements for the address of this RemoteConnection.

Unit

Adds a callback to this RemoteConnection.

Unit

Adds a callback to this RemoteConnection.

Int

Obtains the video state of this RemoteConnection.

Unit

Instructs this RemoteConnection to go on hold.

Unit

Instructs this RemoteConnection to abort.

Unit

Instructs this RemoteConnection to play a dual-tone multi-frequency signaling (DTMF) tone.

Unit

Set the audio state of this RemoteConnection.

StatusHints!

Obtains status hints pertaining to this RemoteConnection.

Boolean

Determines if the audio mode of this RemoteConnection is VOIP.

Int

Obtains the properties of this RemoteConnection.

Int

Obtains the state of this RemoteConnection.

Unit

Instructs this Connection#STATE_RINGING RemoteConnection to reject.

CharSequence!

Obtains the display name for this RemoteConnection's caller.

Unit

Instructs this RemoteConnection to disconnect.

DisconnectCause!

Obtains the reason why this RemoteConnection may have been disconnected.

Int

Obtains the capabilities of this RemoteConnection.

RemoteConference!

Obtain the RemoteConference that this RemoteConnection may be a part of, or null if there is no such RemoteConference.

Unit

Instructs this Connection#STATE_HOLDING call to release from hold.

Uri!

Obtains the address of this RemoteConnection.

Boolean

Determines whether this RemoteConnection is requesting ringback.

RemoteConnection.VideoProvider!

Obtains the video provider of this RemoteConnection.

Unit

Instructs this RemoteConnection to pull itself to the local device.

Unit

Removes a callback from this RemoteConnection.

Unit

Instructs this RemoteConnection to continue playing a post-dial DTMF string.

MutableList<RemoteConnection!>!

Obtain the RemoteConnections with which this RemoteConnection may be successfully asked to create a conference with.

Unit

Instructs this Connection#STATE_RINGING RemoteConnection to answer.

Public methods

getCallerDisplayNamePresentation

added in API level 23
fun getCallerDisplayNamePresentation(): Int

Obtains the presentation requirements for this RemoteConnection's caller's display name.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Int: The presentation requirements for the caller display name. See TelecomManager for valid values.

stopDtmfTone

added in API level 23
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.
Requires API level 23 (Android 6.0, Marshmallow)

getExtras

added in API level 23
fun getExtras(): Bundle!

Obtain the extras associated with this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Bundle!: The extras for this connection.

getAddressPresentation

added in API level 23
fun getAddressPresentation(): Int

Obtains the presentation requirements for the address of this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Int: The presentation requirements for the address. See TelecomManager for valid values.

registerCallback

added in API level 23
fun registerCallback(callback: RemoteConnection.Callback!): Unit

Adds a callback to this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Parameters
callback RemoteConnection.Callback!: A Callback.

registerCallback

added in API level 23
fun registerCallback(callback: RemoteConnection.Callback!, handler: Handler!): Unit

Adds a callback to this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Parameters
callback RemoteConnection.Callback!: A Callback.
handler RemoteConnection.Callback!: A Handler which command and status changes will be delivered to.

getVideoState

added in API level 23
fun getVideoState(): Int

Obtains the video state of this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Int: The video state of the RemoteConnection. See VideoProfile.

hold

added in API level 23
fun hold(): Unit

Instructs this RemoteConnection to go on hold.
Requires API level 23 (Android 6.0, Marshmallow)

abort

added in API level 23
fun abort(): Unit

Instructs this RemoteConnection to abort.
Requires API level 23 (Android 6.0, Marshmallow)

playDtmfTone

added in API level 23
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.
Requires API level 23 (Android 6.0, Marshmallow)

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 '#'.

setCallAudioState

added in API level 23
fun setCallAudioState(state: CallAudioState!): Unit

Set the audio state of this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Parameters
state CallAudioState!: The audio state of this RemoteConnection.

getStatusHints

added in API level 23
fun getStatusHints(): StatusHints!

Obtains status hints pertaining to this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
StatusHints!: The current StatusHints of this RemoteConnection, or null if none have been set.

isVoipAudioMode

added in API level 23
fun isVoipAudioMode(): Boolean

Determines if the audio mode of this RemoteConnection is VOIP.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Boolean: true if the RemoteConnection's current audio mode is VOIP.

getConnectionProperties

added in API level 25
fun getConnectionProperties(): Int

Obtains the properties of this RemoteConnection.
Requires API level 25 (Android 7.1.1, Nougat)

Return
Int: A bitmask of the properties of the RemoteConnection, as defined in the PROPERTY_* constants in class Connection.

getState

added in API level 23
fun getState(): Int

Obtains the state of this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Int: A state value, chosen from the STATE_* constants.

reject

added in API level 23
fun reject(): Unit

Instructs this Connection#STATE_RINGING RemoteConnection to reject.
Requires API level 23 (Android 6.0, Marshmallow)

getCallerDisplayName

added in API level 23
fun getCallerDisplayName(): CharSequence!

Obtains the display name for this RemoteConnection's caller.
Requires API level 23 (Android 6.0, Marshmallow)

Return
CharSequence!: The display name for the caller.

disconnect

added in API level 23
fun disconnect(): Unit

Instructs this RemoteConnection to disconnect.
Requires API level 23 (Android 6.0, Marshmallow)

getDisconnectCause

added in API level 23
fun getDisconnectCause(): DisconnectCause!

Obtains the reason why this RemoteConnection may have been disconnected.
Requires API level 23 (Android 6.0, Marshmallow)

Return
DisconnectCause!: For a Connection#STATE_DISCONNECTED RemoteConnection, the disconnect cause expressed as a code chosen from among those declared in DisconnectCause.

getConnectionCapabilities

added in API level 23
fun getConnectionCapabilities(): Int

Obtains the capabilities of this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Int: A bitmask of the capabilities of the RemoteConnection, as defined in the CAPABILITY_* constants in class Connection.

getConference

added in API level 23
fun getConference(): RemoteConference!

Obtain the RemoteConference that this RemoteConnection may be a part of, or null if there is no such RemoteConference.
Requires API level 23 (Android 6.0, Marshmallow)

Return
RemoteConference!: A RemoteConference or null;

unhold

added in API level 23
fun unhold(): Unit

Instructs this Connection#STATE_HOLDING call to release from hold.
Requires API level 23 (Android 6.0, Marshmallow)

getAddress

added in API level 23
fun getAddress(): Uri!

Obtains the address of this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Uri!: The address (e.g., phone number) to which the RemoteConnection is currently connected.

isRingbackRequested

added in API level 23
fun isRingbackRequested(): Boolean

Determines whether this RemoteConnection is requesting ringback.
Requires API level 23 (Android 6.0, Marshmallow)

Return
Boolean: Whether the RemoteConnection is requesting that the framework play a ringback tone on its behalf.

getVideoProvider

added in API level 23
fun getVideoProvider(): RemoteConnection.VideoProvider!

Obtains the video provider of this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Return
RemoteConnection.VideoProvider!: The video provider associated with this RemoteConnection.

pullExternalCall

added in API level 25
fun pullExternalCall(): Unit

Instructs this RemoteConnection to pull itself to the local device.

See Call#pullExternalCall() for more information.
Requires API level 25 (Android 7.1.1, Nougat)

unregisterCallback

added in API level 23
fun unregisterCallback(callback: RemoteConnection.Callback!): Unit

Removes a callback from this RemoteConnection.
Requires API level 23 (Android 6.0, Marshmallow)

Parameters
callback RemoteConnection.Callback!: A Callback.

postDialContinue

added in API level 23
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.
Requires API level 23 (Android 6.0, Marshmallow)

Parameters
proceed Boolean: Whether or not to continue with the post-dial sequence.

getConferenceableConnections

added in API level 23
fun getConferenceableConnections(): MutableList<RemoteConnection!>!

Obtain the RemoteConnections with which this RemoteConnection may be successfully asked to create a conference with.
Requires API level 23 (Android 6.0, Marshmallow)

Return
MutableList<RemoteConnection!>!: The RemoteConnections with which this RemoteConnection may be merged into a RemoteConference.

answer

added in API level 23
fun answer(): Unit

Instructs this Connection#STATE_RINGING RemoteConnection to answer.
Requires API level 23 (Android 6.0, Marshmallow)