Most visited

Recently visited

Added in API level 23

Conference

public abstract class Conference
extends Conferenceable

java.lang.Object
   ↳ android.telecom.Conferenceable
     ↳ android.telecom.Conference


Represents a conference call which can contain any number of Connection objects.

Summary

Constants

long CONNECT_TIME_NOT_SPECIFIED

Used to indicate that the conference connection time is not specified.

Public constructors

Conference(PhoneAccountHandle phoneAccount)

Constructs a new Conference with a mandatory PhoneAccountHandle

Public methods

final boolean addConnection(Connection connection)

Adds the specified connection as a child of this conference.

final void destroy()

Tears down the conference object and any of its current connections.

final CallAudioState getCallAudioState()
final List<Connection> getConferenceableConnections()

Returns the connections with which this connection can be conferenced.

final int getConnectionCapabilities()

Returns the capabilities of the conference.

final long getConnectionTime()

Retrieves the connection start time of the Conference, if specified.

final List<Connection> getConnections()

Returns the list of connections currently associated with the conference call.

final DisconnectCause getDisconnectCause()
final Bundle getExtras()

Returns the extras associated with this conference.

final PhoneAccountHandle getPhoneAccountHandle()

Returns the PhoneAccountHandle the conference call is being placed through.

final int getState()

Gets the state of the conference call.

final StatusHints getStatusHints()
Connection.VideoProvider getVideoProvider()

Returns VideoProvider of the primary call.

int getVideoState()

Returns video state of the primary call.

void onCallAudioStateChanged(CallAudioState state)

Notifies this conference that the getCallAudioState() property has a new value.

void onConnectionAdded(Connection connection)

Notifies this conference that a connection has been added to it.

void onDisconnect()

Invoked when the Conference and all it's Connections should be disconnected.

void onHold()

Invoked when the conference should be put on hold.

void onMerge(Connection connection)

Invoked when the specified Connection should merged with the conference call.

void onMerge()

Invoked when the child calls should be merged.

void onPlayDtmfTone(char c)

Notifies this conference of a request to play a DTMF tone.

void onSeparate(Connection connection)

Invoked when the specified Connection should be separated from the conference call.

void onStopDtmfTone()

Notifies this conference of a request to stop any currently playing DTMF tones.

void onSwap()

Invoked when the child calls should be swapped.

void onUnhold()

Invoked when the conference should be moved from hold to active.

final void removeConnection(Connection connection)

Removes the specified connection as a child of this conference.

final void setActive()

Sets state to be active.

final void setConferenceableConnections(List<Connection> conferenceableConnections)

Sets the connections with which this connection can be conferenced.

final void setConnectionCapabilities(int connectionCapabilities)

Sets the capabilities of a conference.

final void setConnectionTime(long connectionTimeMillis)

Sets the connection start time of the Conference.

final void setDialing()

Sets state to be dialing.

final void setDisconnected(DisconnectCause disconnectCause)

Sets state to disconnected.

final void setExtras(Bundle extras)

Replaces all the extras associated with this Conference.

final void setOnHold()

Sets state to be on hold.

final void setStatusHints(StatusHints statusHints)

Sets the label and icon status to display in the InCall UI.

final void setVideoProvider(Connection c, Connection.VideoProvider videoProvider)

Sets the video connection provider.

final void setVideoState(Connection c, int videoState)

Set the video state for the conference.

String toString()

Returns a string representation of the object.

Inherited methods

From class java.lang.Object

Constants

CONNECT_TIME_NOT_SPECIFIED

Added in API level 23
long CONNECT_TIME_NOT_SPECIFIED

Used to indicate that the conference connection time is not specified. If not specified, Telecom will set the connect time.

Constant Value: 0 (0x0000000000000000)

Public constructors

Conference

Added in API level 23
Conference (PhoneAccountHandle phoneAccount)

Constructs a new Conference with a mandatory PhoneAccountHandle

Parameters
phoneAccount PhoneAccountHandle: The PhoneAccountHandle associated with the conference.

Public methods

addConnection

Added in API level 23
boolean addConnection (Connection connection)

Adds the specified connection as a child of this conference.

Parameters
connection Connection: The connection to add.
Returns
boolean True if the connection was successfully added.

destroy

Added in API level 23
void destroy ()

Tears down the conference object and any of its current connections.

getCallAudioState

Added in API level 23
CallAudioState getCallAudioState ()

Returns
CallAudioState The audio state of the conference, describing how its audio is currently being routed by the system. This is null if this Conference does not directly know about its audio state.

getConferenceableConnections

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

Returns the connections with which this connection can be conferenced.

Returns
List<Connection>

getConnectionCapabilities

Added in API level 23
int getConnectionCapabilities ()

Returns the capabilities of the conference. See CAPABILITY_* constants in class Connection for valid values.

Returns
int A bitmask of the capabilities of the conference call.

getConnectionTime

Added in API level 23
long getConnectionTime ()

Retrieves the connection start time of the Conference, if specified. A value of CONNECT_TIME_NOT_SPECIFIED indicates that Telecom should determine the start time of the conference.

Returns
long The time at which the Conference was connected.

getConnections

Added in API level 23
List<Connection> getConnections ()

Returns the list of connections currently associated with the conference call.

Returns
List<Connection> A list of Connection objects which represent the children of the conference.

getDisconnectCause

Added in API level 23
DisconnectCause getDisconnectCause ()

Returns
DisconnectCause The DisconnectCause for this connection.

getExtras

Added in API level 23
Bundle getExtras ()

Returns the extras associated with this conference.

Returns
Bundle The extras associated with this connection.

getPhoneAccountHandle

Added in API level 23
PhoneAccountHandle getPhoneAccountHandle ()

Returns the PhoneAccountHandle the conference call is being placed through.

Returns
PhoneAccountHandle A PhoneAccountHandle object representing the PhoneAccount of the conference.

getState

Added in API level 23
int getState ()

Gets the state of the conference call. See Connection for valid values.

Returns
int A constant representing the state the conference call is currently in.

getStatusHints

Added in API level 23
StatusHints getStatusHints ()

Returns
StatusHints The status hints for this conference.

getVideoProvider

Added in API level 23
Connection.VideoProvider getVideoProvider ()

Returns VideoProvider of the primary call. This can be null.

Returns
Connection.VideoProvider

getVideoState

Added in API level 23
int getVideoState ()

Returns video state of the primary call.

Returns
int

onCallAudioStateChanged

Added in API level 23
void onCallAudioStateChanged (CallAudioState state)

Notifies this conference that the getCallAudioState() property has a new value.

Parameters
state CallAudioState: The new call audio state.

onConnectionAdded

Added in API level 23
void onConnectionAdded (Connection connection)

Notifies this conference that a connection has been added to it.

Parameters
connection Connection: The newly added connection.

onDisconnect

Added in API level 23
void onDisconnect ()

Invoked when the Conference and all it's Connections should be disconnected.

onHold

Added in API level 23
void onHold ()

Invoked when the conference should be put on hold.

onMerge

Added in API level 23
void onMerge (Connection connection)

Invoked when the specified Connection should merged with the conference call.

Parameters
connection Connection: The Connection to merge.

onMerge

Added in API level 23
void onMerge ()

Invoked when the child calls should be merged. Only invoked if the conference contains the capability CAPABILITY_MERGE_CONFERENCE.

onPlayDtmfTone

Added in API level 23
void onPlayDtmfTone (char c)

Notifies this conference of a request to play a DTMF tone.

Parameters
c char: A DTMF character.

onSeparate

Added in API level 23
void onSeparate (Connection connection)

Invoked when the specified Connection should be separated from the conference call.

Parameters
connection Connection: The connection to separate.

onStopDtmfTone

Added in API level 23
void onStopDtmfTone ()

Notifies this conference of a request to stop any currently playing DTMF tones.

onSwap

Added in API level 23
void onSwap ()

Invoked when the child calls should be swapped. Only invoked if the conference contains the capability CAPABILITY_SWAP_CONFERENCE.

onUnhold

Added in API level 23
void onUnhold ()

Invoked when the conference should be moved from hold to active.

removeConnection

Added in API level 23
void removeConnection (Connection connection)

Removes the specified connection as a child of this conference.

Parameters
connection Connection: The connection to remove.

setActive

Added in API level 23
void setActive ()

Sets state to be active.

setConferenceableConnections

Added in API level 23
void setConferenceableConnections (List<Connection> conferenceableConnections)

Sets the connections with which this connection can be conferenced.

Parameters
conferenceableConnections List: The set of connections this connection can conference with.

setConnectionCapabilities

Added in API level 23
void setConnectionCapabilities (int connectionCapabilities)

Sets the capabilities of a conference. See CAPABILITY_* constants of class Connection for valid values.

Parameters
connectionCapabilities int: A bitmask of the Capabilities of the conference call.

setConnectionTime

Added in API level 23
void setConnectionTime (long connectionTimeMillis)

Sets the connection start time of the Conference.

Parameters
connectionTimeMillis long: The connection time, in milliseconds.

setDialing

Added in API level 23
void setDialing ()

Sets state to be dialing.

setDisconnected

Added in API level 23
void setDisconnected (DisconnectCause disconnectCause)

Sets state to disconnected.

Parameters
disconnectCause DisconnectCause: The reason for the disconnection, as described by DisconnectCause.

setExtras

Added in API level 23
void setExtras (Bundle extras)

Replaces all the extras associated with this Conference.

New or existing keys are replaced in the Conference extras. Keys which are no longer in the new extras, but were present the last time setExtras was called are removed.

No assumptions should be made as to how an In-Call UI or service will handle these extras. Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.

Parameters
extras Bundle: The extras associated with this Conference.

setOnHold

Added in API level 23
void setOnHold ()

Sets state to be on hold.

setStatusHints

Added in API level 23
void setStatusHints (StatusHints statusHints)

Sets the label and icon status to display in the InCall UI.

Parameters
statusHints StatusHints: The status label and icon to set.

setVideoProvider

Added in API level 23
void setVideoProvider (Connection c, 
                Connection.VideoProvider videoProvider)

Sets the video connection provider.

Parameters
c Connection
videoProvider Connection.VideoProvider: The video provider.

setVideoState

Added in API level 23
void setVideoState (Connection c, 
                int videoState)

Set the video state for the conference. Valid values: STATE_AUDIO_ONLY, STATE_BIDIRECTIONAL, STATE_TX_ENABLED, STATE_RX_ENABLED.

Parameters
c Connection
videoState int: The new video state.

toString

Added in API level 23
String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

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

Returns
String a string representation of the object.

Hooray!