Package io.agora.rtc2

Class RtcEngineConfig

java.lang.Object
io.agora.rtc2.RtcEngineConfig

public class RtcEngineConfig extends Object
  • Field Details

    • mEventHandler

      public IRtcEngineEventHandler mEventHandler
      The event handler for `RtcEngine`. See `IRtcEngineEventHandler`.
    • mContext

      public Context mContext
      The context of Android Activity.
    • mAppId

      public String mAppId
      The App ID issued by Agora for your project. Only users in apps with the same App ID can join the same channel and communicate with each other. An App ID can only be used to create one `RtcEngine` instance. To change your App ID, call `destroy()` to destroy the current `RtcEngine` instance, and then create a new one.
    • mAreaCode

      public int mAreaCode
      The region for connection. This is an advanced feature and applies to scenarios that have regional restrictions. For details on supported regions, see `AreaCode`. The area codes support bitwise operation.
    • mChannelProfile

      public int mChannelProfile
      The channel profile. - CHANNEL_PROFILE_COMMUNICATION (0): Communication. Agora recommends using the live streaming profile for a better audio and video experience. - CHANNEL_PROFILE_LIVE_BROADCASTING (1): (Default) Live streaming. - CHANNEL_PROFILE_GAME (2): Gaming. Deprecated: Use CHANNEL_PROFILE_LIVE_BROADCASTING instead. - CHANNEL_PROFILE_CLOUD_GAMING (3): Interaction. The scenario is optimized for latency. Use this profile if the use case requires frequent interactions between users. Deprecated: Use CHANNEL_PROFILE_LIVE_BROADCASTING instead.
    • mLicense

      public String mLicense
      The license used for verification when connectting channel. Charge according to the license
    • mAudioScenario

      public int mAudioScenario
      The audio scenarios. Under different audio scenarios, the device uses different volume types. - `AUDIO_SCENARIO_DEFAULT`(0): (Default) Automatic scenario, where the SDK chooses the appropriate audio quality according to the user role and audio route. - `AUDIO_SCENARIO_GAME_STREAMING`(3): High-quality audio scenario, where users mainly play music. - `AUDIO_SCENARIO_CHATROOM`(5): Chatroom scenario, where users need to frequently switch the user role or mute and unmute the microphone. - `AUDIO_SCENARIO_CHORUS`(7): Real-time chorus scenario, where users have good network conditions and require ultra-low latency. - `AUDIO_SCENARIO_MEETING`(8): Meeting scenario that mainly involves the human voice. - `AUDIO_SCENARIO_AI_CLIENT`(10): AI conversation scenario, which is only applicable to scenarios where the user interacts with the conversational AI agent created by `Conversational AI Engine`.
    • mAutoRegisterAgoraExtensions

      public boolean mAutoRegisterAgoraExtensions
      Whether to automatically register the Agora extensions when initializing `RtcEngine`: - `true`: (Default) Automatically register the Agora extensions when initializing `RtcEngine`. - `false`: Do not register the Agora extensions when initializing `RtcEngine`. You need to call `enableExtension` to register the Agora extensions.
    • mExtensionList

      public List<String> mExtensionList
      Extension libraries.
    • mExtensionObserver

      public IMediaExtensionObserver mExtensionObserver
      The `IMediaExtensionObserver` instance.
    • mLogConfig

      public RtcEngineConfig.LogConfig mLogConfig
      Sets the log file size. See `LogConfig`. By default, the SDK generates five SDK log files and five API call log files with the following rules: - The SDK log files are: `agorasdk.log`, `agorasdk.1.log`, `agorasdk.2.log`, `agorasdk.3.log`, and `agorasdk.4.log`. - The API call log files are: `agoraapi.log`, `agoraapi.1.log`, `agoraapi.2.log`, `agoraapi.3.log`, and `agoraapi.4.log`. - The default size of each SDK log file and API log file is 2,048 KB. These log files are encoded in UTF-8. - The SDK writes the latest logs in `agorasdk.log` or `agoraapi.log`. - When `agorasdk.log` is full, the SDK processes the log files in the following order:1. Delete the `agorasdk.4.log` file (if any). 2. Rename `agorasdk.3.log` to `agorasdk.4.log`. 3. Rename `agorasdk.2.log` to `agorasdk.3.log`. 4. Rename `agorasdk.1.log` to `agorasdk.2.log`. 5. Create a new `agorasdk.log` file. - The overwrite rules for the `agoraapi.log` file are the same as for `agorasdk.log`.
    • mThreadPriority

      public Integer mThreadPriority
      Thread priority type. see ThreadPriorityType
    • mNativeLibPath

      public String mNativeLibPath
      Specifies the storage directory for the `.so` files. The storage directory must be a valid and private directory of the app, which can be obtained using `Context.getDir()`. - If you set this parameter, the SDK automatically loads the `.so` files in the directory you specify, so that the app dynamically loads the required `.so` files when it runs, thereby reducing the package size. - If you do not set this parameter or set it to null, the SDK loads the `.so` files from the default app's `native unreal bpLibraryPath` when compiling the app, which increases the package size compared to the previous method.
    • mDomainLimit

      public boolean mDomainLimit
      Whether to enable domain name restriction: - `true`: Enables the domain name restriction. This value is suitable for scenarios where IoT devices use IoT cards for network access. The SDK will only connect to servers in the domain name or IP whitelist that has been reported to the operator. - `false`: (Default) Disables the domain name restriction. This value is suitable for most common scenarios.
  • Constructor Details

    • RtcEngineConfig

      public RtcEngineConfig()
  • Method Details

    • addExtension

      public void addExtension(String providerName)
      Parameters:
      providerName - The name of the extension to add.
    • getContext

      public Context getContext()
    • getAppId

      public String getAppId()
    • getChannelProfile

      public int getChannelProfile()
    • getLicense

      public String getLicense()
    • getAudioScenario

      public int getAudioScenario()
    • getAreaCode

      public int getAreaCode()
    • getExtensionObserver

      public IMediaExtensionObserver getExtensionObserver()
    • getLogConfig

      public RtcEngineConfig.LogConfig getLogConfig()
    • getThreadPriority

      public Integer getThreadPriority()
    • getDomainLimit

      public boolean getDomainLimit()
    • getAutoRegisterAgoraExtensions

      public boolean getAutoRegisterAgoraExtensions()
    • getNativeLibPath

      public String getNativeLibPath()