RemoteController.OnClientUpdateListener
  public
  static
  
  
  interface
  RemoteController.OnClientUpdateListener
  
  
  
| android.media.RemoteController.OnClientUpdateListener | 
Interface definition for the callbacks to be invoked whenever media events, metadata and playback status are available.
Summary
| Public methods | |
|---|---|
| 
        abstract
        
        
        
        
        void | 
      onClientChange(boolean clearing)
      Called whenever all information, previously received through the other methods of the listener, is no longer valid and is about to be refreshed. | 
| 
        abstract
        
        
        
        
        void | 
      onClientMetadataUpdate(RemoteController.MetadataEditor metadataEditor)
      Called whenever new metadata is available. | 
| 
        abstract
        
        
        
        
        void | 
      onClientPlaybackStateUpdate(int state, long stateChangeTimeMs, long currentPosMs, float speed)
      Called whenever the playback state has changed, and playback position and speed are known. | 
| 
        abstract
        
        
        
        
        void | 
      onClientPlaybackStateUpdate(int state)
      Called whenever the playback state has changed. | 
| 
        abstract
        
        
        
        
        void | 
      onClientTransportControlUpdate(int transportControlFlags)
      Called whenever the transport control flags have changed. | 
Public methods
onClientChange
public abstract void onClientChange (boolean clearing)
Called whenever all information, previously received through the other
 methods of the listener, is no longer valid and is about to be refreshed.
 This is typically called whenever a new RemoteControlClient has been selected
 by the system to have its media information published.
| Parameters | |
|---|---|
| clearing | boolean: true if there is no selected RemoteControlClient and no information
     is available. | 
onClientMetadataUpdate
public abstract void onClientMetadataUpdate (RemoteController.MetadataEditor metadataEditor)
Called whenever new metadata is available.
 See the MediaMetadataEditor.putLong(int, long),
  MediaMetadataEditor.putString(int, String),
  MediaMetadataEditor.putBitmap(int, Bitmap), and
  MediaMetadataEditor.putObject(int, Object) methods for the various keys that
  can be queried.
| Parameters | |
|---|---|
| metadataEditor | RemoteController.MetadataEditor: the container of the new metadata. | 
onClientPlaybackStateUpdate
public abstract void onClientPlaybackStateUpdate (int state, 
                long stateChangeTimeMs, 
                long currentPosMs, 
                float speed)Called whenever the playback state has changed, and playback position and speed are known.
| Parameters | |
|---|---|
| state | int: one of the playback states authorized
     inRemoteControlClient.setPlaybackState(int). | 
| stateChangeTimeMs | long: the system time at which the state change was reported,
     expressed in ms. Based onSystemClock.elapsedRealtime(). | 
| currentPosMs | long: a positive value for the current media playback position expressed
     in ms, a negative value if the position is temporarily unknown. | 
| speed | float: a value expressed as a ratio of 1x playback: 1.0f is normal playback,
    2.0f is 2x, 0.5f is half-speed, -2.0f is rewind at 2x speed. 0.0f means nothing is
    playing (e.g. when state isRemoteControlClient.PLAYSTATE_ERROR). | 
onClientPlaybackStateUpdate
public abstract void onClientPlaybackStateUpdate (int state)
Called whenever the playback state has changed. It is called when no information is known about the playback progress in the media and the playback speed.
| Parameters | |
|---|---|
| state | int: one of the playback states authorized
     inRemoteControlClient.setPlaybackState(int). | 
onClientTransportControlUpdate
public abstract void onClientTransportControlUpdate (int transportControlFlags)
Called whenever the transport control flags have changed.
| Parameters | |
|---|---|
| transportControlFlags | int: one of the flags authorized
     inRemoteControlClient.setTransportControlFlags(int). | 
