Code example for RemoteControlClient

Methods: setPlaybackState

0
   */ 
  public void updateState(boolean isPlaying) {
    if (remoteControlClient != null) {
      if (isPlaying) {
        remoteControlClient
            .setPlaybackState(RemoteControlClient.PLAYSTATE_PLAYING);
      } else { 
        remoteControlClient
            .setPlaybackState(RemoteControlClient.PLAYSTATE_PAUSED);
      } 
    } 
  } 
 
  /** 
   * Updates the state of the remote control to "stopped". 
   */ 
  public void stop() { 
    if (remoteControlClient != null) {
      remoteControlClient
          .setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);
    }