StreamingServiceCallback


public class StreamingServiceCallback
extends Object

java.lang.Object
   ↳ 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

int SIGNAL_STRENGTH_UNAVAILABLE

Indicates broadcast signal strength is not available for this service.

Public constructors

StreamingServiceCallback()

Public methods

void onBroadcastSignalStrengthUpdated(int signalStrength)

Broadcast Signal Strength updated.

void onError(int errorCode, String message)

Called by the middleware when it has detected an error condition in this stream.

void onMediaDescriptionUpdated()

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

void onStreamMethodUpdated(int methodType)

Notify of bcast/unicast method being used.

void onStreamStateUpdated(int state, int reason)

Called to indicate this stream has changed state.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(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(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()

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
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.

Constant Value: -1 (0xffffffff)

Public constructors

StreamingServiceCallback

public StreamingServiceCallback ()

Public methods

onBroadcastSignalStrengthUpdated

Added in API level 28
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 if broadcast is not available for this service due to timing, geography or popularity.

Parameters
signalStrength int

onError

Added in API level 28
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.

onMediaDescriptionUpdated

Added in API level 28
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.

onStreamMethodUpdated

Added in API level 28
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 and StreamingService.UNICAST_METHOD

Parameters
methodType int