RemoteConnection
  public
  
  final
  
  class
  RemoteConnection
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.telecom.RemoteConnection | 
A connection provided to a ConnectionService by another ConnectionService
 running in a different process.
See also:
Summary
| Nested classes | |
|---|---|
| 
        
        
        
        
        class | RemoteConnection.CallbackCallback base class for  | 
| 
        
        
        
        
        class | RemoteConnection.VideoProvider
 | 
| Public methods | |
|---|---|
| 
        
        
        
        
        
        void | 
      abort()
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      addConferenceParticipants(List<Uri> participants)
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      answer()
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      disconnect()
      Instructs this  | 
| 
        
        
        
        
        
        Uri | 
      getAddress()
      Obtains the address of this  | 
| 
        
        
        
        
        
        int | 
      getAddressPresentation()
      Obtains the presentation requirements for the address of this  | 
| 
        
        
        
        
        
        CharSequence | 
      getCallerDisplayName()
      Obtains the display name for this  | 
| 
        
        
        
        
        
        int | 
      getCallerDisplayNamePresentation()
      Obtains the presentation requirements for this  | 
| 
        
        
        
        
        
        RemoteConference | 
      getConference()
      Obtain the  | 
| 
        
        
        
        
        
        List<RemoteConnection> | 
      getConferenceableConnections()
      Obtain the  | 
| 
        
        
        
        
        
        int | 
      getConnectionCapabilities()
      Obtains the capabilities of this  | 
| 
        
        
        
        
        
        int | 
      getConnectionProperties()
      Obtains the properties of this  | 
| 
        
        
        
        
        
        DisconnectCause | 
      getDisconnectCause()
      Obtains the reason why this  | 
| 
        
        
        
        
        
        Bundle | 
      getExtras()
      Obtain the extras associated with this  | 
| 
        
        
        
        
        
        int | 
      getState()
      Obtains the state of this  | 
| 
        
        
        
        
        
        StatusHints | 
      getStatusHints()
      Obtains status hints pertaining to this  | 
| 
        
        
        
        
        
        RemoteConnection.VideoProvider | 
      getVideoProvider()
      Obtains the video provider of this  | 
| 
        
        
        
        
        
        int | 
      getVideoState()
      Obtains the video state of this  | 
| 
        
        
        
        
        
        void | 
      hold()
      Instructs this  | 
| 
        
        
        
        
        
        boolean | 
      isRingbackRequested()
      Determines whether this  | 
| 
        
        
        
        
        
        boolean | 
      isVoipAudioMode()
      Determines if the audio mode of this  | 
| 
        
        
        
        
        
        void | 
      playDtmfTone(char digit)
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      postDialContinue(boolean proceed)
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      pullExternalCall()
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      registerCallback(RemoteConnection.Callback callback)
      Adds a callback to this  | 
| 
        
        
        
        
        
        void | 
      registerCallback(RemoteConnection.Callback callback, Handler handler)
      Adds a callback to this  | 
| 
        
        
        
        
        
        void | 
      reject()
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      setCallAudioState(CallAudioState state)
      Set the audio state of this  | 
| 
        
        
        
        
        
        void | 
      stopDtmfTone()
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      unhold()
      Instructs this  | 
| 
        
        
        
        
        
        void | 
      unregisterCallback(RemoteConnection.Callback callback)
      Removes a callback from this  | 
| Inherited methods | |
|---|---|
Public methods
addConferenceParticipants
public void addConferenceParticipants (List<Uri> participants)
Instructs this RemoteConnection to initiate a conference with a list of
 participants.
 
| Parameters | |
|---|---|
| participants | List: with which conference call will be formed.
 This value cannot benull. | 
answer
public void answer ()
Instructs this Connection.STATE_RINGING RemoteConnection to answer.
disconnect
public void disconnect ()
Instructs this RemoteConnection to disconnect.
getAddress
public Uri getAddress ()
Obtains the address of this RemoteConnection.
| Returns | |
|---|---|
| Uri | The address (e.g., phone number) to which the RemoteConnectionis currently connected. | 
getAddressPresentation
public int getAddressPresentation ()
Obtains the presentation requirements for the address of this RemoteConnection.
| Returns | |
|---|---|
| int | The presentation requirements for the address. See TelecomManagerfor valid values. | 
getCallerDisplayName
public CharSequence getCallerDisplayName ()
Obtains the display name for this RemoteConnection's caller.
| Returns | |
|---|---|
| CharSequence | The display name for the caller. | 
getCallerDisplayNamePresentation
public int getCallerDisplayNamePresentation ()
Obtains the presentation requirements for this RemoteConnection's
 caller's display name.
| Returns | |
|---|---|
| int | The presentation requirements for the caller display name. See TelecomManagerfor valid values. | 
getConference
public RemoteConference getConference ()
Obtain the RemoteConference that this RemoteConnection may be a part
 of, or null if there is no such RemoteConference.
| Returns | |
|---|---|
| RemoteConference | A RemoteConferenceornull; | 
getConferenceableConnections
public List<RemoteConnection> getConferenceableConnections ()
Obtain the RemoteConnections with which this RemoteConnection may be
 successfully asked to create a conference with.
| Returns | |
|---|---|
| List<RemoteConnection> | The RemoteConnections with which thisRemoteConnectionmay be
         merged into aRemoteConference. | 
getConnectionCapabilities
public int getConnectionCapabilities ()
Obtains the capabilities of this RemoteConnection.
| Returns | |
|---|---|
| int | A bitmask of the capabilities of the RemoteConnection, as defined in
         theCAPABILITY_*constants in classConnection. | 
getConnectionProperties
public int getConnectionProperties ()
Obtains the properties of this RemoteConnection.
| Returns | |
|---|---|
| int | A bitmask of the properties of the RemoteConnection, as defined in thePROPERTY_*constants in classConnection. | 
getDisconnectCause
public DisconnectCause getDisconnectCause ()
Obtains the reason why this RemoteConnection may have been disconnected.
| Returns | |
|---|---|
| DisconnectCause | For a Connection.STATE_DISCONNECTEDRemoteConnection, the
         disconnect cause expressed as a code chosen from among those declared inDisconnectCause. | 
getExtras
public Bundle getExtras ()
Obtain the extras associated with this RemoteConnection.
| Returns | |
|---|---|
| Bundle | The extras for this connection. | 
getState
public int getState ()
Obtains the state of this RemoteConnection.
| Returns | |
|---|---|
| int | A state value, chosen from the STATE_*constants. | 
getStatusHints
public StatusHints getStatusHints ()
Obtains status hints pertaining to this RemoteConnection.
| Returns | |
|---|---|
| StatusHints | The current StatusHintsof thisRemoteConnection,
         ornullif none have been set. | 
getVideoProvider
public RemoteConnection.VideoProvider getVideoProvider ()
Obtains the video provider of this RemoteConnection.
| Returns | |
|---|---|
| RemoteConnection.VideoProvider | The video provider associated with this RemoteConnection. | 
getVideoState
public int getVideoState ()
Obtains the video state of this RemoteConnection.
| Returns | |
|---|---|
| int | The video state of the RemoteConnection. SeeVideoProfile. | 
isRingbackRequested
public boolean isRingbackRequested ()
Determines whether this RemoteConnection is requesting ringback.
| Returns | |
|---|---|
| boolean | Whether the RemoteConnectionis requesting that the framework play a
         ringback tone on its behalf. | 
isVoipAudioMode
public boolean isVoipAudioMode ()
Determines if the audio mode of this RemoteConnection is VOIP.
| Returns | |
|---|---|
| boolean | trueif theRemoteConnection's current audio mode is VOIP. | 
playDtmfTone
public void playDtmfTone (char digit)
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
public void postDialContinue (boolean proceed)
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
public void pullExternalCall ()
Instructs this RemoteConnection to pull itself to the local device.
 
 See Call.pullExternalCall() for more information.
registerCallback
public void registerCallback (RemoteConnection.Callback callback)
Adds a callback to this RemoteConnection.
| Parameters | |
|---|---|
| callback | RemoteConnection.Callback: ACallback. | 
registerCallback
public void registerCallback (RemoteConnection.Callback callback, Handler handler)
Adds a callback to this RemoteConnection.
| Parameters | |
|---|---|
| callback | RemoteConnection.Callback: ACallback. | 
| handler | Handler: AHandlerwhich command and status changes will be delivered to. | 
reject
public void reject ()
Instructs this Connection.STATE_RINGING RemoteConnection to reject.
setCallAudioState
public void setCallAudioState (CallAudioState state)
Set the audio state of this RemoteConnection.
| Parameters | |
|---|---|
| state | CallAudioState: The audio state of thisRemoteConnection. | 
stopDtmfTone
public void stopDtmfTone ()
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
public void unhold ()
Instructs this Connection.STATE_HOLDING call to release from hold.
unregisterCallback
public void unregisterCallback (RemoteConnection.Callback callback)
Removes a callback from this RemoteConnection.
| Parameters | |
|---|---|
| callback | RemoteConnection.Callback: ACallback. | 
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
