Session2Command.Result


public static final class Session2Command.Result
extends Object

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

int RESULT_ERROR_UNKNOWN_ERROR

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

int RESULT_INFO_SKIPPED

Result code representing that the command is skipped or canceled.

int RESULT_SUCCESS

Result code representing that the command is successfully completed.

Public constructors

Result(int resultCode, Bundle resultData)

Constructor of Result.

Public methods

int getResultCode()

Returns the result code.

Bundle getResultData()

Returns the result data.

Inherited methods

Constants

RESULT_ERROR_UNKNOWN_ERROR

Added in API level 29
public static final int RESULT_ERROR_UNKNOWN_ERROR

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

Constant Value: -1 (0xffffffff)

RESULT_INFO_SKIPPED

Added in API level 29
public static final int RESULT_INFO_SKIPPED

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.

Constant Value: 1 (0x00000001)

RESULT_SUCCESS

Added in API level 29
public static final int RESULT_SUCCESS

Result code representing that the command is successfully completed.

Constant Value: 0 (0x00000000)

Public constructors

Result

Added in API level 29
public Result (int resultCode, 
                Bundle resultData)

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
public int getResultCode ()

Returns the result code.

Returns
int

getResultData

Added in API level 29
public Bundle getResultData ()

Returns the result data.

Returns
Bundle This value may be null.