Example usage for android.media RemoteController getEstimatedMediaPosition

List of usage examples for android.media RemoteController getEstimatedMediaPosition

Introduction

In this page you can find the example usage for android.media RemoteController getEstimatedMediaPosition.

Prototype

public long getEstimatedMediaPosition() 

Source Link

Document

Return the estimated playback position of the current media track or a negative value if not available.

Usage

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

/**
 * {@inheritDoc}//from ww w  .jav  a  2 s  .c  o m
 */
@Override
public long getPlaybackPosition() {
    RemoteController rc = mService.getRemoteController();
    return rc.getEstimatedMediaPosition();
}

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

/**
 * {@inheritDoc}/* www. java2s. co  m*/
 */
@Override
public long getPlaybackPosition() {
    if (mService == null) {
        Log.w(TAG, "Getting a playback position on stopped controller.");
        return -1;
    }

    RemoteController rc = mService.getRemoteController();
    return rc.getEstimatedMediaPosition();
}