@UnstableApi
class SessionError


Provides information about a session error.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = TYPE_USE)
@IntDef(value = )
annotation SessionError.Code

Info and error result codes.

Constants

const Int

Error code representing that an argument is illegal.

const Int

Error code representing that the command cannot be completed because the current state is not valid for the command.

const Int

Error code representing that a file or network related error happened.

const Int

Error code representing that the command is not supported.

const Int

Error code representing that the command is not allowed.

const Int

Error code representing that the authentication has expired.

const Int

Error code representing that too many concurrent streams are detected.

const Int

Error code representing that the requested content is already playing.

const Int

Error code representing that the session and controller were disconnected.

const Int

Error code representing that navigation failed because the the playlist was exhausted.

const Int

Error code representing that the content is blocked due to being regionally unavailable.

const Int

Error code representing that the content is blocked due to parental controls.

const Int

Error code representing that a premium account is required.

const Int

Error code representing that the session needs user's manual intervention.

const Int

Error code representing that the application cannot skip any more because the skip limit is reached.

const Int

Error code representing that the command is ended with an unknown error.

const Int

Info code representing that the command was cancelled.

Public constructors

Creates an instance with an empty extras bundle.

SessionError(@SessionError.Code code: Int, message: String!, extras: Bundle!)

Creates an instance.

Public functions

Boolean
equals(o: Any?)

Checks the given error for equality while ignoring extras.

java-static SessionError!
fromBundle(bundle: Bundle!)

Restores a SessionError from a Bundle.

java-static String!

Returns the name of a given error code.

Int
Bundle!

Returns a Bundle representing the information stored in this object.

Constants

ERROR_BAD_VALUE

const val ERROR_BAD_VALUE = -3: Int

Error code representing that an argument is illegal.

ERROR_INVALID_STATE

const val ERROR_INVALID_STATE = -2: Int

Error code representing that the command cannot be completed because the current state is not valid for the command.

ERROR_IO

const val ERROR_IO = -5: Int

Error code representing that a file or network related error happened.

ERROR_NOT_SUPPORTED

const val ERROR_NOT_SUPPORTED = -6: Int

Error code representing that the command is not supported.

ERROR_PERMISSION_DENIED

const val ERROR_PERMISSION_DENIED = -4: Int

Error code representing that the command is not allowed.

ERROR_SESSION_AUTHENTICATION_EXPIRED

const val ERROR_SESSION_AUTHENTICATION_EXPIRED = -102: Int

Error code representing that the authentication has expired.

ERROR_SESSION_CONCURRENT_STREAM_LIMIT

const val ERROR_SESSION_CONCURRENT_STREAM_LIMIT = -104: Int

Error code representing that too many concurrent streams are detected.

ERROR_SESSION_CONTENT_ALREADY_PLAYING

const val ERROR_SESSION_CONTENT_ALREADY_PLAYING = -110: Int

Error code representing that the requested content is already playing.

ERROR_SESSION_DISCONNECTED

const val ERROR_SESSION_DISCONNECTED = -100: Int

Error code representing that the session and controller were disconnected.

ERROR_SESSION_END_OF_PLAYLIST

const val ERROR_SESSION_END_OF_PLAYLIST = -109: Int

Error code representing that navigation failed because the the playlist was exhausted.

ERROR_SESSION_NOT_AVAILABLE_IN_REGION

const val ERROR_SESSION_NOT_AVAILABLE_IN_REGION = -106: Int

Error code representing that the content is blocked due to being regionally unavailable.

ERROR_SESSION_PARENTAL_CONTROL_RESTRICTED

const val ERROR_SESSION_PARENTAL_CONTROL_RESTRICTED = -105: Int

Error code representing that the content is blocked due to parental controls.

ERROR_SESSION_PREMIUM_ACCOUNT_REQUIRED

const val ERROR_SESSION_PREMIUM_ACCOUNT_REQUIRED = -103: Int

Error code representing that a premium account is required.

ERROR_SESSION_SETUP_REQUIRED

const val ERROR_SESSION_SETUP_REQUIRED = -108: Int

Error code representing that the session needs user's manual intervention.

ERROR_SESSION_SKIP_LIMIT_REACHED

const val ERROR_SESSION_SKIP_LIMIT_REACHED = -107: Int

Error code representing that the application cannot skip any more because the skip limit is reached.

ERROR_UNKNOWN

const val ERROR_UNKNOWN = -1: Int

Error code representing that the command is ended with an unknown error.

INFO_CANCELLED

const val INFO_CANCELLED = 1: Int

Info code representing that the command was cancelled.

Public constructors

SessionError

SessionError(@SessionError.Code code: Int, message: String!)

Creates an instance with an empty extras bundle.

Parameters
@SessionError.Code code: Int

The error result code.

message: String!

The error message.

Throws
java.lang.IllegalArgumentException

if the result code is not an error result code.

SessionError

SessionError(@SessionError.Code code: Int, message: String!, extras: Bundle!)

Creates an instance.

Parameters
@SessionError.Code code: Int

The error result code.

message: String!

The error message.

extras: Bundle!

The error extras.

Throws
java.lang.IllegalArgumentException

if the result code is not an error result code.

Public functions

equals

fun equals(o: Any?): Boolean

Checks the given error for equality while ignoring extras.

fromBundle

java-static fun fromBundle(bundle: Bundle!): SessionError!

Restores a SessionError from a Bundle.

getErrorCodeName

java-static fun getErrorCodeName(@SessionError.Code errorCode: Int): String!

Returns the name of a given error code.

hashCode

fun hashCode(): Int

toBundle

fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

code

@SessionError.Code
val codeInt

extras

val extrasBundle!

message

val messageString!