Summary: [Constants](https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants#constants) \| [Ctors](https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants#pubctors) \| [Inherited Methods](https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants#inhmethods)

# MediaControlConstants


`
public


class
MediaControlConstants
`


`

extends http://developer.android.com/reference/java/lang/Object.html


`

`


`

|---|---|
| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.wearable.media.MediaControlConstants |

<br />

*** ** * ** ***


**This class is deprecated.**   

these constants do not affect the bridged media session on Wear 3 devices.

Constants for customising the media controls shown on Wear.

These constants define extras that can be added to a `http://developer.android.com/reference/android/media/session/MediaSession.html`, or to custom
actions within a session, to customise the appearance and functions of the associated media
controls on Wear.

These extras can be added to either a session on the companion device (to affect the media
controls that appear on Wear automatically) or a session created on the wearable itself (to
affect media controls that appear when the app creates a `http://developer.android.com/reference/android/app/Notification.MediaStyle.html` notification).

For example, to create a custom action that will appear on Wear:

    PlaybackState.CustomAction.Builder actionBuilder =
             new PlaybackState.CustomAction.Builder(action, name, icon);
     Bundle actionExtras = new Bundle();
     actionExtras.putBoolean(MediaControlConstants.EXTRA_CUSTOM_ACTION_SHOW_ON_WEAR, true);
     actionBuilder.setExtras(actionExtras);
     
That custom action will appear after the standard media controls as a notification-style
action, unless there is a space on the four-way controls because either skip-next or
skip-previous are not supported.

If you do not want the custom action to appear on the four-way controls, you can reserve the
left and right spaces on those controls to be for skip-previous and skip-next only by setting
extras on the session as in this example:

    Bundle sessionExtras = new Bundle();
     sessionExtras.putBoolean(MediaControlConstants.EXTRA_RESERVE_SLOT_SKIP_TO_PREVIOUS, true);
     sessionExtras.putBoolean(MediaControlConstants.EXTRA_RESERVE_SLOT_SKIP_TO_NEXT, true);
     mediaSession.setExtras(sessionExtras);
     
<br />

## Summary

| ### Constants ||
|---|---|
| `http://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_BACKGROUND_COLOR_FROM_THEME` Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/MediaSession.html` to cause the background color of the associated media controls on Wear to be taken from the specified theme. |
| `http://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_CUSTOM_ACTION_SHOW_ON_WEAR` Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/PlaybackState.CustomAction.html` to allow the action to be added to the media controls on Wear. |
| `http://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_RESERVE_SLOT_SKIP_TO_NEXT` Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/MediaSession.html` to ensure that the space used on the four-way controls for the skip-to-next action is not used for a custom action. |
| `http://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_RESERVE_SLOT_SKIP_TO_PREVIOUS` Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/MediaSession.html` to ensure that the space used on the four-way controls for the skip-to-previous action is not used for a custom action. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#MediaControlConstants()() ` |

### Inherited methods

From class `

http://developer.android.com/reference/java/lang/Object.html

` `


http://developer.android.com/reference/java/lang/Object.html` `
clone()
` `


boolean` `
equals(http://developer.android.com/reference/java/lang/Object.html arg0)
` `


void` `
finalize()
` `


final

http://developer.android.com/reference/java/lang/Class.html<?>` `
getClass()
` `


int` `
hashCode()
` `


final

void` `
notify()
` `


final

void` `
notifyAll()
` `


http://developer.android.com/reference/java/lang/String.html` `
toString()
` `


final

void` `
wait(long arg0, int arg1)
` `


final

void` `
wait(long arg0)
` `


final

void` `
wait()
`

## Constants

### EXTRA_BACKGROUND_COLOR_FROM_THEME

```
public static final String EXTRA_BACKGROUND_COLOR_FROM_THEME
```

Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/MediaSession.html` to cause the background
color of the associated media controls on Wear to be taken from the specified theme.

If a specific theme is required for this, one can be specified in the manifest of the app
that creates the `http://developer.android.com/reference/android/media/session/MediaSession.html`, as a meta-data item with a name of `com.google.android.wearable.media.theme`. Otherwise the application theme will be used.

For example, the following can be added to the application's manifest to use a specific
theme for the media controls:

```
 <meta-data android:name="com.google.android.wearable.media.theme"
         android:resource="@style/MediaTheme"/>
```

The color used will be `colorPrimaryDark` for the given theme.

If this extra is not present, or has a value other than true, the color of the media
controls will be derived from the album art.

<br />

Constant Value:

"android.support.wearable.media.extra.BACKGROUND_COLOR_FROM_THEME"


### EXTRA_CUSTOM_ACTION_SHOW_ON_WEAR

```
public static final String EXTRA_CUSTOM_ACTION_SHOW_ON_WEAR
```

Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/PlaybackState.CustomAction.html` to allow the
action to be added to the media controls on Wear.

Custom actions with this extra will be added to the controls in the order in which they are
defined in the `http://developer.android.com/reference/android/media/session/PlaybackState.html`. The first such action will take the left space on the
four-way control, unless the session supports `http://developer.android.com/reference/android/media/session/PlaybackState.html#ACTION_SKIP_TO_PREVIOUS`.
The next space available for a custom action is the right space on the four-way control, unless
the session supports `http://developer.android.com/reference/android/media/session/PlaybackState.html#ACTION_SKIP_TO_NEXT`. Any custom actions that did not
find a space on the four-way control will be added after the four-way control as
notification-style actions.

To ensure that the left or right space on the four-way control is not taken up by a custom
action, even if skip next or skip previous are not supported, use `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_RESERVE_SLOT_SKIP_TO_PREVIOUS` or `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_RESERVE_SLOT_SKIP_TO_NEXT`.

<br />

Constant Value:

"android.support.wearable.media.extra.CUSTOM_ACTION_SHOW_ON_WEAR"


### EXTRA_RESERVE_SLOT_SKIP_TO_NEXT

```
public static final String EXTRA_RESERVE_SLOT_SKIP_TO_NEXT
```

Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/MediaSession.html` to ensure that the space
used on the four-way controls for the skip-to-next action is not used for a custom action.

This may be useful if the skip next action is only temporarily unavailable, for example if
the current track is the last in a playlist.

<br />

**See also:**

- `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_CUSTOM_ACTION_SHOW_ON_WEAR`

Constant Value:

"android.support.wearable.media.extra.RESERVE_SLOT_SKIP_TO_NEXT"


### EXTRA_RESERVE_SLOT_SKIP_TO_PREVIOUS

```
public static final String EXTRA_RESERVE_SLOT_SKIP_TO_PREVIOUS
```

Key for a boolean extra that can be added to a `http://developer.android.com/reference/android/media/session/MediaSession.html` to ensure that the space
used on the four-way controls for the skip-to-previous action is not used for a custom action.

This may be useful if the skip previous action is only temporarily unavailable, for example
if the current track is the first in a playlist.

<br />

**See also:**

- `https://developer.android.com/reference/android/support/wearable/media/MediaControlConstants.html#EXTRA_CUSTOM_ACTION_SHOW_ON_WEAR`

Constant Value:

"android.support.wearable.media.extra.RESERVE_SLOT_SKIP_TO_PREVIOUS"


## Public constructors

### MediaControlConstants

```
public MediaControlConstants ()
```

<br />

<br />