Skip to main content

You are looking at Signaling v1.x Docs. The newest version is  Signaling 2.x

Version: 1.x

Run the sample project

This page shows you how to install and run the Signaling example project.

Prerequisites

In order to follow this procedure you must have:

  • Android Studio 4.1 or higher.
  • Android SDK API Level 24 or higher.
  • A mobile device that runs Android 4.1 or higher.
  • An Agora account and project.

  • A computer with Internet access.

    Ensure that no firewall is blocking your network communication.

Implement Signaling

1. Create an Agora project

Create a project in Agora Console, as follows:

  1. Log in to Console, and click Project Management in the left navigation menu to enter the Project Management page.

  2. Click Create.

    create button

  3. Enter your project name, and select APP ID for the authentication mechanism in the pop-up window. Agora recommends using an App ID for authentication only in a test environment, or if your project has low security requirements.

  4. Click Submit. You can see the created project on the Project Management page.

2. Get an App ID

Agora automatically assigns each project an App ID as a unique identifier.

To copy this App ID, find your project on the Project Management page in Agora Console, and click the eye icon to the right of the App ID.

get app id

3. Integrate the Signaling SDK

Refer to the following steps to integrate the Signaling SDK into the sample project:

  1. Download the Signaling repository on Github, and locate the Agora-Signaling-Tutorial-Android folder.

  2. Download the latest version of Real time Messaging SDK (Android Java) and extract the files.

  3. Copy the *.jar file in the SDK folder into the libs directory of the project folder, and copy the x86_64, x86, arm64-v8a, and armeabi-v7a folders to Agora-Signaling-Tutorial-Android\app\src\main\jniLibs.

4. Run the sample project

Refer to the following steps to run the sample project:

  1. Open app with Android Studio. Android automatically syncs the project with gradle.

  2. After successful syncing, enter your App ID in app > res > values > strings_config.xml.


    _4
    <?xml version="1.0" encoding="utf-8"?>
    _4
    <resources>
    _4
    <string translatable="false" name="agora_app_id">Your App ID</string>
    _4
    </resources>

  3. Compile and run the sample project. Enter any string as the user ID (such as userA) and click Login to log into Signaling.

    You need to specify the user ID yourself. The user ID supports the following character set:

    • All lowercase English letters: a to z

    • All uppercase English letters: A to Z

    • All numeric characters: 0 to 9

    • The space character.

    • Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " , ", "|", "~", ","

    1619169717476

Expected result

1619169728305

Signaling