Stay organized with collections
Save and categorize content based on your preferences.
Session2Command.Result
public
static
final
class
Session2Command.Result
extends Object
This API is not generally intended for third party application developers.
Use the AndroidX
Media3 session
Library for consistent behavior across all devices.
Contains the result of Session2Command
.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Constants
RESULT_ERROR_UNKNOWN_ERROR
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
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
public static final int RESULT_SUCCESS
Result code representing that the command is successfully completed.
Constant Value:
0
(0x00000000)
Public constructors
Result
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
public int getResultCode ()
Returns the result code.
getResultData
public Bundle getResultData ()
Returns the result data.
Returns |
Bundle |
This value may be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Session2Command.Result\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Constants](#constants) \\| [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nSession2Command.Result\n======================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/Session2Command.Result \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\nfinal\n\nclass\nSession2Command.Result\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| โณ | android.media.Session2Command.Result |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis API is not generally intended for third party application developers.\nUse the [AndroidX](/jetpack/androidx)\n[Media3 session\nLibrary](/media/media3/session/control-playback) for consistent behavior across all devices.\n\n\nContains the result of [Session2Command](/reference/android/media/Session2Command).\n\nSummary\n-------\n\n| ### Constants ||\n|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [RESULT_ERROR_UNKNOWN_ERROR](/reference/android/media/Session2Command.Result#RESULT_ERROR_UNKNOWN_ERROR) Result code represents that call is ended with an unknown error. |\n| `int` | [RESULT_INFO_SKIPPED](/reference/android/media/Session2Command.Result#RESULT_INFO_SKIPPED) Result code representing that the command is skipped or canceled. |\n| `int` | [RESULT_SUCCESS](/reference/android/media/Session2Command.Result#RESULT_SUCCESS) Result code representing that the command is successfully completed. |\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[Result](/reference/android/media/Session2Command.Result#Result(int,%20android.os.Bundle))`(int resultCode, `[Bundle](/reference/android/os/Bundle)` resultData) ` Constructor of [Result](/reference/android/media/Session2Command.Result). |\n\n| ### Public methods ||\n|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| ` int` | ` `[getResultCode](/reference/android/media/Session2Command.Result#getResultCode())`() ` Returns the result code. |\n| ` `[Bundle](/reference/android/os/Bundle) | ` `[getResultData](/reference/android/media/Session2Command.Result#getResultData())`() ` Returns the result data. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nConstants\n---------\n\n### RESULT_ERROR_UNKNOWN_ERROR\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int RESULT_ERROR_UNKNOWN_ERROR\n```\n\nResult code represents that call is ended with an unknown error.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n-1\n(0xffffffff)\n\n\n### RESULT_INFO_SKIPPED\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int RESULT_INFO_SKIPPED\n```\n\nResult code representing that the command is skipped or canceled. For an example, a seek\ncommand can be skipped if it is followed by another seek command.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\n### RESULT_SUCCESS\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int RESULT_SUCCESS\n```\n\nResult code representing that the command is successfully completed.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\nPublic constructors\n-------------------\n\n### Result\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic Result (int resultCode, \n Bundle resultData)\n```\n\nConstructor of [Result](/reference/android/media/Session2Command.Result).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|--------------------------------------------------------|\n| `resultCode` | `int`: result code \u003cbr /\u003e |\n| `resultData` | `Bundle`: result data This value may be `null`. \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### getResultCode\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int getResultCode ()\n```\n\nReturns the result code.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getResultData\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic Bundle getResultData ()\n```\n\nReturns the result data.\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------------------------------------|----------------------------------|\n| [Bundle](/reference/android/os/Bundle) | This value may be `null`. \u003cbr /\u003e |"]]