preferConnectedAudioDevice property

bool preferConnectedAudioDevice
final

If true, alarm audio routes to a connected earphone or Bluetooth device when one is present, falling back to the built-in speaker if not. Uses STREAM_MUSIC and USAGE_MEDIA instead of STREAM_ALARM and USAGE_ALARM, so the media volume slider controls the volume instead of the alarm slider.

If false (default), audio is always forced to the built-in speaker via USAGE_ALARM, and the alarm volume slider applies.

Has no effect on iOS. Defaults to false.

Implementation

final bool preferConnectedAudioDevice;