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.
-
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:
-
Log in to Console, and click Project Management in the left navigation menu to enter the Project Management page.
-
Click Create.
-
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.
-
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.
3. Integrate the Signaling SDK
Refer to the following steps to integrate the Signaling SDK into the sample project:
-
Download the Signaling repository on Github, and locate the
Agora-RTM-Tutorial-Android
folder. -
Download the latest version of Real time Messaging SDK (Android Java) and extract the files.
-
Copy the
*.jar
file in the SDK folder into thelibs
directory of the project folder, and copy thex86_64
,x86
,arm64-v8a
, andarmeabi-v7a
folders toAgora-RTM-Tutorial-Android\app\src\main\jniLibs
.
4. Run the sample project
Refer to the following steps to run the sample project:
-
Open
app
with Android Studio. Android automatically syncs the project with gradle. -
After successful syncing, enter your App ID in app > res > values > strings_config.xml.
-
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: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " , ", "|", "~", ","
-