# StreamingServiceCallback

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary: [Constants](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#constants) \| [Ctors](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#pubctors) \| [Methods](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#inhmethods)  

# StreamingServiceCallback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/telephony/mbms/StreamingServiceCallback "View this page in Kotlin") \|Java


`
public


class
StreamingServiceCallback
`


`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


`

`


`

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

<br />

*** ** * ** ***

A callback class for use when the application is actively streaming content. The middleware
will provide updates on the status of the stream via this callback.

## Summary

|                                                                                                          ### Constants                                                                                                           ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [SIGNAL_STRENGTH_UNAVAILABLE](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#SIGNAL_STRENGTH_UNAVAILABLE) Indicates broadcast signal strength is not available for this service. |

|                                                                  ### Public constructors                                                                  ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[StreamingServiceCallback](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#StreamingServiceCallback())`() ` |

|                                                                                                                                                        ### Public methods                                                                                                                                                        ||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onBroadcastSignalStrengthUpdated](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#onBroadcastSignalStrengthUpdated(int))`(int signalStrength) ` Broadcast Signal Strength updated.                                                                                          |
| ` void` | ` `[onError](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#onError(int,%20java.lang.String))`(int errorCode, `[String](https://developer.android.com/reference/java/lang/String)` message) ` Called by the middleware when it has detected an error condition in this stream. |
| ` void` | ` `[onMediaDescriptionUpdated](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#onMediaDescriptionUpdated())`() ` Called to indicate the mpd of a the stream has changed.                                                                                                        |
| ` void` | ` `[onStreamMethodUpdated](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#onStreamMethodUpdated(int))`(int methodType) ` Notify of bcast/unicast method being used.                                                                                                            |
| ` void` | ` `[onStreamStateUpdated](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#onStreamStateUpdated(int,%20int))`(int state, int reason) ` Called to indicate this stream has changed state.                                                                                         |

| ### Inherited methods |
|-----------------------|---|
| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                        | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                             | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`.                                                                                                                                                 | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                   | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                              | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                           | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                              | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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*.                                                                                             | ||

## Constants

### SIGNAL_STRENGTH_UNAVAILABLE

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

```
public static final int SIGNAL_STRENGTH_UNAVAILABLE
```

Indicates broadcast signal strength is not available for this service.

This may be due to the service no longer being available due to geography
or timing (end of service) or because lack of demand has caused the service
to be delivered via unicast.

<br />

Constant Value:

-1
(0xffffffff)


## Public constructors

### StreamingServiceCallback

```
public StreamingServiceCallback ()
```

<br />

<br />

## Public methods

### onBroadcastSignalStrengthUpdated

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

```
public void onBroadcastSignalStrengthUpdated (int signalStrength)
```

Broadcast Signal Strength updated.

This signal strength is the BROADCAST signal strength which,
depending on technology in play and it's deployment, may be
stronger or weaker than the traditional UNICAST signal
strength. It a simple int from 0-4 for valid levels or
[SIGNAL_STRENGTH_UNAVAILABLE](https://developer.android.com/reference/android/telephony/mbms/StreamingServiceCallback#SIGNAL_STRENGTH_UNAVAILABLE) if broadcast is not available
for this service due to timing, geography or popularity.

<br />

|           Parameters           ||
|------------------|--------------|
| `signalStrength` | `int` <br /> |

### onError

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

```
public void onError (int errorCode, 
                String message)
```

Called by the middleware when it has detected an error condition in this stream. The
possible error codes are listed in [MbmsErrors](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors).

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ||
|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `errorCode` | `int`: The error code. Value is [MbmsErrors.ERROR_NO_UNIQUE_MIDDLEWARE](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors#ERROR_NO_UNIQUE_MIDDLEWARE), [MbmsErrors.ERROR_MIDDLEWARE_LOST](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors#ERROR_MIDDLEWARE_LOST), [MbmsErrors.ERROR_MIDDLEWARE_NOT_BOUND](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors#ERROR_MIDDLEWARE_NOT_BOUND), [MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_NOT_YET_READY](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors#ERROR_MIDDLEWARE_NOT_YET_READY), [MbmsErrors.GeneralErrors.ERROR_OUT_OF_MEMORY](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors#ERROR_OUT_OF_MEMORY), [MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors#ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE), [MbmsErrors.GeneralErrors.ERROR_IN_E911](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors#ERROR_IN_E911), [MbmsErrors.GeneralErrors.ERROR_NOT_CONNECTED_TO_HOME_CARRIER_LTE](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors#ERROR_NOT_CONNECTED_TO_HOME_CARRIER_LTE), [MbmsErrors.GeneralErrors.ERROR_UNABLE_TO_READ_SIM](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors#ERROR_UNABLE_TO_READ_SIM), [MbmsErrors.GeneralErrors.ERROR_CARRIER_CHANGE_NOT_ALLOWED](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.GeneralErrors#ERROR_CARRIER_CHANGE_NOT_ALLOWED), [MbmsErrors.StreamingErrors.ERROR_CONCURRENT_SERVICE_LIMIT_REACHED](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.StreamingErrors#ERROR_CONCURRENT_SERVICE_LIMIT_REACHED), [MbmsErrors.StreamingErrors.ERROR_UNABLE_TO_START_SERVICE](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.StreamingErrors#ERROR_UNABLE_TO_START_SERVICE), or [MbmsErrors.StreamingErrors.ERROR_DUPLICATE_START_STREAM](https://developer.android.com/reference/android/telephony/mbms/MbmsErrors.StreamingErrors#ERROR_DUPLICATE_START_STREAM) <br /> |
| `message`   | `String`: A human-readable message generated by the middleware for debugging purposes. This value may be `null`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

### onMediaDescriptionUpdated

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

```
public void onMediaDescriptionUpdated ()
```

Called to indicate the mpd of a the stream has changed.

Depending on the Dash Client it may need to be either reset
(less drastic, but original spec didn't allow mpd to change so not
always supported) or restarted.

This may be called when a looping stream hits the end or
when parameters have changed to account for time drift.

<br />

### onStreamMethodUpdated

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

```
public void onStreamMethodUpdated (int methodType)
```

Notify of bcast/unicast method being used.

This is intended to be informational. Indicates
whether we're able to use cell broadcast or have
had to fallback to unicast for this stream.

This must be called once at the beginning of the stream
around the same time as we change to STATE_STARTED, but
strict ordering is not specified. It must be called
again if we change modes, but if that doesn't happen
the callback won't be used again.

See [StreamingService.BROADCAST_METHOD](https://developer.android.com/reference/android/telephony/mbms/StreamingService#BROADCAST_METHOD) and
[StreamingService.UNICAST_METHOD](https://developer.android.com/reference/android/telephony/mbms/StreamingService#UNICAST_METHOD)

<br />

|         Parameters         ||
|--------------|--------------|
| `methodType` | `int` <br /> |

### onStreamStateUpdated

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

```
public void onStreamStateUpdated (int state, 
                int reason)
```

Called to indicate this stream has changed state.

See [StreamingService.STATE_STOPPED](https://developer.android.com/reference/android/telephony/mbms/StreamingService#STATE_STOPPED), [StreamingService.STATE_STARTED](https://developer.android.com/reference/android/telephony/mbms/StreamingService#STATE_STARTED)
and [StreamingService.STATE_STALLED](https://developer.android.com/reference/android/telephony/mbms/StreamingService#STATE_STALLED).

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `state`  | `int`: Value is [StreamingService.STATE_STOPPED](https://developer.android.com/reference/android/telephony/mbms/StreamingService#STATE_STOPPED), [StreamingService.STATE_STARTED](https://developer.android.com/reference/android/telephony/mbms/StreamingService#STATE_STARTED), or [StreamingService.STATE_STALLED](https://developer.android.com/reference/android/telephony/mbms/StreamingService#STATE_STALLED) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `reason` | `int`: Value is [StreamingService.REASON_BY_USER_REQUEST](https://developer.android.com/reference/android/telephony/mbms/StreamingService#REASON_BY_USER_REQUEST), [StreamingService.REASON_END_OF_SESSION](https://developer.android.com/reference/android/telephony/mbms/StreamingService#REASON_END_OF_SESSION), [StreamingService.REASON_FREQUENCY_CONFLICT](https://developer.android.com/reference/android/telephony/mbms/StreamingService#REASON_FREQUENCY_CONFLICT), [StreamingService.REASON_OUT_OF_MEMORY](https://developer.android.com/reference/android/telephony/mbms/StreamingService#REASON_OUT_OF_MEMORY), [StreamingService.REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE](https://developer.android.com/reference/android/telephony/mbms/StreamingService#REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE), [StreamingService.REASON_LEFT_MBMS_BROADCAST_AREA](https://developer.android.com/reference/android/telephony/mbms/StreamingService#REASON_LEFT_MBMS_BROADCAST_AREA), or [StreamingService.REASON_NONE](https://developer.android.com/reference/android/telephony/mbms/StreamingService#REASON_NONE) <br /> |