Server Gateway SDK v3.7.200.21 for Linux Java
Public Member Functions | List of all members
io.agora.rtc.AgoraServiceConfig Class Reference

Public Member Functions

 AgoraServiceConfig ()
 AgoraServiceConfig (int enableAudioProcessor, int enableAudioDevice, int enableVideo, Object context, java.lang.String appId, int areaCode, int channelProfile, int audioScenario, int useStringUid)
int getEnableAudioProcessor ()
void setEnableAudioProcessor (int enableAudioProcessor)
int getEnableAudioDevice ()
void setEnableAudioDevice (int enableAudioDevice)
int getEnableVideo ()
void setEnableVideo (int enableVideo)
Object getContext ()
void setContext (Object context)
java.lang.String getAppId ()
void setAppId (java.lang.String appId)
int getAreaCode ()
void setAreaCode (int areaCode)
int getChannelProfile ()
void setChannelProfile (int channelProfile)
int getAudioScenario ()
void setAudioScenario (int audioScenario)
int getUseStringUid ()
void setUseStringUid (int useStringUid)

Detailed Description

The global configurations for AgoraService.

Set these configurations when calling initialize.

Constructor & Destructor Documentation

◆ AgoraServiceConfig() [1/2]

io.agora.rtc.AgoraServiceConfig.AgoraServiceConfig ( )

◆ AgoraServiceConfig() [2/2]

io.agora.rtc.AgoraServiceConfig.AgoraServiceConfig ( int  enableAudioProcessor,
int  enableAudioDevice,
int  enableVideo,
Object  context,
java.lang.String  appId,
int  areaCode,
int  channelProfile,
int  audioScenario,
int  useStringUid 


enableAudioProcessorWhether to enable the audio processing module.
  • true: (Default) Enable the audio processing module.
  • false: Disable the audio processing module. If you disable the audio processing module, you cannot create audio tracks.
enableAudioDeviceWhether to enable the audio device module. The function of the audio device module is to manage audio devices, such as recording and playing audio. If you set enableAudioDevice as false and set enableAudioProcessor as true, you cannot use audio devices, but you can push PCM audio data.
  • true: (Default) Enable the audio device module. Audio recording and playback is available.
  • false: Disable the audio device module. Audio recording and playback is unavailable.
enableVideoWhether to enable video.
  • true: Enable video.
  • false: (Default) Disable video.
appIdThe App ID of your project. You can also specify this value with your RTC token if your Agora project enables token authentication. See Get Started with Agora.
areaCodeThe region for connection. This is an advanced feature and applies to scenarios that have regional restrictions. After specifying the region, the app integrated with the Agora SDK connects to the Agora servers within that region.
  • 0x00000001: Mainland China.
  • 0x00000002: North America.
  • 0x00000004: Europe.
  • 0x00000008: Asia, excluding Mainland China.
  • 0x00000010: Japan.
  • 0x00000020: India.
  • 0xFFFFFFFF: Global.
channelProfileThe channel profile.
  • 0: Communication. This profile prioritizes smoothness and applies to the one-to-one scenario.
  • 1: (Default) Live Broadcast. This profile prioritizes supporting a large audience in a live broadcast channel.
  • 2: Gaming. This profile is deprecated.
  • 3: Cloud Gaming. This profile prioritizes low end-to-end latency and applies to scenarios where users interact with each other, and any delay affects the user experience.
audioScenarioThe audio scenario.
  • 0: (Recommended) The default audio scenario.
  • 3: (Recommended) The live gaming scenario, which needs to enable gaming audio effects in the speaker. Choose this scenario to achieve high-fidelity music playback.
  • 5: The chatroom scenario.
useStringUidWhether to enable string uid.
  • true: Enables string uid.
  • false: Disables string uid.

Member Function Documentation

◆ getAppId()

java.lang.String io.agora.rtc.AgoraServiceConfig.getAppId ( )

◆ getAreaCode()

int io.agora.rtc.AgoraServiceConfig.getAreaCode ( )

◆ getAudioScenario()

int io.agora.rtc.AgoraServiceConfig.getAudioScenario ( )

◆ getChannelProfile()

int io.agora.rtc.AgoraServiceConfig.getChannelProfile ( )

◆ getContext()

Object io.agora.rtc.AgoraServiceConfig.getContext ( )

◆ getEnableAudioDevice()

int io.agora.rtc.AgoraServiceConfig.getEnableAudioDevice ( )

◆ getEnableAudioProcessor()

int io.agora.rtc.AgoraServiceConfig.getEnableAudioProcessor ( )

◆ getEnableVideo()

int io.agora.rtc.AgoraServiceConfig.getEnableVideo ( )

◆ getUseStringUid()

int io.agora.rtc.AgoraServiceConfig.getUseStringUid ( )

◆ setAppId()

void io.agora.rtc.AgoraServiceConfig.setAppId ( java.lang.String  appId)

◆ setAreaCode()

void io.agora.rtc.AgoraServiceConfig.setAreaCode ( int  areaCode)

◆ setAudioScenario()

void io.agora.rtc.AgoraServiceConfig.setAudioScenario ( int  audioScenario)

◆ setChannelProfile()

void io.agora.rtc.AgoraServiceConfig.setChannelProfile ( int  channelProfile)

◆ setContext()

void io.agora.rtc.AgoraServiceConfig.setContext ( Object  context)

◆ setEnableAudioDevice()

void io.agora.rtc.AgoraServiceConfig.setEnableAudioDevice ( int  enableAudioDevice)

◆ setEnableAudioProcessor()

void io.agora.rtc.AgoraServiceConfig.setEnableAudioProcessor ( int  enableAudioProcessor)

◆ setEnableVideo()

void io.agora.rtc.AgoraServiceConfig.setEnableVideo ( int  enableVideo)

◆ setUseStringUid()

void io.agora.rtc.AgoraServiceConfig.setUseStringUid ( int  useStringUid)

The documentation for this class was generated from the following file: