enterPipMode method

  1. @Deprecated('use [HMSPIPAndroidController] class')
Future<bool> enterPipMode({
  1. List<int>? aspectRatio,
  2. bool? autoEnterPip,
})

Method to activate pipMode in the application

Parameters:

aspectRatio - Ratio for PIP window,List of int indicating ratio for PIP window as width,height

autoEnterPip - Enable autoEnterPip will start pip mode automatically when app minimized.

Refer PIP mode guide here

Note: Minimum version required to support PiP is Android 8.0 (API level 26)

Implementation

@Deprecated('use [HMSPIPAndroidController] class')
Future<bool> enterPipMode(
    {List<int>? aspectRatio, bool? autoEnterPip}) async {
  final bool? result = await PlatformService.invokeMethod(
      PlatformMethod.enterPipMode,
      arguments: {
        "aspect_ratio": aspectRatio ?? [16, 9],
        "auto_enter_pip": autoEnterPip ?? false
      });
  return result ?? false;
}