Added in API level 28

StreamingService

open class StreamingService : AutoCloseable
kotlin.Any
   ↳ 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,, this class is used to hold information about the stream and control it.

Summary

Constants
static Int

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

static Int

State changed due to a call to close() or MbmsStreamingSession#startStreaming(StreamingServiceInfo,

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

State changed due to the middleware running out of memory

static Int

static Int

static Int

static Int

Public methods
open Unit

Stop streaming this service.

open StreamingServiceInfo!

Retrieve the StreamingServiceInfo corresponding to this stream.

open Uri?

Retrieve the Uri used to play this stream.

Constants

BROADCAST_METHOD

Added in API level 28
static val BROADCAST_METHOD: Int

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

Value: 1

REASON_BY_USER_REQUEST

Added in API level 28
static val REASON_BY_USER_REQUEST: Int

State changed due to a call to close() or MbmsStreamingSession#startStreaming(StreamingServiceInfo,

Value: 1

REASON_END_OF_SESSION

Added in API level 28
static val REASON_END_OF_SESSION: Int

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

Value: 2

REASON_FREQUENCY_CONFLICT

Added in API level 28
static val REASON_FREQUENCY_CONFLICT: Int

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

Value: 3

REASON_LEFT_MBMS_BROADCAST_AREA

Added in API level 28
static val REASON_LEFT_MBMS_BROADCAST_AREA: Int

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

Value: 6

REASON_NONE

Added in API level 28
static val REASON_NONE: Int

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

Value: 0

REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE

Added in API level 28
static val REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE: Int

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

Value: 5

REASON_OUT_OF_MEMORY

Added in API level 28
static val REASON_OUT_OF_MEMORY: Int

State changed due to the middleware running out of memory

Value: 4

STATE_STALLED

Added in API level 28
static val STATE_STALLED: Int
Value: 3

STATE_STARTED

Added in API level 28
static val STATE_STARTED: Int
Value: 2

STATE_STOPPED

Added in API level 28
static val STATE_STOPPED: Int
Value: 1

UNICAST_METHOD

Added in API level 28
static val UNICAST_METHOD: Int
Value: 2

Public methods

close

Added in API level 28
open fun close(): Unit

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

Exceptions
java.lang.Exception if this resource cannot be closed

getInfo

Added in API level 28
open fun getInfo(): StreamingServiceInfo!

Retrieve the StreamingServiceInfo corresponding to this stream.

getPlaybackUri

Added in API level 28
open fun getPlaybackUri(): Uri?

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

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