Share via


MediaSession2Service.OnGetSession(MediaSession2+ControllerInfo) Method

Definition

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

Java documentation for android.media.MediaSession2Service.onGetSession(android.media.ControllerInfo).

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.

Applies to