Package com.castlabs.sdk.mediasession

## Interface SessionCallbackBuilder.RatingCallback

- Enclosing class:
    SessionCallbackBuilder

      public static interface SessionCallbackBuilder.RatingCallback

  Callback receiving a user rating for a specified media id.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `onSetRating​(androidx.media2.session.MediaSession session, androidx.media2.session.MediaSession.ControllerInfo controller, String mediaId, androidx.media2.common.Rating rating)` | Called when the specified controller has set a rating for the specified media id.

- - ### Method Detail

    - #### onSetRating

          int onSetRating​(androidx.media2.session.MediaSession session,
                          androidx.media2.session.MediaSession.ControllerInfo controller,
                          String mediaId,
                          androidx.media2.common.Rating rating)

      Called when the specified controller has set a rating for the specified media id.
      Returns:
        One of the `SessionResult` `RESULT_*` constants describing the success or failure of the operation, for example, `SessionResult.RESULT_SUCCESS` if the operation succeeded.
      See Also:
        `MediaSession.SessionCallback.onSetRating(MediaSession, MediaSession.ControllerInfo, String, Rating)`, `MediaController.setRating(String, Rating)`