StreamingServiceCallback
open class StreamingServiceCallback
kotlin.Any | |
↳ | android.telephony.mbms.StreamingServiceCallback |
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 | |
---|---|
static Int |
Indicates broadcast signal strength is not available for this service. |
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
onBroadcastSignalStrengthUpdated(signalStrength: Int) Broadcast Signal Strength updated. |
open Unit |
Called by the middleware when it has detected an error condition in this stream. |
open Unit |
Called to indicate the mpd of a the stream has changed. |
open Unit |
onStreamMethodUpdated(methodType: Int) Notify of bcast/unicast method being used. |
open Unit |
onStreamStateUpdated(state: Int, reason: Int) Called to indicate this stream has changed state. |
Constants
SIGNAL_STRENGTH_UNAVAILABLE
static val SIGNAL_STRENGTH_UNAVAILABLE: Int
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.
Value: -1
Public constructors
StreamingServiceCallback
StreamingServiceCallback()
Public methods
onBroadcastSignalStrengthUpdated
open fun onBroadcastSignalStrengthUpdated(signalStrength: Int): Unit
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
if broadcast is not available for this service due to timing, geography or popularity.
onError
open fun onError(
errorCode: Int,
message: String?
): Unit
Called by the middleware when it has detected an error condition in this stream. The possible error codes are listed in MbmsErrors
.
onMediaDescriptionUpdated
open fun onMediaDescriptionUpdated(): Unit
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.
onStreamMethodUpdated
open fun onStreamMethodUpdated(methodType: Int): Unit
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
and StreamingService#UNICAST_METHOD
onStreamStateUpdated
open fun onStreamStateUpdated(
state: Int,
reason: Int
): Unit
Called to indicate this stream has changed state. See StreamingService#STATE_STOPPED
, StreamingService#STATE_STARTED
and StreamingService#STATE_STALLED
.