Claw Machine: Server Setup

There is a new release of the Developer Center! If you'd like to check it out, please click  here

Claw Machine: Server Setup

Integrating the SDK

Before integrating and configuring the Agora Wawaji SDK on the client, you need to integrate and configure the SDK on the server (claw machine). For more information, see Basic: Starting a Live Video Broadcast.

Running the Demo

The demo shows the following functionalities without enabling the dynamic key:

  • Join a claw machine room.
  • Live broadcast the prize grabbing process.
  • Leave a claw machine room.

Step 1: Prepare the Development Environment

Prepare the following development environment:

  • Android Studio 2.0 or later.
  • An Android device. (For example, Nexus 5X. Do not use an emulator.)

Step 2: Download the Demo

Download Wawaji-RTC-Server-Android-No-Dynamic-Key demo.

Step 3: Run the Demo

  1. Get an App ID (see Getting an App ID).
  2. Unpack the downloaded demo, and enter the acquired App ID in “app/src/main/res/values/string_config.xml”.
  3. Download Video SDK from the Agora Developer Center.
  4. Unpack the downloaded package.
  5. Open a new project on your Android Studio.
  6. Save the .jar file under the libs folder to the app/libs folder of your project.
  7. Save the arm64-v8a/x86/armeabi-v7a file under the libs folder to the app/src/main/libs folder of your project.
  8. Connect your Android device to your computer, and compile the demo before running it.

Code Snippets

Create a Media Engine

mRtcEngine = RtcEngine.create(mContext, appId, mEngineEventHandler.mRtcEventHandler);

Set the Channel Profile as Live Broadcast


Enable the Video


Set the Client Role

mRtcEngine.setClientRole(cRole, "");

Join a Channel

mRtcEngine.joinChannel(null, channel, "Wawaji", uid);

Leave a Channel

Is this page helpful?