Stay organized with collections Save and categorize content based on your preferences.

StreamingCall

public final class StreamingCall
extends Object implements Parcelable

java.lang.Object
   ↳ android.telecom.StreamingCall


Represents a voip call requested to stream to another device that the general streaming sender app should present to the receiver.

Summary

Constants

int STATE_DISCONNECTED

The state of a StreamingCall when it's either disconnected or pulled back to the original device.

int STATE_HOLDING

The state of a StreamingCall when in a holding state.

int STATE_STREAMING

The state of a StreamingCall when newly created.

Inherited constants

Fields

public static final Creator<StreamingCall> CREATOR

Public constructors

StreamingCall(ComponentName componentName, String displayName, Uri address, Bundle extras)

Public methods

int describeContents()

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

Uri getAddress()
ComponentName getComponentName()
String getDisplayName()
Bundle getExtras()
int getState()
void setStreamingState(int state)

Sets the state of this StreamingCall.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

STATE_DISCONNECTED

public static final int STATE_DISCONNECTED

The state of a StreamingCall when it's either disconnected or pulled back to the original device.

Constant Value: 3 (0x00000003)

STATE_HOLDING

public static final int STATE_HOLDING

The state of a StreamingCall when in a holding state.

Constant Value: 2 (0x00000002)

STATE_STREAMING

public static final int STATE_STREAMING

The state of a StreamingCall when newly created. General streaming sender should continuously stream call audio to the sender device as long as the StreamingCall is in this state.

Constant Value: 1 (0x00000001)

Fields

CREATOR

public static final Creator<StreamingCall> CREATOR

Public constructors

StreamingCall

public StreamingCall (ComponentName componentName, 
                String displayName, 
                Uri address, 
                Bundle extras)

Parameters
componentName ComponentName: This value cannot be null.

displayName String: This value cannot be null.

address Uri: This value cannot be null.

extras Bundle: This value cannot be null.

Public methods

describeContents

public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

getAddress

public Uri getAddress ()

Returns
Uri The address (e.g., phone number) to which the StreamingCall is currently connected. This value cannot be null.

getComponentName

public ComponentName getComponentName ()

Returns
ComponentName The ComponentName to identify the original voip app of this StreamingCall. General streaming sender app can use this to query necessary information (app icon etc.) in order to present notification of the streaming call on the receiver side. This value cannot be null.

getDisplayName

public String getDisplayName ()

Returns
String The display name that the general streaming sender app can use this to present the StreamingCall to the receiver side. This value cannot be null.

getExtras

public Bundle getExtras ()

Returns
Bundle The extra info the general streaming app need to stream the call from voip app or D2DI sdk. This value cannot be null.

getState

public int getState ()

Returns
int The state of this StreamingCall. Value is STATE_STREAMING, STATE_HOLDING, or STATE_DISCONNECTED

setStreamingState

public void setStreamingState (int state)

Sets the state of this StreamingCall. The general streaming sender app can use this to request holding, unholding and disconnecting this StreamingCall.

Parameters
state int: The current streaming state of the call. Value is STATE_STREAMING, STATE_HOLDING, or STATE_DISCONNECTED

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES