Skip to main content

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:

  1. Your app client sends a request to your app server to apply for an Signaling token.
  2. 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.
  3. 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.
  • An Agora account and project.

  • 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:

  1. To download Git, click this link.
  2. To download Android Studio, click the link. Use Android Studio 4.1 or later. Agora recommends using the latest version.
  3. 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:

  1. To clone the repository, run the following command:


    _1
    git clone https://github.com/AgoraIO-Community/CloudClass-Android.git

  2. After the download is complete, navigate to the folder:


    _1
    cd CloudClass-Android

  3. To switch the branch, run the following command. Remember to replace {VERSION} with a specified version number:


    _1
    git checkout release/`{VERSION}`

    For example, if you want to switch to the branch of v2.6.0, just run the following command:


    _1
    git checkout release/2.6.0

    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:

  1. Import the CloudClass-Android project in Android Studio.

  2. Open the CloudClass-Android project in Android Studio, and run it on a physical mobile device. You can see the following page:

  3. 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: