Android APIs
public final class

RemoteConnection

extends Object
java.lang.Object
   ↳ android.telecom.RemoteConnection

Class Overview

A connection provided to a ConnectionService by another ConnectionService running in a different process.

Summary

Nested Classes
class RemoteConnection.Callback Callback base class for RemoteConnection
class RemoteConnection.VideoProvider RemoteConnection.VideoProvider associated with a RemoteConnection
Public Methods
void abort()
Instructs this RemoteConnection to abort.
void answer()
Instructs this STATE_RINGING RemoteConnection to answer.
void disconnect()
Instructs this RemoteConnection to disconnect.
Uri getAddress()
Obtains the address of this RemoteConnection.
int getAddressPresentation()
Obtains the presentation requirements for the address of this RemoteConnection.
CharSequence getCallerDisplayName()
Obtains the display name for this RemoteConnection's caller.
int getCallerDisplayNamePresentation()
Obtains the presentation requirements for this RemoteConnection's caller's display name.
RemoteConference getConference()
Obtain the RemoteConference that this RemoteConnection may be a part of, or null if there is no such RemoteConference.
List<RemoteConnection> getConferenceableConnections()
Obtain the RemoteConnections with which this RemoteConnection may be successfully asked to create a conference with.
int getConnectionCapabilities()
Obtains the capabilities of this RemoteConnection.
DisconnectCause getDisconnectCause()
Obtains the reason why this RemoteConnection may have been disconnected.
final Bundle getExtras()
Obtain the extras associated with this RemoteConnection.
int getState()
Obtains the state of this RemoteConnection.
StatusHints getStatusHints()
Obtains status hints pertaining to this RemoteConnection.
final RemoteConnection.VideoProvider getVideoProvider()
Obtains the video provider of this RemoteConnection.
int getVideoState()
Obtains the video state of this RemoteConnection.
void hold()
Instructs this RemoteConnection to go on hold.
boolean isRingbackRequested()
Determines whether this RemoteConnection is requesting ringback.
boolean isVoipAudioMode()
Determines if the audio mode of this RemoteConnection is VOIP.
void playDtmfTone(char digit)
Instructs this RemoteConnection to play a dual-tone multi-frequency signaling (DTMF) tone.
void postDialContinue(boolean proceed)
Instructs this RemoteConnection to continue playing a post-dial DTMF string.
void registerCallback(RemoteConnection.Callback callback, Handler handler)
Adds a callback to this RemoteConnection.
void registerCallback(RemoteConnection.Callback callback)
Adds a callback to this RemoteConnection.
void reject()
Instructs this STATE_RINGING RemoteConnection to reject.
void setCallAudioState(CallAudioState state)
Set the audio state of this RemoteConnection.
void stopDtmfTone()
Instructs this RemoteConnection to stop any dual-tone multi-frequency signaling (DTMF) tone currently playing.
void unhold()
Instructs this STATE_HOLDING call to release from hold.
void unregisterCallback(RemoteConnection.Callback callback)
Removes a callback from this RemoteConnection.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void abort ()

Added in API level 23

Instructs this RemoteConnection to abort.

public void answer ()

Added in API level 23

Instructs this STATE_RINGING RemoteConnection to answer.

public void disconnect ()

Added in API level 23

Instructs this RemoteConnection to disconnect.

public Uri getAddress ()

Added in API level 23

Obtains the address of this RemoteConnection.

Returns
  • The address (e.g., phone number) to which the RemoteConnection is currently connected.

public int getAddressPresentation ()

Added in API level 23

Obtains the presentation requirements for the address of this RemoteConnection.

Returns
  • The presentation requirements for the address. See TelecomManager for valid values.

public CharSequence getCallerDisplayName ()

Added in API level 23

Obtains the display name for this RemoteConnection's caller.

Returns
  • The display name for the caller.

public int getCallerDisplayNamePresentation ()

Added in API level 23

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

Returns
  • The presentation requirements for the caller display name. See TelecomManager for valid values.

public RemoteConference getConference ()

Added in API level 23

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

Returns
  • A RemoteConference or null;

public List<RemoteConnection> getConferenceableConnections ()

Added in API level 23

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

Returns
  • The RemoteConnections with which this RemoteConnection may be merged into a RemoteConference.

public int getConnectionCapabilities ()

Added in API level 23

Obtains the capabilities of this RemoteConnection.

Returns
  • A bitmask of the capabilities of the RemoteConnection, as defined in the CAPABILITY_* constants in class Connection.

public DisconnectCause getDisconnectCause ()

Added in API level 23

Obtains the reason why this RemoteConnection may have been disconnected.

Returns

public final Bundle getExtras ()

Added in API level 23

Obtain the extras associated with this RemoteConnection.

Returns
  • The extras for this connection.

public int getState ()

Added in API level 23

Obtains the state of this RemoteConnection.

Returns
  • A state value, chosen from the STATE_* constants.

public StatusHints getStatusHints ()

Added in API level 23

Obtains status hints pertaining to this RemoteConnection.

Returns
  • The current StatusHints of this RemoteConnection, or null if none have been set.

public final RemoteConnection.VideoProvider getVideoProvider ()

Added in API level 23

Obtains the video provider of this RemoteConnection.

Returns
  • The video provider associated with this RemoteConnection.

public int getVideoState ()

Added in API level 23

Obtains the video state of this RemoteConnection.

Returns

public void hold ()

Added in API level 23

Instructs this RemoteConnection to go on hold.

public boolean isRingbackRequested ()

Added in API level 23

Determines whether this RemoteConnection is requesting ringback.

Returns
  • Whether the RemoteConnection is requesting that the framework play a ringback tone on its behalf.

public boolean isVoipAudioMode ()

Added in API level 23

Determines if the audio mode of this RemoteConnection is VOIP.

Returns
  • true if the RemoteConnection's current audio mode is VOIP.

public void playDtmfTone (char digit)

Added in API level 23

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 A character representing the DTMF digit for which to play the tone. This value must be one of '0' through '9', '*' or '#'.

public void postDialContinue (boolean proceed)

Added in API level 23

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 DTMF_CHARACTER_WAIT or 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 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 DTMF_CHARACTER_WAIT symbol, this RemoteConnection will pause playing the tones and notify callbacks via 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 Whether or not to continue with the post-dial sequence.

public void registerCallback (RemoteConnection.Callback callback, Handler handler)

Added in API level 23

Adds a callback to this RemoteConnection.

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

public void registerCallback (RemoteConnection.Callback callback)

Added in API level 23

Adds a callback to this RemoteConnection.

Parameters
callback A Callback.

public void reject ()

Added in API level 23

Instructs this STATE_RINGING RemoteConnection to reject.

public void setCallAudioState (CallAudioState state)

Added in API level 23

Set the audio state of this RemoteConnection.

Parameters
state The audio state of this RemoteConnection.

public void stopDtmfTone ()

Added in API level 23

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.

public void unhold ()

Added in API level 23

Instructs this STATE_HOLDING call to release from hold.

public void unregisterCallback (RemoteConnection.Callback callback)

Added in API level 23

Removes a callback from this RemoteConnection.

Parameters
callback A Callback.