Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/media/Session2Command.Result#constants) \| [Ctors](https://developer.android.com/reference/android/media/Session2Command.Result#pubctors) \| [Methods](https://developer.android.com/reference/android/media/Session2Command.Result#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/Session2Command.Result#inhmethods)

# Session2Command.Result

*** ** * ** ***


`
public
static
final

class
Session2Command.Result
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.Session2Command.Result |

<br />

*** ** * ** ***


**This class was deprecated
in API level 37.**   

Use the Media3 support library instead.

This API is not generally intended for third party application developers.
Use the [AndroidX](https://developer.android.com/jetpack/androidx)
[Media3 session
Library](https://developer.android.com/media/media3/session/control-playback) for consistent behavior across all devices.


Contains the result of `https://developer.android.com/reference/android/media/Session2Command`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/media/Session2Command.Result#RESULT_ERROR_UNKNOWN_ERROR` Result code represents that call is ended with an unknown error. |
| `int` | `https://developer.android.com/reference/android/media/Session2Command.Result#RESULT_INFO_SKIPPED` Result code representing that the command is skipped or canceled. |
| `int` | `https://developer.android.com/reference/android/media/Session2Command.Result#RESULT_SUCCESS` Result code representing that the command is successfully completed. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/media/Session2Command.Result#Result(int,%20android.os.Bundle)(int resultCode, https://developer.android.com/reference/android/os/Bundle resultData) ` Constructor of `https://developer.android.com/reference/android/media/Session2Command.Result`. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/media/Session2Command.Result#getResultCode()() ` Returns the result code. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/media/Session2Command.Result#getResultData()() ` Returns the result data. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/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 https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/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` | ` https://developer.android.com/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` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### RESULT_ERROR_UNKNOWN_ERROR

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESULT_ERROR_UNKNOWN_ERROR
```

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

<br />

Constant Value:

-1
(0xffffffff)


### RESULT_INFO_SKIPPED

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

Constant Value:

1
(0x00000001)


### RESULT_SUCCESS

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESULT_SUCCESS
```

Result code representing that the command is successfully completed.

<br />

Constant Value:

0
(0x00000000)


## Public constructors

### Result

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Result (int resultCode, 
                Bundle resultData)
```

Constructor of `https://developer.android.com/reference/android/media/Session2Command.Result`.

<br />

| Parameters ||
|---|---|
| `resultCode` | `int`: result code <br /> |
| `resultData` | `Bundle`: result data. This value may be `null`. <br /> |

## Public methods

### getResultCode

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getResultCode ()
```

Returns the result code.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getResultData

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getResultData ()
```

Returns the result data.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | This value may be `null`. <br /> |