Added in API level 29

MbmsGroupCallSession


open class MbmsGroupCallSession : AutoCloseable
kotlin.Any
   ↳ android.telephony.MbmsGroupCallSession

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

Summary

Public methods
open Unit

Terminates this instance.

open static MbmsGroupCallSession?
create(context: Context, subscriptionId: Int, executor: Executor, callback: MbmsGroupCallSessionCallback)

Create a new MbmsGroupCallSession using the given subscription ID.

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

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

open GroupCall?
startGroupCall(tmgi: Long, saiList: MutableList<Int!>, frequencyList: MutableList<Int!>, executor: Executor, callback: GroupCallCallback)

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

Public methods

close

Added in API level 29
open fun close(): Unit

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

Exceptions
java.lang.Exception if this resource cannot be closed

create

Added in API level 29
open static fun create(
    context: Context,
    subscriptionId: Int,
    executor: Executor,
    callback: MbmsGroupCallSessionCallback
): MbmsGroupCallSession?

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.
Return
MbmsGroupCallSession? An instance of MbmsGroupCallSession, or null if an error occurred.

create

Added in API level 29
open static fun create(
    context: Context,
    executor: Executor,
    callback: MbmsGroupCallSessionCallback
): MbmsGroupCallSession?

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.
Return
MbmsGroupCallSession? This value may be null.

startGroupCall

Added in API level 29
open fun startGroupCall(
    tmgi: Long,
    saiList: MutableList<Int!>,
    frequencyList: MutableList<Int!>,
    executor: Executor,
    callback: GroupCallCallback
): GroupCall?

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 MutableList<Int!>: A list of SAIs for the group call that should be negotiated separately with the carrier. This value cannot be null.
frequencyList MutableList<Int!>: 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.
Return
GroupCall? An instance of GroupCall through which the call can be controlled. May be null if an error occurred.