getUsingAudioDevice method

  1. @override
Future<ZoomVideoSdkAudioDevice> getUsingAudioDevice()

Get the current using audio device.
The function is only available for Android platform.
Return the current using audio device if the function succeeds. Otherwise, NULL

Implementation

@override
Future<ZoomVideoSdkAudioDevice> getUsingAudioDevice() async {
  if (!Platform.isAndroid) {
    throw UnimplementedError('getUsingAudioDevice() is only implemented for Android.');
  }
  var audioDeviceString = await methodChannel
      .invokeMethod<String?>('getUsingAudioDevice')
      .then<String?>((String? value) => value);

  Map<String, dynamic> audioDeviceMap = jsonDecode(audioDeviceString!);
  ZoomVideoSdkAudioDevice audioDevice =
  ZoomVideoSdkAudioDevice.fromJson(audioDeviceMap);
  return audioDevice;
}