createWithConfig static method

  1. @deprecated
Future<RtcEngine> createWithConfig(
  1. RtcEngineConfig config
)

Creates an RtcEngine instance and specifies the connection area.

Since v3.3.1

Unless otherwise specified, all the methods provided by the RtcEngine instance are executed asynchronously. Agora recommends calling these methods in the same thread.

Note

  • You must create the RtcEngine instance before calling any other method.
  • You can create an RtcEngine instance either by calling this method or by calling create. The difference between create and this method is that this method enables you to specify the region for connection.
  • The Agora RTC Native SDK supports creating only one RtcEngine instance for an app for now.

Parameterconfig Configurations for the RtcEngine instance. For details, see RtcEngineConfig.

Returns

  • An RtcEngine instance if the method call succeeds.
  • The error code, if this method call fails:

Implementation

@deprecated
static Future<RtcEngine> createWithConfig(RtcEngineConfig config) async {
  return createWithContext(config);
}