Skip to main content

SDK quickstart

You use Signaling SDK to add low-latency, high-concurrency signaling and synchronization capabilities for real-time systems into your app. You can also use Signaling to enhance the user experience for Video Calling, Voice Calling, Interactive Live Streaming, and Broadcast Streaming.

This page shows you how to easily integrate pub-sub messaging into your app using Signaling SDK. For information about stream channels where users communicate using topics in a channel, see Stream channels.

Understand the tech

Pub-sub is the simplest form of messaging. Your creates a channel when a user subscribes to it. Your app listens for the channel events which contain the messages users publish to it.

You use an authentication token to authenticate a user with Signaling and join a channel. Each token is bound to a single user UID. This means that one concurrent user only may login from your app.

To create a pub-sub session for Signaling , implement the following steps in your app:

In this guide you retrieve a temporary token from Token Generator. To understand how to create an authentication server for development purposes, see Implement the authentication workflow. To develop your own token generator and integrate it into your production IAM system, read Token generators.

Prerequisites

In order to follow this procedure you must:

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

  • Raise a support ticket to activate Signaling. In your ticket, please provide the following details:
    • Your Agora Customer Id
    • The project VID for which you want Signaling enabled
    • The App Id for the project in which you want to integrate Signaling
    • Do you require Stream Channel activation: Yes or No
    • Do you need data storage (Storing user and channel attributes as metadata): Yes or No
    • Your geographical region for product activation: US, EU, APAC (excluding China), or China
    The Agora support team confirms activation through a ticket update.
Note
  • Signaling 2.x is an enhanced version compared to 1.x with a wide range of new features. It follows a new pricing structure. Please visit the Pricing page for details.
  • The beta version of Signaling 2.x is offered free for testing its features and performance.

Project setup

Agora supplies a single GitHub reference repository. This runnable and testable repo contains all the code used in this Signaling SDK documentation. To create a Signaling SDK development environment:

Implement Signaling

Best practice is to separate the Signaling workflows from your UI implementation. The Signaling SDK sample project implements the Signaling business logic in the SignalingManager object. This class encapsulates the signalingEngine, an instance of theAgoraRTM, and core functionality such as logging in to Signaling, sending a message, listening for messages from other users and logging out.

The following code examples show how to implement these steps in your app:

Test Signaling

This section explains how to run the reference app and see the corresponding features in an app.

In Signaling, each authentication token you create is specific for a user ID. You create a token for each user in the channel, each user must log in from different instance of your app. To test Signaling, you run 2 or more instances of your app . When you call login using Signaling SDK, ensure that the UID is the same as you used to create the token.

For each user in your tests:

  1. Generate a temporary token.

Reference

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

For more information, see:

Signaling