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

public final class StreamingCall
extends Object implements Parcelable



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

From interface android.os.Parcelable

int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel(Parcel, int): the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)".

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

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

From interface android.os.Parcelable

abstract int describeContents()

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

abstract void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

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

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.
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

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2023-02-08 UTC.