lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey

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 int getConnectionProperties()

Returns the properties 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 the Conference that the getCallAudioState() property has a new value.

void onConnectionAdded(Connection connection)

Notifies the Conference that a Connection has been added to it.

void onDisconnect()

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

void onExtrasChanged(Bundle extras)

Notifies this Conference of a change to the extras made outside the ConnectionService.

void onHold()

Notifies the Conference when it should be put on hold.

void onMerge(Connection connection)

Notifies the Conference when the specified Connection should merged with the conference call.

void onMerge()

Notifies the Conference when the child calls should be merged.

void onPlayDtmfTone(char c)

Notifies the Conference of a request to play a DTMF tone.

void onSeparate(Connection connection)

Notifies the Conference when the specified Connection should be separated from the conference call.

void onStopDtmfTone()

Notifies the Conference of a request to stop any currently playing DTMF tones.

void onSwap()

Notifies the Conference when the child calls should be swapped.

void onUnhold()

Notifies the Conference when it should be moved from a held to active state.

final void putExtras(Bundle extras)

Adds some extras to this Conference.

final void removeConnection(Connection connection)

Removes the specified connection as a child of this conference.

final void removeExtras(List<String> keys)

Removes extras from this Conference.

final void removeExtras(String... keys)

Removes extras from 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 setConnectionProperties(int connectionProperties)

Sets the properties of a conference.

final void setConnectionStartElapsedRealTime(long connectionStartElapsedRealTime)

Sets the start time of the Conference which is the basis for the determining the duration of the 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

Constants

CONNECT_TIME_NOT_SPECIFIED

added in API level 23
public static final 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
public 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
public final 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
public final void destroy ()

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

getCallAudioState

added in API level 23
public final 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
public final List<Connection> getConferenceableConnections ()

Returns the connections with which this connection can be conferenced.

Returns
List<Connection>

getConnectionCapabilities

added in API level 23
public final 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.

getConnectionProperties

added in API level 25
public final int getConnectionProperties ()

Returns the properties of the conference. See PROPERTY_* constants in class Connection for valid values.

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

getConnectionTime

added in API level 23
public final 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
public final 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
public final DisconnectCause getDisconnectCause ()

Returns
DisconnectCause The DisconnectCause for this connection.

getExtras

added in API level 23
public final Bundle getExtras ()

Returns the extras associated with this conference.

Extras should be updated using putExtras(Bundle) and removeExtras(List).

Telecom or an InCallService can also update the extras via Call.putExtras(Bundle), and Call.removeExtras(List).

The conference is notified of changes to the extras made by Telecom or an InCallService by onExtrasChanged(Bundle).

Returns
Bundle The extras associated with this connection.

getPhoneAccountHandle

added in API level 23
public final 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
public final 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
public final StatusHints getStatusHints ()

Returns
StatusHints The status hints for this conference.

getVideoProvider

added in API level 23
public Connection.VideoProvider getVideoProvider ()

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

Returns
Connection.VideoProvider

getVideoState

added in API level 23
public int getVideoState ()

Returns video state of the primary call.

Returns
int

onCallAudioStateChanged

added in API level 23
public void onCallAudioStateChanged (CallAudioState state)

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

Parameters
state CallAudioState: The new call audio state.

onConnectionAdded

added in API level 23
public void onConnectionAdded (Connection connection)

Notifies the Conference that a Connection has been added to it.

Parameters
connection Connection: The newly added connection.

onDisconnect

added in API level 23
public void onDisconnect ()

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

onExtrasChanged

added in API level 25
public void onExtrasChanged (Bundle extras)

Notifies this Conference of a change to the extras made outside the ConnectionService.

These extras changes can originate from Telecom itself, or from an InCallService via Call.putExtras(Bundle), and Call.removeExtras(List).

Parameters
extras Bundle: The new extras bundle.

onHold

added in API level 23
public void onHold ()

Notifies the Conference when it should be put on hold.

onMerge

added in API level 23
public void onMerge (Connection connection)

Notifies the Conference when the specified Connection should merged with the conference call.

Parameters
connection Connection: The Connection to merge.

onMerge

added in API level 23
public void onMerge ()

Notifies the Conference when the child calls should be merged. Only invoked if the conference contains the capability Connection.CAPABILITY_MERGE_CONFERENCE.

onPlayDtmfTone

added in API level 23
public void onPlayDtmfTone (char c)

Notifies the Conference of a request to play a DTMF tone.

Parameters
c char: A DTMF character.

onSeparate

added in API level 23
public void onSeparate (Connection connection)

Notifies the Conference when the specified Connection should be separated from the conference call.

Parameters
connection Connection: The connection to separate.

onStopDtmfTone

added in API level 23
public void onStopDtmfTone ()

Notifies the Conference of a request to stop any currently playing DTMF tones.

onSwap

added in API level 23
public void onSwap ()

Notifies the Conference when the child calls should be swapped. Only invoked if the conference contains the capability Connection.CAPABILITY_SWAP_CONFERENCE.

onUnhold

added in API level 23
public void onUnhold ()

Notifies the Conference when it should be moved from a held to active state.

putExtras

added in API level 25
public final void putExtras (Bundle extras)

Adds some extras to this Conference. Existing keys are replaced and new ones are added.

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

This value must never be null.

removeConnection

added in API level 23
public final void removeConnection (Connection connection)

Removes the specified connection as a child of this conference.

Parameters
connection Connection: The connection to remove.

removeExtras

added in API level 25
public final void removeExtras (List<String> keys)

Removes extras from this Conference.

Parameters
keys List: The keys of the extras to remove.

removeExtras

added in API level 25
public final void removeExtras (String... keys)

Removes extras from this Conference.

Parameters
keys String: The keys of the extras to remove.

setActive

added in API level 23
public final void setActive ()

Sets state to be active.

setConferenceableConnections

added in API level 23
public final 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
public final 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.

setConnectionProperties

added in API level 25
public final void setConnectionProperties (int connectionProperties)

Sets the properties of a conference. See PROPERTY_* constants of class Connection for valid values.

Parameters
connectionProperties int: A bitmask of the Properties of the conference call.

setConnectionStartElapsedRealTime

added in API level 28
public final void setConnectionStartElapsedRealTime (long connectionStartElapsedRealTime)

Sets the start time of the Conference which is the basis for the determining the duration of the Conference.

You should use a value returned by SystemClock.elapsedRealtime() to ensure that time zone changes do not impact the conference duration.

When setting this, you should also set the connection time via setConnectionTime(long).

Parameters
connectionStartElapsedRealTime long: The connection time, as measured by SystemClock.elapsedRealtime().

setConnectionTime

added in API level 23
public final void setConnectionTime (long connectionTimeMillis)

Sets the connection start time of the Conference. This is used in the call log to indicate the date and time when the conference took place.

Should be specified in wall-clock time returned by System.currentTimeMillis().

When setting the connection time, you should always set the connection elapsed time via setConnectionStartElapsedRealTime(long) to ensure the duration is reflected.

Parameters
connectionTimeMillis long: The connection time, in milliseconds, as returned by System.currentTimeMillis().

setDialing

added in API level 23
public final void setDialing ()

Sets state to be dialing.

setDisconnected

added in API level 23
public final 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
public final 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.

Alternatively you may use the putExtras(Bundle), and removeExtras(String) methods to modify the extras.

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.extras.MY_EXTRA) to avoid conflicts.

Parameters
extras Bundle: The extras associated with this Conference.

This value may be null.

setOnHold

added in API level 23
public final void setOnHold ()

Sets state to be on hold.

setStatusHints

added in API level 23
public final 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
public final 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
public final void setVideoState (Connection c, 
                int videoState)

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

Parameters
c Connection

videoState int: The new video state.

toString

added in API level 23
public 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.