Most visited

Recently visited

Added in API level 23

RemoteConnection

public final class RemoteConnection
extends Object

java.lang.Object
   ↳ android.telecom.RemoteConnection


另一个 ConnectionService在另一个进程中提供给 ConnectionService的连接。

也可以看看:

Summary

Nested classes

class RemoteConnection.Callback

回调基类为RemoteConnection

class RemoteConnection.VideoProvider

RemoteConnection.VideoProvider与相关联RemoteConnection

Public methods

void abort()

指示此 RemoteConnection中止。

void answer()

指示此 STATE_RINGING RemoteConnection回答。

void disconnect()

指示此 RemoteConnection断开连接。

Uri getAddress()

获得这个 RemoteConnection的地址。

int getAddressPresentation()

获得此 RemoteConnection地址的演示要求。

CharSequence getCallerDisplayName()

获取此 RemoteConnection的调用者的显示名称。

int getCallerDisplayNamePresentation()

获取此 RemoteConnection的调用者显示名称的显示要求。

RemoteConference getConference()

获得 RemoteConference ,即 RemoteConnection可能是 RemoteConnection的一部分,或者 null如果没有这样的 RemoteConference

List<RemoteConnection> getConferenceableConnections()

获得 RemoteConnection与此 RemoteConnection可能被成功要求创建一个会议。

int getConnectionCapabilities()

获得此 RemoteConnection的功能。

DisconnectCause getDisconnectCause()

获得此 RemoteConnection可能已断开连接的原因。

final Bundle getExtras()

获取与此 RemoteConnection相关的额外 RemoteConnection

int getState()

获得这个 RemoteConnection的状态。

StatusHints getStatusHints()

获得有关此 RemoteConnection状态提示。

final RemoteConnection.VideoProvider getVideoProvider()

获得此 RemoteConnection的视频提供商。

int getVideoState()

获得这个 RemoteConnection的视频状态。

void hold()

指示此 RemoteConnection暂停。

boolean isRingbackRequested()

确定此 RemoteConnection是否请求回铃。

boolean isVoipAudioMode()

确定此 RemoteConnection的音频模式 RemoteConnection为VOIP。

void playDtmfTone(char digit)

指示此 RemoteConnection播放双音多频信号(DTMF)音。

void postDialContinue(boolean proceed)

指示此 RemoteConnection继续播放拨号后DTMF字符串。

void registerCallback(RemoteConnection.Callback callback)

添加一个回调到这个 RemoteConnection

void registerCallback(RemoteConnection.Callback callback, Handler handler)

向此 RemoteConnection添加回调。

void reject()

指示此 STATE_RINGING RemoteConnection拒绝。

void setCallAudioState(CallAudioState state)

设置此 RemoteConnection的音频状态。

void stopDtmfTone()

指示此 RemoteConnection停止当前正在播放的任何双音多频信号(DTMF)音。

void unhold()

指示此 STATE_HOLDING呼叫从保持状态释放。

void unregisterCallback(RemoteConnection.Callback callback)

从此 RemoteConnection删除回调。

Inherited methods

From class java.lang.Object

Public methods

abort

Added in API level 23
void abort ()

指示此 RemoteConnection中止。

answer

Added in API level 23
void answer ()

指示此 STATE_RINGING RemoteConnection回答。

disconnect

Added in API level 23
void disconnect ()

指示此 RemoteConnection断开连接。

getAddress

Added in API level 23
Uri getAddress ()

获得这个 RemoteConnection的地址。

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

getAddressPresentation

Added in API level 23
int getAddressPresentation ()

获得此 RemoteConnection的地址的演示要求。

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

getCallerDisplayName

Added in API level 23
CharSequence getCallerDisplayName ()

获取此 RemoteConnection的调用者的显示名称。

Returns
CharSequence The display name for the caller.

getCallerDisplayNamePresentation

Added in API level 23
int getCallerDisplayNamePresentation ()

获取此 RemoteConnection的调用者显示名称的显示要求。

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

getConference

Added in API level 23
RemoteConference getConference ()

得到 RemoteConferenceRemoteConnection可能的一部分,或 null如果不存在这样的 RemoteConference

Returns
RemoteConference A RemoteConference or null;

getConferenceableConnections

Added in API level 23
List<RemoteConnection> getConferenceableConnections ()

获得 RemoteConnection与此 RemoteConnection可能被成功要求创建一个会议。

Returns
List<RemoteConnection> The RemoteConnections with which this RemoteConnection may be merged into a RemoteConference.

getConnectionCapabilities

Added in API level 23
int getConnectionCapabilities ()

获得此 RemoteConnection的功能。

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

getDisconnectCause

Added in API level 23
DisconnectCause getDisconnectCause ()

获得此 RemoteConnection可能已断开连接的原因。

Returns
DisconnectCause For a STATE_DISCONNECTED RemoteConnection, the disconnect cause expressed as a code chosen from among those declared in DisconnectCause.

getExtras

Added in API level 23
Bundle getExtras ()

获取与此 RemoteConnection相关的额外 RemoteConnection

Returns
Bundle The extras for this connection.

getState

Added in API level 23
int getState ()

获得这个 RemoteConnection的状态。

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

getStatusHints

Added in API level 23
StatusHints getStatusHints ()

获得有关此 RemoteConnection状态提示。

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

getVideoProvider

Added in API level 23
RemoteConnection.VideoProvider getVideoProvider ()

获得此 RemoteConnection的视频提供商。

Returns
RemoteConnection.VideoProvider The video provider associated with this RemoteConnection.

getVideoState

Added in API level 23
int getVideoState ()

获得这个 RemoteConnection的视频状态。

Returns
int The video state of the RemoteConnection. See VideoProfile.

hold

Added in API level 23
void hold ()

指示此 RemoteConnection处于暂停状态。

isRingbackRequested

Added in API level 23
boolean isRingbackRequested ()

确定此 RemoteConnection是否正在请求回铃。

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

isVoipAudioMode

Added in API level 23
boolean isVoipAudioMode ()

确定此 RemoteConnection的音频模式 RemoteConnection为VOIP。

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

playDtmfTone

Added in API level 23
void playDtmfTone (char digit)

指示此RemoteConnection播放双音多频信号(DTMF)音。 立即停止指定呼叫中正在播放的任何其他DTMF音。

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

Added in API level 23
void postDialContinue (boolean proceed)

指示此RemoteConnection继续播放拨号后DTMF字符串。 拨号后DTMF字符串是在DTMF_CHARACTER_WAITDTMF_CHARACTER_PAUSE的第一个实例之后的一串数字。 一旦建立连接,这些数字立即作为DTMF音发送给接收方。 如果DTMF字符串包含DTMF_CHARACTER_PAUSE符号,则此RemoteConnection将在预定义的时间段内暂时暂停播放音调。 如果DTMF字符串包含DTMF_CHARACTER_WAIT符号,则此RemoteConnection将暂停播放音调并通过onPostDialWait(RemoteConnection, String)通知回调。 此时,通话应用程序应向用户显示此状态的指示以及继续后续序列的可供性。 当用户决定继续postDialContinue(boolean)序列时,通话应用程序应该调用postDialContinue(boolean)方法。

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

registerCallback

Added in API level 23
void registerCallback (RemoteConnection.Callback callback)

向此 RemoteConnection添加回调。

Parameters
callback RemoteConnection.Callback: A Callback.

registerCallback

Added in API level 23
void registerCallback (RemoteConnection.Callback callback, 
                Handler handler)

向此 RemoteConnection添加回调。

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

reject

Added in API level 23
void reject ()

指示此 STATE_RINGING RemoteConnection拒绝。

setCallAudioState

Added in API level 23
void setCallAudioState (CallAudioState state)

设置此 RemoteConnection的音频状态。

Parameters
state CallAudioState: The audio state of this RemoteConnection.

stopDtmfTone

Added in API level 23
void stopDtmfTone ()

指示此RemoteConnection停止当前正在播放的任何双音多频信号(DTMF)音。 通过拨打playDtmfTone(char)来播放DTMF铃声。 如果当前没有DTMF音色正在播放,则此方法不会执行任何操作。

unhold

Added in API level 23
void unhold ()

指示此 STATE_HOLDING呼叫从保持状态释放。

unregisterCallback

Added in API level 23
void unregisterCallback (RemoteConnection.Callback callback)

从此 RemoteConnection删除回调。

Parameters
callback RemoteConnection.Callback: A Callback.

Hooray!