MediaSession2Service.OnGetSession(MediaSession2+ControllerInfo) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when a MediaController2
is created with the this service's
Session2Token
.
[Android.Runtime.Register("onGetSession", "(Landroid/media/MediaSession2$ControllerInfo;)Landroid/media/MediaSession2;", "GetOnGetSession_Landroid_media_MediaSession2_ControllerInfo_Handler", ApiSince=29)]
public abstract Android.Media.MediaSession2? OnGetSession (Android.Media.MediaSession2.ControllerInfo controllerInfo);
[<Android.Runtime.Register("onGetSession", "(Landroid/media/MediaSession2$ControllerInfo;)Landroid/media/MediaSession2;", "GetOnGetSession_Landroid_media_MediaSession2_ControllerInfo_Handler", ApiSince=29)>]
abstract member OnGetSession : Android.Media.MediaSession2.ControllerInfo -> Android.Media.MediaSession2
Parameters
- controllerInfo
- MediaSession2.ControllerInfo
information of the controller which is trying to connect.
Returns
a MediaSession2
instance for the controller to connect to, or null
to reject connection
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.