Added in API level 29

MbmsGroupCallSession


public class MbmsGroupCallSession
extends Object implements AutoCloseable

java.lang.Object
   ↳ android.telephony.MbmsGroupCallSession


This class provides functionality for accessing group call functionality over MBMS.

Summary

Public methods

void close()

Terminates this instance.

static MbmsGroupCallSession create(Context context, int subscriptionId, Executor executor, MbmsGroupCallSessionCallback callback)

Create a new MbmsGroupCallSession using the given subscription ID.

static MbmsGroupCallSession create(Context context, Executor executor, MbmsGroupCallSessionCallback callback)

Create a new MbmsGroupCallSession using the system default data subscription ID.

GroupCall startGroupCall(long tmgi, List<Integer> saiList, List<Integer> frequencyList, Executor executor, GroupCallCallback callback)

Starts the requested group call, reporting status to the indicated callback.

Inherited methods

Public methods

close

Added in API level 29
public void close ()

Terminates this instance. Also terminates any group calls spawned from this instance as if GroupCall#close() had been called on them. After this method returns, no further callbacks originating from the middleware will be enqueued on the provided instance of MbmsGroupCallSessionCallback, but callbacks that have already been enqueued will still be delivered. It is safe to call create(android.content.Context, int, java.util.concurrent.Executor, android.telephony.mbms.MbmsGroupCallSessionCallback) to obtain another instance of MbmsGroupCallSession immediately after this method returns. May throw an IllegalStateException

create

Added in API level 29
public static MbmsGroupCallSession create (Context context, 
                int subscriptionId, 
                Executor executor, 
                MbmsGroupCallSessionCallback callback)

Create a new MbmsGroupCallSession using the given subscription ID. You may only have one instance of MbmsGroupCallSession per UID. If you call this method while there is an active instance of MbmsGroupCallSession in your process (in other words, one that has not had close() called on it), this method will throw an IllegalStateException. If you call this method in a different process running under the same UID, an error will be indicated via MbmsGroupCallSessionCallback#onError(int, String). Note that initialization may fail asynchronously. If you wish to try again after you receive such an asynchronous error, you must call close() on the instance of MbmsGroupCallSession that you received before calling this method again.

Parameters
context Context: The Context to use. This value cannot be null.

subscriptionId int: The subscription ID to use.

executor Executor: The executor on which you wish to execute callbacks. This value cannot be null.

callback MbmsGroupCallSessionCallback: A callback object on which you wish to receive results of asynchronous operations. This value cannot be null.

Returns
MbmsGroupCallSession An instance of MbmsGroupCallSession, or null if an error occurred.

create

Added in API level 29
public static MbmsGroupCallSession create (Context context, 
                Executor executor, 
                MbmsGroupCallSessionCallback callback)

Create a new MbmsGroupCallSession using the system default data subscription ID. See create(android.content.Context, int, java.util.concurrent.Executor, android.telephony.mbms.MbmsGroupCallSessionCallback).

Parameters
context Context: This value cannot be null.

executor Executor: This value cannot be null.

callback MbmsGroupCallSessionCallback: This value cannot be null.

Returns
MbmsGroupCallSession This value may be null.

startGroupCall

Added in API level 29
public GroupCall startGroupCall (long tmgi, 
                List<Integer> saiList, 
                List<Integer> frequencyList, 
                Executor executor, 
                GroupCallCallback callback)

Starts the requested group call, reporting status to the indicated callback. Returns an object used to control that call. May throw an IllegalArgumentException or an IllegalStateException Asynchronous errors through the callback include any of the errors in MbmsErrors.GeneralErrors.

Parameters
tmgi long: The TMGI, an identifier for the group call you want to join.

saiList List: A list of SAIs for the group call that should be negotiated separately with the carrier. This value cannot be null.

frequencyList List: A lost of frequencies for the group call that should be negotiated separately with the carrier. This value cannot be null.

executor Executor: The executor on which you wish to execute callbacks for this stream. This value cannot be null.

callback GroupCallCallback: The callback that you want to receive information about the call on. This value cannot be null.

Returns
GroupCall An instance of GroupCall through which the call can be controlled. May be null if an error occurred.