public final class RemoteConnection extends Object
ConnectionService
by another ConnectionService
running in a different process.Modifier and Type | Class and Description |
---|---|
static class |
RemoteConnection.Callback
Callback base class for
RemoteConnection . |
static class |
RemoteConnection.VideoProvider
RemoteConnection.VideoProvider associated with a RemoteConnection . |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Instructs this
RemoteConnection to abort. |
void |
answer()
Instructs this
Connection.STATE_RINGING RemoteConnection to answer. |
void |
answer(int videoState)
Instructs this
Connection.STATE_RINGING RemoteConnection to answer. |
void |
disconnect()
Instructs this
RemoteConnection to disconnect. |
static RemoteConnection |
failure(DisconnectCause disconnectCause)
Create a RemoteConnection represents a failure, and which will be in
Connection.STATE_DISCONNECTED . |
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
RemoteConnection s with which this RemoteConnection may be
successfully asked to create a conference with. |
int |
getConnectionCapabilities()
Obtains the capabilities of this
RemoteConnection . |
int |
getConnectionProperties()
Obtains the properties of this
RemoteConnection . |
DisconnectCause |
getDisconnectCause()
Obtains the reason why this
RemoteConnection may have been disconnected. |
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 . |
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 |
pullExternalCall()
Instructs this
RemoteConnection to pull itself to the local device. |
void |
registerCallback(RemoteConnection.Callback callback)
Adds a callback to this
RemoteConnection . |
void |
registerCallback(RemoteConnection.Callback callback,
Handler handler)
Adds a callback to this
RemoteConnection . |
void |
reject()
Instructs this
Connection.STATE_RINGING RemoteConnection to reject. |
void |
setAudioState(AudioState state)
Deprecated.
Use {@link #setCallAudioState(CallAudioState) instead.
|
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
Connection.STATE_HOLDING call to release from hold. |
void |
unregisterCallback(RemoteConnection.Callback callback)
Removes a callback from this
RemoteConnection . |
public void registerCallback(RemoteConnection.Callback callback)
RemoteConnection
.callback
- A Callback
.public void registerCallback(RemoteConnection.Callback callback, Handler handler)
RemoteConnection
.callback
- A Callback
.handler
- A Handler
which command and status changes will be delivered to.public void unregisterCallback(RemoteConnection.Callback callback)
RemoteConnection
.callback
- A Callback
.public int getState()
RemoteConnection
.STATE_*
constants.public DisconnectCause getDisconnectCause()
RemoteConnection
may have been disconnected.Connection.STATE_DISCONNECTED
RemoteConnection
, the
disconnect cause expressed as a code chosen from among those declared in
DisconnectCause
.public int getConnectionCapabilities()
RemoteConnection
.RemoteConnection
, as defined in
the CAPABILITY_*
constants in class Connection
.public int getConnectionProperties()
RemoteConnection
.RemoteConnection
, as defined in the
PROPERTY_*
constants in class Connection
.public boolean isVoipAudioMode()
RemoteConnection
is VOIP.true
if the RemoteConnection
's current audio mode is VOIP.public StatusHints getStatusHints()
RemoteConnection
.StatusHints
of this RemoteConnection
,
or null
if none have been set.public Uri getAddress()
RemoteConnection
.RemoteConnection
is currently connected.public int getAddressPresentation()
RemoteConnection
.TelecomManager
for valid values.public CharSequence getCallerDisplayName()
RemoteConnection
's caller.public int getCallerDisplayNamePresentation()
RemoteConnection
's
caller's display name.TelecomManager
for valid values.public int getVideoState()
RemoteConnection
.RemoteConnection
. See VideoProfile
.public final RemoteConnection.VideoProvider getVideoProvider()
RemoteConnection
.RemoteConnection
.public final Bundle getExtras()
RemoteConnection
.public boolean isRingbackRequested()
RemoteConnection
is requesting ringback.RemoteConnection
is requesting that the framework play a
ringback tone on its behalf.public void abort()
RemoteConnection
to abort.public void answer()
Connection.STATE_RINGING
RemoteConnection
to answer.public void answer(int videoState)
Connection.STATE_RINGING
RemoteConnection
to answer.videoState
- The video state in which to answer the call.public void reject()
Connection.STATE_RINGING
RemoteConnection
to reject.public void hold()
RemoteConnection
to go on hold.public void unhold()
Connection.STATE_HOLDING
call to release from hold.public void disconnect()
RemoteConnection
to disconnect.public void playDtmfTone(char digit)
RemoteConnection
to play a dual-tone multi-frequency signaling
(DTMF) tone.
Any other currently playing DTMF tone in the specified call is immediately stopped.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 stopDtmfTone()
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 postDialContinue(boolean proceed)
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
RemoteConnection.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.proceed
- Whether or not to continue with the post-dial sequence.public void pullExternalCall()
RemoteConnection
to pull itself to the local device.
See Call.pullExternalCall()
for more information.
@Deprecated public void setAudioState(AudioState state)
RemoteConnection
.state
- The audio state of this RemoteConnection
.public void setCallAudioState(CallAudioState state)
RemoteConnection
.state
- The audio state of this RemoteConnection
.public List<RemoteConnection> getConferenceableConnections()
RemoteConnection
s with which this RemoteConnection
may be
successfully asked to create a conference with.RemoteConnection
s with which this RemoteConnection
may be
merged into a RemoteConference
.public RemoteConference getConference()
RemoteConference
that this RemoteConnection
may be a part
of, or null
if there is no such RemoteConference
.RemoteConference
or null
;public static RemoteConnection failure(DisconnectCause disconnectCause)
Connection.STATE_DISCONNECTED
. Attempting to use it for anything will almost
certainly result in bad things happening. Do not do this.RemoteConnection