Most visited

Recently visited

Added in API level 23

ConnectionRequest

public final class ConnectionRequest
extends Object implements Parcelable

java.lang.Object
   ↳ android.telecom.ConnectionRequest


简单的数据容器将请求封装到某个实体以创建新的 Connection

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<ConnectionRequest> CREATOR

Public constructors

ConnectionRequest(PhoneAccountHandle accountHandle, Uri handle, Bundle extras)
ConnectionRequest(PhoneAccountHandle accountHandle, Uri handle, Bundle extras, int videoState)

Public methods

int describeContents()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。

PhoneAccountHandle getAccountHandle()

应该用于发出呼叫的帐户。

Uri getAddress()

Connection要连接的句柄(例如电话号码)。

Bundle getExtras()

应用程序特定的额外数据。

int getVideoState()

描述请求连接的客户端支持的视频状态。

String toString()

返回对象的字符串表示形式。

void writeToParcel(Parcel destination, int flags)

将此对象平铺到一个包裹中。

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 23
Creator<ConnectionRequest> CREATOR

Public constructors

ConnectionRequest

Added in API level 23
ConnectionRequest (PhoneAccountHandle accountHandle, 
                Uri handle, 
                Bundle extras)

Parameters
accountHandle PhoneAccountHandle: The accountHandle which should be used to place the call.
handle Uri: The handle (e.g., phone number) to which the Connection is to connect.
extras Bundle: Application-specific extra data.

ConnectionRequest

Added in API level 23
ConnectionRequest (PhoneAccountHandle accountHandle, 
                Uri handle, 
                Bundle extras, 
                int videoState)

Parameters
accountHandle PhoneAccountHandle: The accountHandle which should be used to place the call.
handle Uri: The handle (e.g., phone number) to which the Connection is to connect.
extras Bundle: Application-specific extra data.
videoState int: Determines the video state for the connection.

Public methods

describeContents

Added in API level 23
int describeContents ()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getAccountHandle

Added in API level 23
PhoneAccountHandle getAccountHandle ()

应该用于发出呼叫的帐户。

Returns
PhoneAccountHandle

getAddress

Added in API level 23
Uri getAddress ()

Connection要连接的句柄(例如,电话号码)。

Returns
Uri

getExtras

Added in API level 23
Bundle getExtras ()

应用程序特定的额外数据。 用于传入来电Intent ,以及在客户和服务人员ConnectionService之间安排的任何专有扩展,这些扩展同意这些数据的词汇表。

Returns
Bundle

getVideoState

Added in API level 23
int getVideoState ()

描述请求连接的客户端支持的视频状态。 有效值: STATE_AUDIO_ONLYSTATE_BIDIRECTIONALSTATE_TX_ENABLEDSTATE_RX_ENABLED

Returns
int The video state for the connection.

toString

Added in API level 23
String toString ()

返回对象的字符串表示形式。 通常, toString方法会返回一个“文本表示”此对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。

ObjecttoString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
String a string representation of the object.

writeToParcel

Added in API level 23
void writeToParcel (Parcel destination, 
                int flags)

将此对象平铺到一个包裹中。

Parameters
destination Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.

Hooray!