次の方法で共有


MediaRouter2.SetRouteVolume(MediaRoute2Info, Int32) Method

Definition

Sets the volume for a specific route.

[Android.Runtime.Register("setRouteVolume", "(Landroid/media/MediaRoute2Info;I)V", "", ApiSince=35)]
public void SetRouteVolume (Android.Media.MediaRoute2Info route, int volume);
[<Android.Runtime.Register("setRouteVolume", "(Landroid/media/MediaRoute2Info;I)V", "", ApiSince=35)>]
member this.SetRouteVolume : Android.Media.MediaRoute2Info * int -> unit

Parameters

volume
Int32

The new volume value between 0 and MediaRoute2Info#getVolumeMax.

Attributes

Remarks

Sets the volume for a specific route.

The call may have no effect if the route is currently not selected.

This method is only supported by #getInstance(Context, String) proxy MediaRouter2 instances. Use RoutingController#setVolume(int) RoutingController#setVolume(int) instead for #getInstance(Context) local MediaRouter2 instances.

Java documentation for android.media.MediaRouter2.setRouteVolume(android.media.MediaRoute2Info, int).

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