Interface SessionCallbackBuilder.RatingCallback

Enclosing class:
SessionCallbackBuilder

public static interface SessionCallbackBuilder.RatingCallback
Callback receiving a user rating for a specified media id.
  • Method Summary

    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 Details

    • 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)