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

# Result

*** ** * ** ***

```
class Result
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.media.Session2Command.Result](https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#) |

*** ** * ** ***

> [!CAUTION]
> **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.html) [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/kotlin/android/media/Session2Command`.

## Summary

| Constants ||
|---|---|
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#RESULT_ERROR_UNKNOWN_ERROR:kotlin.Int` Result code represents that call is ended with an unknown error. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#RESULT_INFO_SKIPPED:kotlin.Int` Result code representing that the command is skipped or canceled. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#RESULT_SUCCESS:kotlin.Int` Result code representing that the command is successfully completed. |

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#Result(kotlin.Int,%20android.os.Bundle)(resultCode: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, resultData: https://developer.android.com/reference/kotlin/android/os/Bundle.html#?)` Constructor of `https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#`. |

| Public methods ||
|---|---|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#getResultCode()()` Returns the result code. |
| [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)? | `https://developer.android.com/reference/kotlin/android/media/Session2Command.Result#getResultData()()` Returns the result data. |

## Constants

### RESULT_ERROR_UNKNOWN_ERROR

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

```
static val RESULT_ERROR_UNKNOWN_ERROR: Int
```

**Deprecated:** *Deprecated in Java.*

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

    Value: -1

### RESULT_INFO_SKIPPED

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

```
static val RESULT_INFO_SKIPPED: Int
```

**Deprecated:** *Deprecated in Java.*

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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val RESULT_SUCCESS: Int
```

**Deprecated:** *Deprecated in Java.*

Result code representing that the command is successfully completed.

    Value: 0

## Public constructors

### Result

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

```
Result(
    resultCode: Int, 
    resultData: Bundle?)
```

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

| Parameters ||
|---|---|
| `resultCode` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): result code |
| `resultData` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?: result data. This value may be `null`. |

## Public methods

### getResultCode

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

```
fun getResultCode(): Int
```

**Deprecated:** *Deprecated in Java.*

Returns the result code.

### getResultData

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

```
fun getResultData(): Bundle?
```

**Deprecated:** *Deprecated in Java.*

Returns the result data.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/os/Bundle.html#?` | This value may be `null`. |