Agora Developer Portal - FAQ

There is a new release of the Developer Center! If you'd like to check it out, please click  here

Integration and Deployment FAQ


Why am I automatically logged out of a device?

You will be automatically logged out of your current device if you login another device.


In poor network conditions, does the SDK force users to leave a channel?

No, users will not automatically leave a channel unless they do so themselves, for example, the application calls leaveChannel.

Does each channel/room need an administrator in a call?

No, an administrator can only be implemented in the signaling layer. Your signaling server sends commands and calls SDK interfaces for call management.

Does the client need to maintain the channel?

No, a channel is created and deleted automatically. When all participants have left the channel, the channel will be deleted automatically.

What are the App ID and Dynamic Key? How can I use them?

See Security Keys, for details.

If both the App ID and Dynamic Key are used at the same time, which one prevails?

The Dynamic Key.

How do I check who is talking in the channel?

The following callbacks for different platforms indicate who is talking and the speaker’s volume.

  • For Android and Windows: onAudioVolumeIndication
  • For iOS and macOS: reportAudioVolumeIndicationOfSpeakers

By default, this function is disabled. If needed, use the enableAudioVolumeIndication() method to configure it.

Voice and Video

How do I set the video view?

Use the two APIs provided by the Agora SDKs: setupLocalVideo() and setupRemoteVideo().

  • Call setupLocalVideo() before you join a channel or start the video preview.
  • For setupRemoteVideo(), specify the uid and view:
  • If the uid of the remote user is empty before you join a channel, set it before joining the channel.
  • If the uid of the remote user exists before you join a channel, use the onFirstRemoteVideoDecoded() callback to return the uid of the remote user in the call to assign the view to the user. The view can be removed by setting it to null.

Can the voice/video function of the Agora Web SDK work with the mobile phone’s SDK?

Yes. Use the same App ID to join the same channel, then the voice function on the web will work with the one on the mobile phone. For the video function, the video encoder (VP8) must be preconfigured. See the mobile phone’s SDK for details.

What is the difference between mute the local (or remote) video stream and disable the video?

Calling the muteLocalVideoStream and muteAllRemoteVideoStream functions simultaneously is the same as calling disableVideo. Calling disableVideo uses less video-related system resources.

What is the difference between the first video frame and first video decoded?

The first video frame is the event notification for the first image to be displayed. The first video decoded is the event notification for the first image to be successfully decoded.

Why do some videos display black edges around the windows or cropped images?

When the video image is smaller than the window, there will be black edges around it.

In hidden mode, the video image is larger than the window, and will be cropped.

How can I see myself before the other user connects?

Call the API startPreview to see yourself.

How do I switch between voice and video modes?

Call disableVideo/enableVideo to switch between voice and video modes.

How do I hot plug the camera?

A callback occurs when a USB camera is added or removed.

  1. Stop the video.
  2. Select a camera.
  3. Start the video (For details, see the demo LRESULT CChildView::OnEIDVideoDeviceChanged(WPARAM wParam, LPARAM lParam)).

If you added a camera and want to start it, see the following question.

How do I hot switch the camera?

Call the API: virtual int setDevice(const char deviceId[MAX_DEVICE_ID_LENGTH]);

For details, see the demo:BOOL CDeviceTestPage::OnApply();

How can I enlarge the local view after another user with a larger screen leaves the call?

Call the setupLocalVideoCanvas method.

Why is the call quality of a group call worse than a one-to-one call?

Group calls consume more bandwidth and system resources than one-to-one calls. If the network bandwidth or system resources is not sufficient, it may result in poor call quality. Reduce the video resolution to improve the call quality.

Why is the call quality worse when using Bluetooth?

The Agora Native SDK provides 32-kHz ultra-wideband audio sampling. However, most Bluetooth headsets on the market only support 8-kHz narrowband communications with only a few supporting 16-kHz broadband communications. This results in degraded call quality when using Bluetooth devices.

Why is the voice/video choppy when the system load is high?

A high system load affects the recording and playback thread schedulings and the voice/video may become choppy. Try to quit unrelated system processes to reduce the system load.


How can I mute a user in the channel?

Call the API muteLocalAudioStream to mute a local user. Use the signaling layer to mute all users.


How do I check the recording permission?

  • iOS/macOS:The system prompts you to turn on the recording permission on first run. If the permission is turned off manually, query the system interface using AVAudioSession.sharedInstance().recordPermission() (iOS v8.0 or later) to check the recording permission.
  • Android:There is no single method to check the recording permission on Android devices because it varies by manufacturer. The Agora Native SDK tries to detect a recording failure and returns the error code: ERR_ADM_RECORD_AUDIO_FAILED (1018). This may not work for all devices. You can implement a function in your application for the user to check the recording permission when this error code is returned.

Can I record a voice or video call?

Yes, Agora provides the recording functions, and startRecordingService can be called to store the recording files on servers.


How can I retrieve a list of users who are online?

Two callback interfaces, onUserJoined and onUserOffline, notify when a user joins or leaves a channel. However, Agora does not provide any method to retrieve the list of users who are online. User management is handled by signaling, and this function can be implemeted in the signaling layer.

How do I set the calling number for the PSTN (Public Switched Telephone Network)?

  • If you use channelInvitePhone2, the last parameter is the calling number.
  • If you use channelInvitePhone, the user account is the calling number.

Does Agora provide a PSTN solution?

Agora provides the docking capabilities from VoIP to PSTN, but does not provide a complete PSTN solution.

What is the process for our app users to establish a call?

The following is a general process sequence for user A calling user B:

  1. User A initiates a call request to the signaling server.
  2. The signaling server checks whether user B is online:
  • If user B is not online, it returns an error to user A indicating that user B is offline.
  • If user B is online, the signaling server generates a channel name and returns it to user A. Meanwhile, it sends a call signaling to user B.
  1. User A receives the channel name returned by the signaling server, and prepares to join the channel (user A can join the channel in advance):
  1. User A calls muteLocalAudioStream(true) and muteLocalVideoStream(true) to stop sending any voice or video data.
  2. Call joinChannel to join the channel.
  1. User B receives the call request sent by the signaling server from user A:
  1. User B joins the channel. (User B can join the channel in advance.)
  2. User B calls muteLocalAudioStream(true) and muteLocalVideoStream(true) to stop sending any voice or video data.
  1. User A calls joinChannel to join the channel:
  1. If user B rejects the request:
    • User B calls leaveChannel to leave the channel.
    • User B sends a rejection message to the signaling server.
    • The signaling server returns the rejection message from user B to user A.
    • User A calls leaveChannel to leave the channel.
  2. If user B accepts the request:
    • User B calls muteLocalAudioStream(false) and muteLocalVideoStream(false) to send voice or/and video data.
    • User B sends an accept message to the signaling server.
    • User A calls muteLocalAudioStream(false) and muteLocalVideoStream(false) to send voice or/and video data.

How long will messages be saved?

Message Storage Period
Channel The message will be delivered successfully.
One-to-one The message will be kept for one day.
  • If User A tries calling user B for over 30 seconds, but user B does not receive the call message, the call will hang up automatically.
  • If User A tries calling user B for over 20 seconds (configurable) and user B receives it but does not reply with any ack, user A will receive a call failure notification and no timeout ack will be returned.

Android Specific Questions

Can I mix my code with the SDK code on Android?

No, the .so files cannot be called if the codes are mixed.

Why does the Android suspension window not respond to clicking or dragging after integrating the Agora SDK?

Check whether the system suspension window permission is enabled. If it is disabled, the app cannot open the window.

Can I use the Agora Native SDK on 64-bit Android devices?

  • If you are using the Agora Native SDK v1.7.4 or later:

The Agora Native SDK supports the 64-bit ARM architecture, and you only need to copy the files in the arm64-v8a folder (included in the SDK package) to the corresponding folder in your project.

Currently, only x86 compatibility mode is supported but not x86_64. Ensure there is no x86_64 directory in the APK of any x86 64-bit device.

  • If you are using Agora Native SDK versions before v1.7.4:

The Agora Native SDK provides a 32-bit native library (armeabi-v7a). On 64-bit devices, Android allows starting the APK in the 32-bit processing mode. Ensure the arm64 folder of the APK is empty, otherwise, the Android system loads the APK in 64-bit mode and the APK boot will fail.

Since most Android clients are 32-bit devices, manufacturers generally provide 32-bit libraries, which means that it is common to start in the 32-bit processing mode on 64-bit Android devices.

If you see the following error on 64-bit devices:

java.lang.UnsatisfiedLinkError: dlopen failed: ""

Possible Reasons:

When installing the APK, the system will look for the directory of the native library (the existing ABI:armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, MIPS64, MIPs) under the lib directory of APK according to Build.SUPPORTED_ABIS lib.

If the app has a 64-bit compatible directory with missing library files, do not replace them from the ABI directory. The library files cannot mixed. The corresponding library files for each architecture must be used.

On Android, if there is no arm64-v8a directory on a 64-bit system, it will try to find the libraries under armeabi-v7a.


  • Method 1: When building the application, delete the arm64-v8a directory in the project. After the application is built, ensure there is no arm64-v81 directory under lib in the apk package.

  • Method 2: Set abiFilters in the gradle build file, and only pack the 32-bit library.

     android {
      defaultConfig {
        ndk {
          abiFilters "armeabi-v7a","x86"

Why did I receive this error: Failed to crunch file?

This error may occur when using the Android Open Video Call demo:

Error: Failed to crunch file E:\Rock\videoIM\Agora_Native_SDK_for_Android_v1_7_4_FULL\Agora_Native_SDK_for_Android_FULL\samples\OpenVideoCall_Android\app\build\intermediates\exploded-aar\\appcompat-v7\25.0.0\res\drawable-xhdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png

This error occurs when the referenced file name is too long.

Other Questions

Which callback functions are important to apps?

Apps need information about user status-related callbacks, such as userJoined and userOffline. All user-related information and remote user callbacks are transmitted over the UDP,which is not reliable.

What error codes are important and what are not?

All error codes are important, and warning codes can be ignored.

What error codes mean that I should end the app call?

When any error code is received, you should end the app call.

Which callbacks inform users that the server is disconnected?

rtcEngineConnectionDidLost or connectionLostBlock notifies users that the server is disconnected. When a server is disconnected, the SDK will reconnect it automatically.

What happens after calling initWithAppId multiple times?

This may result in abnormal camera behavior and other problems.

How much impact does encryption and decryption have on the system?

Encryption and decryption may affect CPU performance and network latency.

This requires testing in actual situations.

Why does the phone screen rotate together with the phone in a call?

If the screen rotation function is enabled in your phone settings, the screen will rotate with the phone.

Why does the screen display the other user after the network is reconnected?

It takes some time for the video communication to recover after the network connection is lost. Latency is a common problem for all video communications and is affected by network conditions.

What should I do when the user ID used is a string?

The user ID in the SDK only accepts 32-bit unsigned integers. It is recommended to map the strings into integers on your client server.

How do I retrieve a successful volume callback message?

Call RtcEngineParameters:: enableAudioVolumeIndication(int interval, int smooth). The volume indicator is off by default. Call the API to enable the callback before or after joining a channel.

Why did the initialization fail on Windows XP?

Starting from v1.1, the Agora SDK uses Visual C++ 2013. Since Windows XP does not include the Visual C++ Redistributable Packages by default, download and install them from the Microsoft websit):

When setting the video profile by calling setVideoProfile, why do some profiles have the same frame rate but different bitrates?

Different users set different video parameters:

Video Profile Enumeration Value Resolution (Width * Height) Frame Rate Bitrate (kbps)
360P 30 640 x 360 15 400
360P_9 38 640 x 360 15 800

Users who set the bitrate as 800 kbps prefer a higher image quality.

What is a callback?

There are two programming categories:

  • System Programming: Developing libraries related to the system.
  • Application Programming: Developing applications with functions that use the libraries related to the system.

A system programmer develops interfaces (Application Programming Interfaces) for the application programmers to use.

When an application is running, it calls functions included in the APIs. Callback functions require the application to send them a function to call first in order to execute the task.

The following figure shows how callback functions work:


When debugging in Windows, it says that agorartc.pdb is required. Where can I get it?

You can ignore message this as this does not impact the usage.

Is this page helpful?