Skip to main content

Demo quickstart

Compelling content like animated presentations with embedded media helps actively engage students for longer in online classrooms. Agora Flexible Classroom helps you personalize distance learning using interactive video, shared whiteboards and other collaboration tools. With Flexible Classroom, you can quickly deploy effective online tutoring software that is customized with the features and branding your organization needs.

This page shows you how to quickly set up and launch a Flexible Classroom.

Understand the tech

This section explains the workflow you implement 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 for a Signaling token.
  2. Your app server generates a Signaling token using the Agora App ID, App Certificate, and a user ID. For details, see Generate a Signaling Token.
  3. Your app client calls an API with the following parameters to join a Flexible Classroom:
    • The user ID: A unique string identifying a user, generated by your security system. This ID must be the same as the user ID you use for generating the Signaling token.
    • The room ID: A string for identifying a classroom. When the first 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 they join 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.

Project setup

To set up your Flexible Classroom project, download the source code.

The source code for Flexible Classroom is located in the Github CloudClass-Android repository. To download the source code, take the following steps:

  1. Clone the repository locally by running 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. Agora recommends switching the branch to the latest release. To switch the branch version, run the following command. Remember to replace {VERSION} with a specific version number:


    _1
    git checkout release/{VERSION}

    For example, if you want to switch to the branch for version 2.7.1, run the command:


    _1
    git checkout release/2.7.1

    The following image shows how to find the latest release branch in the GitHub repository:

Implement a flexible classroom

Follow these steps to configure and launch your Flexible Classroom from the downloaded source code:

  1. Import the CloudClass-Android project in Android Studio

    In Android Studio, navigate to the File > New > Import Project... menu option and select the folder named CloudClass-Android in the browse window.

  2. Sync the Android project

    Android Studio automatically performs a gradle sync to downloads the dependencies.

  3. Update the parameters

    Copy your App ID and App Certificate from Agora Console and replace the values of agora_app_id and agora_app_cert in CloudClass-Android\app\src\main\res\values\string_config.xml.

Test your implementation

  1. Connect a physical Android device to your development device.

  2. In Android Studio, click Run app. A moment later, the project is installed on your device.

  3. In the login screen, enter the Room, your Name, the class Type, your Role and your current Region, then click Enter.

    Image

    You are logged in to Flexible Classroom and presented with the following UI:

  4. Install Flexible Classroom on a second Android device. Login with the same credentials but set Role to Student.

  5. The teacher and student can now interact and communicate using Flexible Classroom.

References

This section contains information that completes the information in this page, or points you to documentation that explains other aspects to this product.

  • To ensure communication security in a test or production environment, use of a token server to generate tokens is recommended. See Secure authentication with tokens.

  • To quickly customize Flexible Classroom source code before download, refer to the UI Builder quickstart.