Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#inhmethods)

# MbmsGroupCallSession

*** ** * ** ***

` public class MbmsGroupCallSession `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/java/lang/AutoCloseable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telephony.MbmsGroupCallSession |

<br />

*** ** * ** ***

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

## Summary

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#close()() ` Terminates this instance. |
| ` static https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` | ` https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#create(android.content.Context,%20int,%20java.util.concurrent.Executor,%20android.telephony.mbms.MbmsGroupCallSessionCallback)(https://developer.android.com/reference/android/content/Context context, int subscriptionId, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/mbms/MbmsGroupCallSessionCallback callback) ` Create a new `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` using the given subscription ID. |
| ` static https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` | ` https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#create(android.content.Context,%20java.util.concurrent.Executor,%20android.telephony.mbms.MbmsGroupCallSessionCallback)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/mbms/MbmsGroupCallSessionCallback callback) ` Create a new `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` using the system default data subscription ID. |
| ` https://developer.android.com/reference/android/telephony/mbms/GroupCall` | ` https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#startGroupCall(long,%20java.util.List<java.lang.Integer>,%20java.util.List<java.lang.Integer>,%20java.util.concurrent.Executor,%20android.telephony.mbms.GroupCallCallback)(long tmgi, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/Integer> saiList, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/Integer> frequencyList, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/mbms/GroupCallCallback callback) ` Starts the requested group call, reporting status to the indicated callback. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/java/lang/AutoCloseable ` ` abstract void` ` https://developer.android.com/reference/java/lang/AutoCloseable#close()() `

Closes this resource, relinquishing any underlying resources.

## Public methods

### close

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void close ()
```

Terminates this instance. Also terminates any group calls spawned from this instance as if `https://developer.android.com/reference/android/telephony/mbms/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 `https://developer.android.com/reference/android/telephony/mbms/MbmsGroupCallSessionCallback`, but callbacks that have already been enqueued will still be delivered. It is safe to call `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#create(android.content.Context,%20int,%20java.util.concurrent.Executor,%20android.telephony.mbms.MbmsGroupCallSessionCallback)` to obtain another instance of `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` immediately after this method returns. May throw an `https://developer.android.com/reference/java/lang/IllegalStateException`

<br />

### create

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

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

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The `https://developer.android.com/reference/android/content/Context` to use. This value cannot be `null`. <br /> |
| `subscriptionId` | `int`: The subscription ID to use. <br /> |
| `executor` | `Executor`: The executor on which you wish to execute callbacks. This value cannot be `null`. <br /> |
| `callback` | `MbmsGroupCallSessionCallback`: A callback object on which you wish to receive results of asynchronous operations. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` | An instance of `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession`, or null if an error occurred. <br /> |

### create

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Create a new `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` using the system default data subscription ID. See `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession#create(android.content.Context,%20int,%20java.util.concurrent.Executor,%20android.telephony.mbms.MbmsGroupCallSessionCallback)`.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |
| `executor` | `Executor`: This value cannot be `null`. <br /> |
| `callback` | `MbmsGroupCallSessionCallback`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/MbmsGroupCallSession` | This value may be `null`. <br /> |

### startGroupCall

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 `https://developer.android.com/reference/java/lang/IllegalArgumentException` or an `https://developer.android.com/reference/java/lang/IllegalStateException` Asynchronous errors through the callback include any of the errors in `https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors`.

<br />

| Parameters ||
|---|---|
| `tmgi` | `long`: The TMGI, an identifier for the group call you want to join. <br /> |
| `saiList` | `List`: A list of SAIs for the group call that should be negotiated separately with the carrier. This value cannot be `null`. <br /> |
| `frequencyList` | `List`: A lost of frequencies for the group call that should be negotiated separately with the carrier. This value cannot be `null`. <br /> |
| `executor` | `Executor`: The executor on which you wish to execute callbacks for this stream. This value cannot be `null`. <br /> |
| `callback` | `GroupCallCallback`: The callback that you want to receive information about the call on. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/mbms/GroupCall` | An instance of `https://developer.android.com/reference/android/telephony/mbms/GroupCall` through which the call can be controlled. May be `null` if an error occurred. <br /> |