StreamingService


public class StreamingService
extends Object implements AutoCloseable

java.lang.Object
   ↳ android.telephony.mbms.StreamingService


Class used to represent a single MBMS stream. After a stream has been started with MbmsStreamingSession.startStreaming(StreamingServiceInfo, java.util.concurrent.Executor, StreamingServiceCallback), this class is used to hold information about the stream and control it.

Summary

Constants

int BROADCAST_METHOD

The method of transmission currently used for a stream, reported via StreamingServiceCallback.onStreamMethodUpdated

int REASON_BY_USER_REQUEST

State changed due to a call to close() or MbmsStreamingSession.startStreaming(StreamingServiceInfo, java.util.concurrent.Executor, StreamingServiceCallback)

int REASON_END_OF_SESSION

State changed due to the streaming session ending at the carrier.

int REASON_FREQUENCY_CONFLICT

State changed due to a frequency conflict with another requested stream.

int REASON_LEFT_MBMS_BROADCAST_AREA

State changed due to the device leaving the where this stream is being broadcast.

int REASON_NONE

Indicates that the middleware does not have a reason to provide for the state change.

int REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE

State changed due to the device leaving the home carrier's LTE network.

int REASON_OUT_OF_MEMORY

State changed due to the middleware running out of memory

int STATE_STALLED

int STATE_STARTED

int STATE_STOPPED

int UNICAST_METHOD

Public methods

void close()

Stop streaming this service.

StreamingServiceInfo getInfo()

Retrieve the StreamingServiceInfo corresponding to this stream.

Uri getPlaybackUri()

Retrieve the Uri used to play this stream.

Inherited methods

Constants

BROADCAST_METHOD

Added in API level 28
public static final int BROADCAST_METHOD

The method of transmission currently used for a stream, reported via StreamingServiceCallback.onStreamMethodUpdated

Constant Value: 1 (0x00000001)

REASON_BY_USER_REQUEST

Added in API level 28
public static final int REASON_BY_USER_REQUEST

State changed due to a call to close() or MbmsStreamingSession.startStreaming(StreamingServiceInfo, java.util.concurrent.Executor, StreamingServiceCallback)

Constant Value: 1 (0x00000001)

REASON_END_OF_SESSION

Added in API level 28
public static final int REASON_END_OF_SESSION

State changed due to the streaming session ending at the carrier.

Constant Value: 2 (0x00000002)

REASON_FREQUENCY_CONFLICT

Added in API level 28
public static final int REASON_FREQUENCY_CONFLICT

State changed due to a frequency conflict with another requested stream.

Constant Value: 3 (0x00000003)

REASON_LEFT_MBMS_BROADCAST_AREA

Added in API level 28
public static final int REASON_LEFT_MBMS_BROADCAST_AREA

State changed due to the device leaving the where this stream is being broadcast.

Constant Value: 6 (0x00000006)

REASON_NONE

Added in API level 28
public static final int REASON_NONE

Indicates that the middleware does not have a reason to provide for the state change.

Constant Value: 0 (0x00000000)

REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE

Added in API level 28
public static final int REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE

State changed due to the device leaving the home carrier's LTE network.

Constant Value: 5 (0x00000005)

REASON_OUT_OF_MEMORY

Added in API level 28
public static final int REASON_OUT_OF_MEMORY

State changed due to the middleware running out of memory

Constant Value: 4 (0x00000004)

STATE_STALLED

Added in API level 28
public static final int STATE_STALLED

Constant Value: 3 (0x00000003)

STATE_STARTED

Added in API level 28
public static final int STATE_STARTED

Constant Value: 2 (0x00000002)

STATE_STOPPED

Added in API level 28
public static final int STATE_STOPPED

Constant Value: 1 (0x00000001)

UNICAST_METHOD

Added in API level 28
public static final int UNICAST_METHOD

Constant Value: 2 (0x00000002)

Public methods

close

Added in API level 28
public void close ()

Stop streaming this service. Further operations on this object will fail with an IllegalStateException. May throw an IllegalArgumentException or an IllegalStateException

getInfo

Added in API level 28
public StreamingServiceInfo getInfo ()

Retrieve the StreamingServiceInfo corresponding to this stream.

Returns
StreamingServiceInfo

getPlaybackUri

Added in API level 28
public Uri getPlaybackUri ()

Retrieve the Uri used to play this stream. May throw an IllegalArgumentException or an IllegalStateException.

Returns
Uri The Uri to pass to the streaming client, or null if an error occurred.