Added in API level 29

Result


class Result
kotlin.Any
   ↳ android.media.Session2Command.Result

This API is not generally intended for third party application developers. Use the AndroidX Media2 session Library for consistent behavior across all devices.

Contains the result of Session2Command.

Summary

Constants
static Int

Result code represents that call is ended with an unknown error.

static Int

Result code representing that the command is skipped or canceled.

static Int

Result code representing that the command is successfully completed.

Public constructors
Result(resultCode: Int, resultData: Bundle?)

Constructor of Result.

Public methods
Int

Returns the result code.

Bundle?

Returns the result data.

Constants

RESULT_ERROR_UNKNOWN_ERROR

Added in API level 29
static val RESULT_ERROR_UNKNOWN_ERROR: Int

Result code represents that call is ended with an unknown error.

Value: -1

RESULT_INFO_SKIPPED

Added in API level 29
static val RESULT_INFO_SKIPPED: Int

Result code representing that the command is skipped or canceled. For an example, a seek command can be skipped if it is followed by another seek command.

Value: 1

RESULT_SUCCESS

Added in API level 29
static val RESULT_SUCCESS: Int

Result code representing that the command is successfully completed.

Value: 0

Public constructors

Result

Added in API level 29
Result(
    resultCode: Int,
    resultData: Bundle?)

Constructor of Result.

Parameters
resultCode Int: result code
resultData Bundle?: result data This value may be null.

Public methods

getResultCode

Added in API level 29
fun getResultCode(): Int

Returns the result code.

getResultData

Added in API level 29
fun getResultData(): Bundle?

Returns the result data.

Return
Bundle? This value may be null.