setGSensorMode method

Future<void> setGSensorMode(
  1. int mode
)

Set the adaptation mode of the G-sensor

Parameters:

mode G-sensor mode:

TRTCCloudDef.TRTC_GSENSOR_MODE_DISABLE : disable the G-sensor

TRTCCloudDef.TRTC_GSENSOR_MODE_UIAUTOLAYOUT : enable the G-sensor. The SDK will not automatically adjust the screen direction of the local view based on the gyroscope; instead, it will be taken care of by the automatic layout feature of the Android system (this requires the G-sensor adaptation option to be enabled on your application UI).

TRTCCloudDef.TRTC_GSENSOR_MODE_UIFIXLAYOUT : enable the G-sensor. The SDK will automatically adjust the screen direction of the local view based on the gyroscope.

Platform not supported´╝Ü

  • web
  • Windows

Implementation

Future<void> setGSensorMode(
    int mode // G-sensor mode. For more information, please see the definition of `TRTC_GSENSOR_MODE`. Default value: TRTC_GSENSOR_MODE_UIFIXLAYOUT
    ) {
  return _cloudChannel!.invokeMethod('setGSensorMode', {
    "mode": mode,
  });
}