2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

AudioRoute

The AudioRoute model gathers information about audio routes of audio devices used on Android. It informs about audio rout types of media devices and checks the compatibility between media devices and audio routes.

Types of audio routes:

  • ROUTE_HEADSET
  • ROUTE_PHONE
  • ROUTE_SPEAKER
  • ROUTE_BLUETOOTH
  • ROUTE_MEDIA

Available in the package com.voxeet.sdk.media.audio.AudioRoute.

Methods

useProximitySensor

useProximitySensor(): boolean

Returns: boolean

from

from(@NonNull device: MediaDevice): AudioRoute

Informs about the audio route type of a specific media device.

Parameters

NameTypeDescription
deviceMediaDevicenon null device

Returns: AudioRoute - The corresponding AudioRoute. (ROUTE_MEDIA by default)

isCompatible

isCompatible(@NonNull device: MediaDevice): boolean

Checks if a media device is compatible with the specific audio route.

Parameters

NameTypeDescription
deviceMediaDevicenon null media device

Returns: boolean - compatibility flag