Configurations for the RtcEngineConfig instance.
More...
|
| class | AreaCode |
| | The region for connection, which is the region where the server the SDK connects to is located. More...
|
| |
| class | LogConfig |
| | Configuration of Agora SDK log files. More...
|
| |
|
| void | addExtension (String providerName) |
| | Adds the extension. More...
|
| |
|
Context | getContext () |
| |
|
String | getAppId () |
| |
|
int | getChannelProfile () |
| |
|
String | getLicense () |
| |
|
int | getAudioScenario () |
| |
|
int | getAreaCode () |
| |
|
IMediaExtensionObserver | getExtensionObserver () |
| |
|
LogConfig | getLogConfig () |
| |
|
Integer | getThreadPriority () |
| |
|
boolean | getDomainLimit () |
| |
|
boolean | getAutoRegisterAgoraExtensions () |
| |
|
String | getNativeLibPath () |
| |
Configurations for the RtcEngineConfig instance.
◆ addExtension()
| void io.agora.rtc2.RtcEngineConfig.addExtension |
( |
String |
providerName | ) |
|
Adds the extension.
- Parameters
-
| providerName | The name of the extension to add. |
◆ mEventHandler
◆ mContext
| Context io.agora.rtc2.RtcEngineConfig.mContext |
The context of Android Activity.
◆ mAppId
| String io.agora.rtc2.RtcEngineConfig.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
| int io.agora.rtc2.RtcEngineConfig.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
| int io.agora.rtc2.RtcEngineConfig.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
| String io.agora.rtc2.RtcEngineConfig.mLicense |
The license used for verification when connectting channel. Charge according to the license
◆ mAudioScenario
| int io.agora.rtc2.RtcEngineConfig.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. - Note
- Before using this enumeration, you need to call
getAudioDeviceInfo to see whether the audio device supports ultra-low-latency capture and playback. To experience ultra-low latency, you need to ensure that your audio device supports ultra-low latency ( isLowLatencyAudioSupported = true).
◆ mAutoRegisterAgoraExtensions
| boolean io.agora.rtc2.RtcEngineConfig.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
| List<String> io.agora.rtc2.RtcEngineConfig.mExtensionList |
◆ mExtensionObserver
◆ mLogConfig
| LogConfig io.agora.rtc2.RtcEngineConfig.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).
- Rename
agorasdk.3.log to agorasdk.4.log.
- Rename
agorasdk.2.log to agorasdk.3.log.
- Rename
agorasdk.1.log to agorasdk.2.log.
- Create a new
agorasdk.log file.
- The overwrite rules for the
agoraapi.log file are the same as for agorasdk.log.
◆ mThreadPriority
| Integer io.agora.rtc2.RtcEngineConfig.mThreadPriority |
◆ mNativeLibPath
| String io.agora.rtc2.RtcEngineConfig.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. - Note
- This method is applicable when you integrate the SDK manually but not when you integrate the SDK with Maven Central or JitPack.
- Ensure the specified directory exists; otherwise, the
RtcEngine initialization fails.
◆ mDomainLimit
| boolean io.agora.rtc2.RtcEngineConfig.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.