Example usage for android.media RemoteControlClient PLAYSTATE_FAST_FORWARDING

List of usage examples for android.media RemoteControlClient PLAYSTATE_FAST_FORWARDING

Introduction

In this page you can find the example usage for android.media RemoteControlClient PLAYSTATE_FAST_FORWARDING.

Prototype

int PLAYSTATE_FAST_FORWARDING

To view the source code for android.media RemoteControlClient PLAYSTATE_FAST_FORWARDING.

Click Source Link

Document

Playback state of a RemoteControlClient which is fast forwarding in the media it is currently playing.

Usage

From source file:com.achep.acdisplay.services.media.MediaController2KitKat.java

@NonNull
static SparseIntArray generatePlaybackCompatSparse() {
    SparseIntArray sia = new SparseIntArray();
    sia.put(RemoteControlClient.PLAYSTATE_BUFFERING, PlaybackStateCompat.STATE_BUFFERING);
    sia.put(RemoteControlClient.PLAYSTATE_PLAYING, PlaybackStateCompat.STATE_PLAYING);
    sia.put(RemoteControlClient.PLAYSTATE_PAUSED, PlaybackStateCompat.STATE_PAUSED);
    sia.put(RemoteControlClient.PLAYSTATE_ERROR, PlaybackStateCompat.STATE_ERROR);
    sia.put(RemoteControlClient.PLAYSTATE_REWINDING, PlaybackStateCompat.STATE_REWINDING);
    sia.put(RemoteControlClient.PLAYSTATE_FAST_FORWARDING, PlaybackStateCompat.STATE_FAST_FORWARDING);
    sia.put(RemoteControlClient.PLAYSTATE_SKIPPING_FORWARDS, PlaybackStateCompat.STATE_SKIPPING_TO_NEXT);
    sia.put(RemoteControlClient.PLAYSTATE_SKIPPING_BACKWARDS, PlaybackStateCompat.STATE_SKIPPING_TO_PREVIOUS);
    return sia;/*from  ww w.ja  v  a  2 s  .  c om*/
}

From source file:com.bullmobi.message.services.media.MediaController2KitKat.java

/**
 * {@inheritDoc}/* www .  j  a  v  a2 s .  c  o m*/
 */
protected MediaController2KitKat(@NonNull Activity activity) {
    super(activity);

    SparseIntArray cachedStateSparse = sStateSparse.get();
    if (cachedStateSparse == null) {
        mStateSparse = new SparseIntArray();
        mStateSparse.put(RemoteControlClient.PLAYSTATE_BUFFERING, PlaybackStateCompat.STATE_BUFFERING);
        mStateSparse.put(RemoteControlClient.PLAYSTATE_PLAYING, PlaybackStateCompat.STATE_PLAYING);
        mStateSparse.put(RemoteControlClient.PLAYSTATE_PAUSED, PlaybackStateCompat.STATE_PAUSED);
        mStateSparse.put(RemoteControlClient.PLAYSTATE_ERROR, PlaybackStateCompat.STATE_ERROR);
        mStateSparse.put(RemoteControlClient.PLAYSTATE_REWINDING, PlaybackStateCompat.STATE_REWINDING);
        mStateSparse.put(RemoteControlClient.PLAYSTATE_FAST_FORWARDING,
                PlaybackStateCompat.STATE_FAST_FORWARDING);
        mStateSparse.put(RemoteControlClient.PLAYSTATE_SKIPPING_FORWARDS,
                PlaybackStateCompat.STATE_SKIPPING_TO_NEXT);
        mStateSparse.put(RemoteControlClient.PLAYSTATE_SKIPPING_BACKWARDS,
                PlaybackStateCompat.STATE_SKIPPING_TO_PREVIOUS);

        // Cache sparse array
        sStateSparse = new WeakReference<>(mStateSparse);
    } else {
        mStateSparse = cachedStateSparse;
    }
}