Android APIs
public abstract class

Conference

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

Class Overview

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()
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()
Invoked when the child calls should be merged.
void onMerge(Connection connection)
Invoked when the specified Connection should merged with the conference call.
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)
Set some extras that can be 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 containing a concise, human-readable description of this object.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final long CONNECT_TIME_NOT_SPECIFIED

Added in API level 23

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

public Conference (PhoneAccountHandle phoneAccount)

Added in API level 23

Constructs a new Conference with a mandatory PhoneAccountHandle

Parameters
phoneAccount The PhoneAccountHandle associated with the conference.

Public Methods

public final boolean addConnection (Connection connection)

Added in API level 23

Adds the specified connection as a child of this conference.

Parameters
connection The connection to add.
Returns
  • True if the connection was successfully added.

public final void destroy ()

Added in API level 23

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

public final CallAudioState getCallAudioState ()

Added in API level 23

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

public final List<Connection> getConferenceableConnections ()

Added in API level 23

Returns the connections with which this connection can be conferenced.

public final int getConnectionCapabilities ()

Added in API level 23

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

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

public final long getConnectionTime ()

Added in API level 23

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
  • The time at which the Conference was connected.

public final List<Connection> getConnections ()

Added in API level 23

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

Returns
  • A list of Connection objects which represent the children of the conference.

public final DisconnectCause getDisconnectCause ()

Added in API level 23

Returns

public final Bundle getExtras ()

Added in API level 23

Returns
  • The extras associated with this conference.

public final PhoneAccountHandle getPhoneAccountHandle ()

Added in API level 23

Returns the PhoneAccountHandle the conference call is being placed through.

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

public final int getState ()

Added in API level 23

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

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

public final StatusHints getStatusHints ()

Added in API level 23

Returns
  • The status hints for this conference.

public Connection.VideoProvider getVideoProvider ()

Added in API level 23

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

public int getVideoState ()

Added in API level 23

Returns video state of the primary call.

public void onCallAudioStateChanged (CallAudioState state)

Added in API level 23

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

Parameters
state The new call audio state.

public void onConnectionAdded (Connection connection)

Added in API level 23

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

Parameters
connection The newly added connection.

public void onDisconnect ()

Added in API level 23

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

public void onHold ()

Added in API level 23

Invoked when the conference should be put on hold.

public void onMerge ()

Added in API level 23

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

public void onMerge (Connection connection)

Added in API level 23

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

Parameters
connection The Connection to merge.

public void onPlayDtmfTone (char c)

Added in API level 23

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

Parameters
c A DTMF character.

public void onSeparate (Connection connection)

Added in API level 23

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

Parameters
connection The connection to separate.

public void onStopDtmfTone ()

Added in API level 23

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

public void onSwap ()

Added in API level 23

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

public void onUnhold ()

Added in API level 23

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

public final void removeConnection (Connection connection)

Added in API level 23

Removes the specified connection as a child of this conference.

Parameters
connection The connection to remove.

public final void setActive ()

Added in API level 23

Sets state to be active.

public final void setConferenceableConnections (List<Connection> conferenceableConnections)

Added in API level 23

Sets the connections with which this connection can be conferenced.

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

public final void setConnectionCapabilities (int connectionCapabilities)

Added in API level 23

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

Parameters
connectionCapabilities A bitmask of the PhoneCapabilities of the conference call.

public final void setConnectionTime (long connectionTimeMillis)

Added in API level 23

Sets the connection start time of the Conference.

Parameters
connectionTimeMillis The connection time, in milliseconds.

public final void setDialing ()

Added in API level 23

Sets state to be dialing.

public final void setDisconnected (DisconnectCause disconnectCause)

Added in API level 23

Sets state to disconnected.

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

public final void setExtras (Bundle extras)

Added in API level 23

Set some extras that can be associated with this Conference. 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 The extras associated with this Connection.

public final void setOnHold ()

Added in API level 23

Sets state to be on hold.

public final void setStatusHints (StatusHints statusHints)

Added in API level 23

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

Parameters
statusHints The status label and icon to set.

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

Added in API level 23

Sets the video connection provider.

Parameters
videoProvider The video provider.

public final void setVideoState (Connection c, int videoState)

Added in API level 23

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

Parameters
videoState The new video state.

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.