agora_rtm 0.9.9

AgoraRtm #

This Flutter plugin is a wapper for Agora RTM SDK. provides building blocks for you to add real-time messaging through a simple and powerful SDK. You can integrate the Agora RTM SDK to enable real-time messaging in your own application quickly.

Note: This plugin is still under development, and some APIs might not be available yet.

Usage #

To use this plugin, add agora_rtm as a dependency in your pubspec.yaml file.

Getting Started #

  • See the example directory for a sample app using AgoraRtm.

Error handling #

Kotlin version #

if your version less than 0.9.9, remove ext.kotlin_version = '1.3.0' from agora_rtm/build.gradle

from 0.9.9, the plugin will use your root project kotlin version, make sure your setting is correct

Release crash #

it causes by code obfuscation because of flutter set android.enableR8=true by the default

Add the following line in the app/ file to prevent code obfuscation:

-keep class io.agora.**{*;}

Note #

Flutter 1.12 #

if your MainActivity extends

please remove this line


you can refer to official documents

abiFilters #

Agora RTM sdk contain arm64 architecture, but Flutter is not shipping “” in arm64 currently. You need add "abiFilters" in build.gradle if you need build release apk.

android {
    defaultConfig {
         ndk {
             abiFilters 'armeabi-v7a'

How to contribute #

To help work on this sdk, see our contributor guide.

Change log #

0.9.9 #

  • fix Android Kotlin Gradle plugin version bug, now use your root project kotlin version

0.9.8 #

  • fix Android flutter pub get Please verify that this file has read permission and try again

0.9.7 #

  • fix iOS cocoapods target has transitive dependencies that include static binaries

0.9.6 #

  • upgrade to rtm 1.0.1: Support all agora_rtm native api.
  • refactor: ios & android, use FlutterEventChannel to serve agora_rtm event handler
  • fix multiple instance conflicts

0.9.5 #

  • upgrade to rtm 1.0.0
  • add method: setLocalUserAttributes, addOrUpdateLocalUserAttributes, deleteLocalUserAttributesByKeys clearLocalUserAttributes getUserAttributes getUserAttributesByKeys

0.9.4 #

  • fix android pending exception java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread

0.9.3 #

  • Bump kotlin version to 1.3.0

0.9.2 #

  • Flutter for Agora RTM SDK first release


AgoraRtm Example #

Demonstrates how to use the agora_rtm plugin.

Getting Started #

Create an Account and Obtain an App ID #

  1. Create a developer account at
  2. In the Dashboard that appears, click Projects > Project List in the left navigation.
  3. Copy the App ID from the Dashboard to a text file. You will use this ID later when you launch the app.

Update and Run the Sample Application #

Open the main.dart file. In the _createClient() method, update YOUR APP ID with your App ID.

_client = await AgoraRtmClient.createInstance('YOUR APP ID');

Run example #

Connect device and run.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  agora_rtm: ^0.9.9

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:agora_rtm/agora_rtm.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/agora_rtm.dart.

Run flutter format to format lib/agora_rtm.dart.

Format lib/src/agora_rtm_channel.dart.

Run flutter format to format lib/src/agora_rtm_channel.dart.

Format lib/src/agora_rtm_client.dart.

Run flutter format to format lib/src/agora_rtm_client.dart.

Format lib/src/agora_rtm_plugin.dart.

Run flutter format to format lib/src/agora_rtm_plugin.dart.

Format lib/src/utils.dart.

Run flutter format to format lib/src/utils.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies