Example usage for android.media.session PlaybackState ACTION_FAST_FORWARD

List of usage examples for android.media.session PlaybackState ACTION_FAST_FORWARD

Introduction

In this page you can find the example usage for android.media.session PlaybackState ACTION_FAST_FORWARD.

Prototype

long ACTION_FAST_FORWARD

To view the source code for android.media.session PlaybackState ACTION_FAST_FORWARD.

Click Source Link

Document

Indicates this session supports the fast forward command.

Usage

From source file:com.aengbee.android.leanback.ui.PlaybackOverlayCustomFragment.java

private long getAvailableActions(int nextState) {
    long actions = PlaybackState.ACTION_PLAY | PlaybackState.ACTION_PLAY_FROM_MEDIA_ID
            | PlaybackState.ACTION_PLAY_FROM_SEARCH | PlaybackState.ACTION_SKIP_TO_NEXT
            | PlaybackState.ACTION_SKIP_TO_PREVIOUS | PlaybackState.ACTION_FAST_FORWARD
            | PlaybackState.ACTION_REWIND | PlaybackState.ACTION_PAUSE;

    if (nextState == PlaybackState.STATE_PLAYING) {
        actions |= PlaybackState.ACTION_PAUSE;
    }//  ww  w . java 2 s  .c  o m

    return actions;
}