Signaling Quickstart - Android Beta

Step 1: Obtain the Sample Code

Download Agora Signaling SDK from downloads, or contact

Agora Signaling SDK for Android package structure is listed as follows:

  • ./libs: including the required libraries
  • ./samples: including the sample code called myapp1


The sample code currently only supports audio function. Video function will be provided later.

Step 2: Prepare the Environments

Be sure that the following development environment requirements are satisfied:

Platform System Requirement Network Requirement
Android Android API 15 or later Port: HTTP 80 ,TCP 8181


Both real device and emulator are acceptable.

If you want to use the Agora Signaling SDK together with Agora Native SDK, be sure that the requirements of Agora Native SDK are also satisfied.

Step 3: Compile the Sample Code

  1. Select Import project (Eclipse ADT, Gradle, etc.) in the Android Studio.

  2. Import myapp1 using the import function of Android Studio.

  3. Fill the App ID, App Certificate as highlighted below in the file.

You can follow Obtaining an App ID and an App Certificate to get your App ID and APP Certificate.

For example,



In this demo, you can put the App Certificate directly here on the client side, but in product environment, keep your App Certificate on the server and never on any client machine.

  1. Click the Run button to compile the sample code.

Step 4: Execute the Sample Code

It requires two devices to demonstrate the functions included in the sample code.

Open the myapp1 application on the Android device after the compilation, and it displays the following screen:


The following table shows the function of the main buttons/menus:

Button Function
LOGIN Log onto the signaling system.
SWITCH Switch the calling party and the called party.
CALL Make a call.
INSTMSG Send the instant messages.
JOIN Join the channel.
MSG Send the channel messages.
xxx The user name of the calling party
yyy The user name of the called party
demoroom1 the pre-fined channel name
SPEAKER Enable the speaker.
MUTE Mute oneself.

Switch between test and product environment.

  • DEG: for test environment
  • PROD: for production environment

Executing the sample code according to the following scenarios:

  • Login
  • Join Channel
  • Make a Call

Scenario 1: Login

  1. Click LOGIN on both screens to login onto the signaling system. It returns Login successfully upon a successful login.

  2. Send an instant message.

    • On the left, click INSMSG: the user xxx sends an instant message to the user yyy.
    • On the right, the user yyy receives the message as highlighted below, and vice versa.
  3. Click LOGOUT on both screens to log out of the signaling system if necessary. It returns Logout successfully.


Scenario 2: Join Channel

  1. Be sure that both users are logged in.

  2. Click JOIN on both screens to join the channel demoroom1.

    It returns Join channel demoroom1 successfully, the user names and their corresponding UID who joined the channel.

  3. Send a channel message.

    • On the left, click MSG: the user xxx sends a channel message.
    • Both user xxx and user yyy receive the channel message.
  4. Click LEAVE on both screens to leave the demoroom1 channel if necessary.


Scenario 3: Make a Call

  1. Ensure that both users are logged in.

  2. On the left, click CALL: the user xxx make a call request.

    1. The user xxx automatically joins the channel demoroom1 and gets the current user list in the channel.
    2. The user yyy receives the call invitation.
    3. The user xxx receives the callback that the user yyy has received the invitation.
    4. The user yyy automatically joins the channel demoroom1 and gets the user list in the channel.
    5. The user xxx receives the callback that user yyy has accepted the invitation and has joined the channel demoroom1.

    Both users can now start to talk with each other.

  3. On the left, click END to end the call. Both users will leave the channel automatically.

  4. Click LOGOUT on both screens to log out of the system if necessary.