
In Media3 there is the useful concept of connection hints that a client can set when building the session and that are sent to the service and passed to the `Callback.onConnect()` method when the browser connects. These connection hints are then included in the `ControllerInfo` object that later will be passed to every callback method and the implementor can then take decisions specific to these connection hints. These connection hints are not available in media1. However, when an app creates a `MediaBrowserCompat` object, the constructor takes a rootHint object that is sent to `MediaBrowserServiceCompat.onGetRoot()`. This change uses the browser rootHints as the connection hints when creating the `ControllerInfo` for legacy browsers and makes them available to the `MediaLibrarySession.Callback` domain methods in the same way as connection hints of a Media3 browser. PiperOrigin-RevId: 484220748
Session module
This module provides media session functionality through which media information and controls can be exposed to the Android platform, as well as to other processes and applications.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-session:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.