Connection.SetAudioRoute(CallAudioRoute) Method

Definition

Sets the audio route (speaker, bluetooth, etc.

[Android.Runtime.Register("setAudioRoute", "(I)V", "", ApiSince=26)]
public void SetAudioRoute (Android.Telecom.CallAudioRoute route);
[<Android.Runtime.Register("setAudioRoute", "(I)V", "", ApiSince=26)>]
member this.SetAudioRoute : Android.Telecom.CallAudioRoute -> unit

Parameters

route
CallAudioRoute

The audio route to use (one of CallAudioState#ROUTE_BLUETOOTH, CallAudioState#ROUTE_EARPIECE, CallAudioState#ROUTE_SPEAKER, or CallAudioState#ROUTE_WIRED_HEADSET).

Attributes

Remarks

Sets the audio route (speaker, bluetooth, etc...). When this request is honored, there will be change to the #getCallAudioState().

Used by self-managed ConnectionServices which wish to change the audio route for a self-managed Connection (see PhoneAccount#CAPABILITY_SELF_MANAGED.)

See also InCallService#setAudioRoute(int).

This member is deprecated. Use #requestCallEndpointChange(CallEndpoint, Executor, OutcomeReceiver) instead.

Java documentation for android.telecom.Connection.setAudioRoute(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