Android APIs
public final class

ConnectionRequest

extends Object
implements Parcelable
java.lang.Object
   ↳ android.telecom.ConnectionRequest

Class Overview

Simple data container encapsulating a request to some entity to create a new Connection.

Summary

[Expand]
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()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
PhoneAccountHandle getAccountHandle()
The account which should be used to place the call.
Uri getAddress()
The handle (e.g., phone number) to which the Connection is to connect.
Bundle getExtras()
Application-specific extra data.
int getVideoState()
Describes the video states supported by the client requesting the connection.
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel destination, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<ConnectionRequest> CREATOR

Added in API level 23

Public Constructors

public ConnectionRequest (PhoneAccountHandle accountHandle, Uri handle, Bundle extras)

Added in API level 23

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

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

Added in API level 23

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

Public Methods

public int describeContents ()

Added in API level 23

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public PhoneAccountHandle getAccountHandle ()

Added in API level 23

The account which should be used to place the call.

public Uri getAddress ()

Added in API level 23

The handle (e.g., phone number) to which the Connection is to connect.

public Bundle getExtras ()

Added in API level 23

Application-specific extra data. Used for passing back information from an incoming call Intent, and for any proprietary extensions arranged between a client and servant ConnectionService which agree on a vocabulary for such data.

public int getVideoState ()

Added in API level 23

Describes the video states supported by the client requesting the connection. Valid values: STATE_AUDIO_ONLY, STATE_BIDIRECTIONAL, STATE_TX_ENABLED, STATE_RX_ENABLED.

Returns
  • The video state for the connection.

public String toString ()

Added in API level 23

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

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

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel destination, int flags)

Added in API level 23

Flatten this object in to a Parcel.

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