Quickstart
This page explains how to quickly launch a flexible classroom.
Understand the tech
The following figure shows the workflow to join a flexible classroom.
When an app client requests to join a flexible classroom, the app client and your app server interact with the Agora server in the following steps:
- Your app client sends a request to your app server to apply for an Signaling token.
- Your app server generates an Signaling token using the Agora App ID, App Certificate, and a user ID. For details, see Generate an Signaling Token.
- Your app client calls an API to join a flexible classroom with the following parameters:
- The user ID: The unique identifier of a user. A string generated by your security system. Must be the same as the user ID that you use for generating an Signaling token.
- The room ID: A string for identifying a classroom. When your app user joins a flexible classroom, Agora automatically creates a classroom with the room ID.
- The Signaling token: A credential for verifying the identity of the user when your app user joins a flexible classroom.
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.
Set up the development environment
Running the web client of Flexible Classroom depends on Git, Android Studio, and Java Development Kit.
To prepare your development environment, refer to the following steps:
- To download Git, click this link.
- To download Android Studio, click the link. Use Android Studio 4.1 or later. Agora recommends using the latest version.
- To download the Java Development Kit, click the link.
Get the source code
The source code of Flexible Classroom (Android) is in the CloudClass-Android repository. To download the source code to your local device, refer to the following steps:
-
To clone the repository, run the following command:
-
To switch the branch, run the following command. Remember to replace
{VERSION}
with a specified version number:For example, if you want to switch to the branch of v2.6.0, just run the following command:
Agora recommends switching the branch of the latest release. The following image shows how to see the latest release branch in the GitHub repository:
Launch a flexible classroom
Follow these steps to launch a flexible classroom:
-
Import the CloudClass-Android project in Android Studio.
-
Open the CloudClass-Android project in Android Studio, and run it on a physical mobile device. You can see the following page:
-
To join a classroom, pass in a room name and user name, select a room type, and click Enter. You can see the following page:
Next steps
Satisfied with the features of Flexible Classroom and want to explore more? Next, you can integrate Flexible Classroom into your own project.