Language

MediaSession2.Builder.SetId(String) Method

Definition

Set ID of the session.

[Android.Runtime.Register("setId", "(Ljava/lang/String;)Landroid/media/MediaSession2$Builder;", "", ApiSince=29)]
public Android.Media.MediaSession2.Builder SetId(string id);
[<Android.Runtime.Register("setId", "(Ljava/lang/String;)Landroid/media/MediaSession2$Builder;", "", ApiSince=29)>]
member this.SetId : string -> Android.Media.MediaSession2.Builder

Parameters

id
String

id of the session. Must be unique per package. This value cannot be null.

Returns

The Builder to allow chaining. This value cannot be null.

Attributes

Remarks

Set ID of the session. If it's not set, an empty string will be used to create a session. Use this if and only if your app supports multiple playback at the same time and also wants to provide external apps to have finer controls of them.

Android reference for android.media.MediaSession2.Builder.setId.

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