Giter VIP home page Giter VIP logo

agora-flutter-quickstart's Introduction

Agora Flutter Quickstart

其他语言版本: 简体中文

This tutorial describes how to create an Agora account and build a sample app with Agora using Flutter.

Prerequisites

Quick Start

This repository shows you how to use Agora Flutter SDK to build a simple video call app. It demonstrates you how to:

  • Join / leave a channel
  • Mute / unmute audio
  • Switch camera views
  • Layout multiple video views

Screenshot-1 Screenshot-2

Create an Account and Obtain an App ID

To build and run the sample application, first obtain an app ID:

  1. Create a developer account at agora.io. Once you finish the sign-up process, you are redirected to the dashboard.
  2. Navigate in the dashboard tree on the left to Projects > Project List.
  3. Copy the app ID that you obtain from the dashboard into a text file. You will use this when you launch the app.

Update and Run the Sample Application

Open the settings.dart file and add the app ID.

  const APP_ID = "";

Run the packages get command in your project directory:

  # install dependencies
  flutter packages get

Once the build is complete, run the run command to start the app.

  # start app
  flutter run

We recommend you to use IDE to control overall build process during development

Details about how to set up the IDE please take a look at here

Error handling

Black screen

if your MainActivity extends io.flutter.embedding.android.FlutterActivity

please remove this line

GeneratedPluginRegistrant.registerWith(this)

you can refer to official documents

Release crash

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

Add the following line in the app/proguard-rules.pro file to prevent code obfuscation:

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

Reporting an issue

Please ensure you provide following information when you report an issue,

Environment

Flutter Doctor

run flutter doctor and copy the log output.

Agora SDK Logs

Insert below code

AgoraRtcEngine.setParameters("{\"rtc.log_filter\": 65535}");

to call.dart The eventual outcome would look like this,

...
    _initAgoraRtcEngine();
    _addAgoraEventHandlers();
    AgoraRtcEngine.enableWebSdkInteroperability(true);
    AgoraRtcEngine.setParameters('{\"che.video.lowBitRateStreamParameter\":{\"width\":320,\"height\":180,\"frameRate\":15,\"bitRate\":140}}');
    AgoraRtcEngine.setParameters("{\"rtc.log_filter\": 65535}");
    AgoraRtcEngine.joinChannel(null, widget.channelName, null, 0);
...

and then start the app. Our sdk log will print directly to console in this case.

Resources

Credit

https://pub.dartlang.org/packages/permission_handler

License

This software is under the MIT License (MIT).

agora-flutter-quickstart's People

Contributors

plutoless avatar azkdev avatar prwrl avatar lichking-2234 avatar victoruvarov avatar koudle avatar matrixbirds avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.