Coder Social home page Coder Social logo

agoraio-extensions / agora-flutter-sdk Goto Github PK

View Code? Open in Web Editor NEW
725.0 58.0 380.0 18.65 MB

Flutter plugin of Agora RTC SDK for Android/iOS/macOS/Windows

Home Page: https://pub.dev/packages/agora_rtc_engine

License: MIT License

Java 0.50% Ruby 0.52% Objective-C 0.32% Dart 85.66% Kotlin 0.34% Swift 0.41% C++ 5.47% C 0.11% CMake 2.79% HTML 0.24% Shell 0.77% Objective-C++ 0.45% JavaScript 0.02% PowerShell 0.02% TypeScript 2.38%
flutter agora ios android rtc video macos windows sdk

agora-flutter-sdk's Introduction

agora_rtc_engine

Pub.dev likes Pub.dev points
latest version Platform License RTE Dev Slack Link

This Flutter plugin is a wrapper for Agora Video SDK

Agora.io provides building blocks for you to add real-time voice and video communications through a simple and powerful SDK. You can integrate the Agora SDK to enable real-time communications in your own application quickly.

NOTE: The main branch is major update base on the Agora Native SDK 4.x, which introduces some break changes. previous releases please see the following branches(the version < 6.0.0):

Usage

To use this plugin, please add agora_rtc_engine as a dependency to your pubspec.yaml file.

Getting Started

  • Get some basic and advanced examples from the example folder.

Privacy Permission

Agora Video SDK requires Camera and Microphone permission to start a video call.

Android

For the latest permission settings, please refer to the documentation at https://docs.agora.io/en/video-calling/get-started/get-started-sdk?platform=android#project-setup

See the required device permissions from the AndroidManifest.xml file.

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- The Agora SDK requires Bluetooth permissions in case users are using Bluetooth devices. -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- For Android 12 and above devices, the following permission is also required. -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

iOS & macOS

For the latest permission settings, please refer to the documentation at https://docs.agora.io/en/video-calling/get-started/get-started-sdk?platform=ios#project-setup

Open the Info.plist and add:

  • Privacy - Microphone Usage Description,and add some description into the Value column.
  • Privacy - Camera Usage Description, and add some description into the Value column.

Web (alpha)

The agora_rtc_engine for web is currently in alpha stage, and the documentation is incomplete and it has only been tested on desktop web at this time.

The agora_rtc_engine web is built on top of iris_web, a wrapper for the Agora Web SDK 4.x. This helps align the Native SDK (Android/iOS/macOS/Windows) APIs through the Agora Web SDK 4.x. Please note that the agora_rtc_engine web utilizes the Agora Web SDK 4.x underneath, so only a subset of the Native SDK APIs can be implemented on the web. If the APIs return AgoraRtcException with a -4 error code, this means these APIs are not supported at this time.

Download the iris_web(see the link below) artifact and include it as a <script /> tag in your <your-project>/web/index.html file. For example:

Project structure

<your-project>
|__web
   |__index.html
   |__iris-web-rtc_<x.y.z>.js
<!-- <your-project>/web/index.html -->
<!DOCTYPE html>
<html>
...
<body>
  ...
  <script src="iris-web-rtc_<x.y.z>.js"></script>
</body>
</html>

Download: https://download.agora.io/sdk/release/iris-web-rtc_n430_w4200_0.7.0.js

For Testing Purposes

You can directly depend on the Agora CDN for testing purposes:

<!-- <your-project>/web/index.html -->
<!DOCTYPE html>
<html>
...
<body>
  ...
  <script src="https://download.agora.io/sdk/release/iris-web-rtc_n430_w4200_0.7.0.js"></script>
</body>
</html>

Interact with Agora RTC Native SDK(Android/iOS only)

NOTE: This feature requires agora_rtc_engine >= 6.3.0

Due to performance constraints, direct implementation of advanced features like video and audio raw data processing is not currently feasible in Flutter side.

We enable you to create an RtcEngine within Flutter by utilizing the native handle from the RtcEngine(Android) or AgoraRtcEngineKit(iOS) of the Agora RTC Native SDK. This approach enables your application to directly utilize the advanced features of the Agora RTC Native SDK through the agora_rtc_engine package, bridging the gap between native capabilities and Flutter's environment.

More detail, please check the ProcessVideoRawData example for reference.

Known issues

iOS not work on release mode

If you experience issues with iOS not working in release mode, you may need to set the configuration below to avoid stripping symbols.

Please refer to the Flutter documentation for more information.

API Reference Resources

Feedback

If you have any problems or suggestions regarding the sample projects, feel free to file an issue OR pull request.

How to contribute

To help work on this sdk, please refer to CONTRIBUTING.md.

Related resources

License

The project is under the MIT license.

agora-flutter-sdk's People

Contributors

alexgrusu avatar aliyazdi75 avatar github-actions[bot] avatar guoxianzhe avatar lewooz avatar lichking-2234 avatar littlegnal avatar maxxfrazer avatar nate-thegrate avatar tadaspetra avatar zhangtao1104 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agora-flutter-sdk's Issues

Video Calling example don't work on Android Oreo

Steps to reproduce

1- provided App ID from the Dashboard
2- run flutter sameple on Android 8

Expected results

Data is sent between the peer connections.

Actual results

No data is sent between the peer connections.

使用flutter在安卓上开发遇到问题,随附log

我觉得核心问题在这里,但是没有更详细的信息了。有什么办法能一起查查吗?谢谢
12-09 13:19:52.787: E/RtcEngine(10007): onEvent: java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.Object java.util.HashMap.put(java.lang.Object, java.lang.Object)’ on a null object reference

这边不方便上传文件,我传到官方论坛了。
https://rtcdeveloper.com/t/topic/16463

setLiveTranscoding - Casting alpha field from Integer to float error

When I call setLiveTranscoding, I'm hitting the following error:

E/MethodChannel#agora_rtc_engine( 7411): java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Float
E/MethodChannel#agora_rtc_engine( 7411):        at io.agora.agorartcengine.AgoraRtcEnginePlugin.onMethodCall(AgoraRtcEnginePlugin.java:568)

Particular line in question:
user.alpha = (float) optionUser.get("alpha");

Audience view when broadcasting from android device.

When you start a Broadcast view on android the Audience views are mirrored and zoomed in.

When using Broadcast views on IOS the audience views are mirrored but not zoomed in.

This looks like a bug as the views should be the same between devices when Broadcasting to an audience. And the views shouldn't change based on the device broadcast.

Edit: Upon further testing this bug happens when you stream from any device. Not just IOS.

Issue with hiding a video view.

When starting a call I am trying to have the current users camera view be placed in a small box in the corner of the screen (rather than the default of it taking up half the screen).

  Widget _miniView(List<Widget> views) {
    return Positioned(
        bottom: 120,
        right: 20,
        child: Container(
          child: views[0],
          width: 100,
          height: 100,
          decoration: BoxDecoration(
            borderRadius: BorderRadius.all(Radius.circular(25)),
          ),
        ));
  }

This works except when you attempt to hide the box (such as using a ternary to hide the positioned widget) it calls the event that hid it.

For example if i have a button that mutes the local video stream and then hides the miniView using a boolean it will call twice, once when i tap the button and then will automatically call the onTap function a second time after when the view is hidden.

This weird double call of buttons only happens when trying to hide a video view.

flutter build apk报错

主要配置如下:
• Flutter version 1.12.13 at /Users/oliwen/sdk/flutter
classpath 'com.android.tools.build:gradle:3.2.1'
compileSdkVersion 29

debug都正常,build就报错,很奇怪,求解决

报错如下:

  • What went wrong:
    Execution failed for task ':agora_rtc_engine:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
Output: /Users/oliwen/77/77dj_app/build/agora_rtc_engine/intermediates/res/merged/release/values/values.xml:186: error: resource android:attr/fontVariationSettings not found.
/Users/oliwen/77/77dj_app/build/agora_rtc_engine/intermediates/res/merged/release/values/values.xml:187: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: /Users/oliwen/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/e6b9d6bb1b14e5a2bc026728f7062fec/aapt2-3.2.1-4818971-osx/aapt2 link -I\

Flutter android 打 release 包打开后 crash 附 catlog 【已解决】

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
    compileSdkVersion 28

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {

        applicationId "com.flywheel.lemon_english"
        minSdkVersion 28
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        ndk {
            //选择要添加的对应 cpu 类型的 .so 库。
            abiFilters 'armeabi-v7a'            // 还可以添加
        }

       
    }

    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
        }
    }

    buildTypes {
        // release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        //  signingConfig signingConfigs.debug
        //}

        release {
            signingConfig signingConfigs.release
            minifyEnabled true
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

cat log

9-18 20:32:06.623 1929 1929 D EventBus: [1929, u0] send(AppTransitionFinishedEvent)
09-18 20:32:06.623 1929 1929 D EventBus: [1929, u0] -> ForcedResizableInfoActivityController [0x6d65460, P1] onBusEvent(AppTransitionFinishedEvent)
09-18 20:32:06.623 1929 1929 D EventBus: [1929, u0] onBusEvent(AppTransitionFinishedEvent) duration: 3 microseconds, avg: 1293
09-18 20:32:06.623 1929 1929 D GestureStubView: resetRenderProperty: showGestureStub
09-18 20:32:06.623 1929 1929 D GestureStubView: showGestureStub
09-18 20:32:06.623 1929 1929 D GestureStubView: resetRenderProperty: showGestureStub
09-18 20:32:06.623 1929 1929 D GestureStubView: showGestureStub
09-18 20:32:06.626 16687 16687 E l.lemon_englis: ----- class 'Lio/agora/rtc/internal/RtcEngineImpl;' cl=0x13084040 -----
09-18 20:32:06.626 16687 16687 E l.lemon_englis: objectSize=405 (120 from super)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: access=0x8008.0001
09-18 20:32:06.626 16687 16687 E l.lemon_englis: super='java.lang.Class<io.agora.rtc.c>' (cl=0x13084040)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: vtable (58 entries, 0 in super):
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 0: int io.agora.rtc.internal.RtcEngineImpl.a(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 1: int io.agora.rtc.internal.RtcEngineImpl.a(int, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 2: int io.agora.rtc.internal.RtcEngineImpl.a(int, boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 3: int io.agora.rtc.internal.RtcEngineImpl.a(io.agora.rtc.a.b)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 4: int io.agora.rtc.internal.RtcEngineImpl.a(io.agora.rtc.video.c)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 5: int io.agora.rtc.internal.RtcEngineImpl.a(io.agora.rtc.video.d)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 6: int io.agora.rtc.internal.RtcEngineImpl.a(java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 7: int io.agora.rtc.internal.RtcEngineImpl.a(java.lang.String, io.agora.rtc.a.a)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 8: int io.agora.rtc.internal.RtcEngineImpl.a(java.lang.String, java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 9: int io.agora.rtc.internal.RtcEngineImpl.a(java.lang.String, java.lang.String, java.lang.String, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 10: int io.agora.rtc.internal.RtcEngineImpl.a(java.lang.String, boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 11: int io.agora.rtc.internal.RtcEngineImpl.a(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 12: int io.agora.rtc.internal.RtcEngineImpl.a(boolean, io.agora.rtc.video.b)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 13: void io.agora.rtc.internal.RtcEngineImpl.a(io.agora.rtc.a)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 14: void io.agora.rtc.internal.RtcEngineImpl.a(boolean, boolean, boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 15: int io.agora.rtc.internal.RtcEngineImpl.b()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 16: int io.agora.rtc.internal.RtcEngineImpl.b(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 17: int io.agora.rtc.internal.RtcEngineImpl.b(int, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 18: int io.agora.rtc.internal.RtcEngineImpl.b(int, boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 19: int io.agora.rtc.internal.RtcEngineImpl.b(io.agora.rtc.video.c)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 20: int io.agora.rtc.internal.RtcEngineImpl.b(java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 21: int io.agora.rtc.internal.RtcEngineImpl.b(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 22: void io.agora.rtc.internal.RtcEngineImpl.b(android.content.Context, java.lang.String, io.agora.rtc.a)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 23: int io.agora.rtc.internal.RtcEngineImpl.c()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 24: int io.agora.rtc.internal.RtcEngineImpl.c(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 25: int io.agora.rtc.internal.RtcEngineImpl.c(int, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 26: int io.agora.rtc.internal.RtcEngineImpl.c(java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 27: int io.agora.rtc.internal.RtcEngineImpl.c(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 28: int io.agora.rtc.internal.RtcEngineImpl.d()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 29: int io.agora.rtc.internal.RtcEngineImpl.d(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 30: int io.agora.rtc.internal.RtcEngineImpl.d(int, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 31: int io.agora.rtc.internal.RtcEngineImpl.d(java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 32: int io.agora.rtc.internal.RtcEngineImpl.d(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 33: int io.agora.rtc.internal.RtcEngineImpl.e()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 34: int io.agora.rtc.internal.RtcEngineImpl.e(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 35: int io.agora.rtc.internal.RtcEngineImpl.e(int, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 36: int io.agora.rtc.internal.RtcEngineImpl.e(java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 37: int io.agora.rtc.internal.RtcEngineImpl.e(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 38: int io.agora.rtc.internal.RtcEngineImpl.f()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 39: int io.agora.rtc.internal.RtcEngineImpl.f(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 40: int io.agora.rtc.internal.RtcEngineImpl.f(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 41: void io.agora.rtc.internal.RtcEngineImpl.finalize()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 42: int io.agora.rtc.internal.RtcEngineImpl.g()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 43: int io.agora.rtc.internal.RtcEngineImpl.g(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 44: int io.agora.rtc.internal.RtcEngineImpl.g(java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 45: int io.agora.rtc.internal.RtcEngineImpl.g(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 46: int io.agora.rtc.internal.RtcEngineImpl.h()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 47: int io.agora.rtc.internal.RtcEngineImpl.h(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 48: int io.agora.rtc.internal.RtcEngineImpl.h(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 49: int io.agora.rtc.internal.RtcEngineImpl.i()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 50: int io.agora.rtc.internal.RtcEngineImpl.i(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 51: int io.agora.rtc.internal.RtcEngineImpl.i(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 52: int io.agora.rtc.internal.RtcEngineImpl.j(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 53: boolean io.agora.rtc.internal.RtcEngineImpl.j()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 54: int io.agora.rtc.internal.RtcEngineImpl.k()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 55: int io.agora.rtc.internal.RtcEngineImpl.k(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 56: int io.agora.rtc.internal.RtcEngineImpl.l(boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 57: void io.agora.rtc.internal.RtcEngineImpl.o()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: direct methods (54 entries):
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 0: void io.agora.rtc.internal.RtcEngineImpl.()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 1: void io.agora.rtc.internal.RtcEngineImpl.(android.content.Context, java.lang.String, io.agora.rtc.a)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 2: int io.agora.rtc.internal.RtcEngineImpl.a(android.content.Context, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 3: int io.agora.rtc.internal.RtcEngineImpl.a(java.lang.String, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 4: java.lang.String io.agora.rtc.internal.RtcEngineImpl.a(java.lang.String, java.lang.Object[])
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 5: void io.agora.rtc.internal.RtcEngineImpl.a(android.content.Context, java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 6: void io.agora.rtc.internal.RtcEngineImpl.a(io.agora.rtc.internal.RtcEngineImpl, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 7: boolean io.agora.rtc.internal.RtcEngineImpl.a(io.agora.rtc.internal.RtcEngineImpl)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 8: int io.agora.rtc.internal.RtcEngineImpl.b(java.lang.String, java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 9: int io.agora.rtc.internal.RtcEngineImpl.b(java.lang.String, boolean)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 10: void io.agora.rtc.internal.RtcEngineImpl.b(android.content.Context)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 11: int io.agora.rtc.internal.RtcEngineImpl.c(java.lang.String, java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 12: void io.agora.rtc.internal.RtcEngineImpl.c(android.content.Context)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 13: int io.agora.rtc.internal.RtcEngineImpl.d(android.content.Context)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 14: int io.agora.rtc.internal.RtcEngineImpl.f(int, int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 15: boolean io.agora.rtc.internal.RtcEngineImpl.f(java.lang.String)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 16: void io.agora.rtc.internal.RtcEngineImpl.j(int)
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 17: void io.agora.rtc.internal.RtcEngineImpl.m()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 18: boolean io.agora.rtc.internal.RtcEngineImpl.n()
09-18 20:32:06.626 16687 16687 E l.lemon_englis: 19: int io.agora.rtc.internal.RtcEngineImpl.nativeAddInjectStreamUrl(long, java.lang.String, byte[])
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 20: int io.agora.rtc.internal.RtcEngineImpl.nativeAddPublishStreamUrl(long, java.lang.String, boolean)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 21: int io.agora.rtc.internal.RtcEngineImpl.nativeClassInit()
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 22: int io.agora.rtc.internal.RtcEngineImpl.nativeDestroy(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 23: int io.agora.rtc.internal.RtcEngineImpl.nativeDisableVideo(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 24: int io.agora.rtc.internal.RtcEngineImpl.nativeEnableLocalAudio(long, boolean)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 25: int io.agora.rtc.internal.RtcEngineImpl.nativeEnableVideo(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 26: int io.agora.rtc.internal.RtcEngineImpl.nativeGetConncetionState(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 27: java.lang.String io.agora.rtc.internal.RtcEngineImpl.nativeGetSdkVersion()
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 28: boolean io.agora.rtc.internal.RtcEngineImpl.nativeIsSpeakerphoneEnabled(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 29: int io.agora.rtc.internal.RtcEngineImpl.nativeJoinChannel(long, byte[], java.lang.String, java.lang.String, java.lang.String, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 30: int io.agora.rtc.internal.RtcEngineImpl.nativeLeaveChannel(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 31: int io.agora.rtc.internal.RtcEngineImpl.nativeLog(int, java.lang.String)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 32: int io.agora.rtc.internal.RtcEngineImpl.nativeMuteAllRemoteVideoStreams(long, boolean)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 33: int io.agora.rtc.internal.RtcEngineImpl.nativeMuteLocalVideoStream(long, boolean)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 34: long io.agora.rtc.internal.RtcEngineImpl.nativeObjectInit(java.lang.Object, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 35: int io.agora.rtc.internal.RtcEngineImpl.nativeRemoveInjectStreamUrl(long, java.lang.String)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 36: int io.agora.rtc.internal.RtcEngineImpl.nativeRemovePublishStreamUrl(long, java.lang.String)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 37: int io.agora.rtc.internal.RtcEngineImpl.nativeSetAudioProfile(long, int, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 38: int io.agora.rtc.internal.RtcEngineImpl.nativeSetBeautyEffectOptions(long, boolean, int, float, float, float)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 39: int io.agora.rtc.internal.RtcEngineImpl.nativeSetChannelProfile(long, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 40: int io.agora.rtc.internal.RtcEngineImpl.nativeSetDefaultAudioRoutetoSpeakerphone(long, boolean)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 41: int io.agora.rtc.internal.RtcEngineImpl.nativeSetEnableSpeakerphone(long, boolean)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 42: int io.agora.rtc.internal.RtcEngineImpl.nativeSetEncryptionSecret(long, java.lang.String)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 43: int io.agora.rtc.internal.RtcEngineImpl.nativeSetLiveTranscoding(long, byte[])
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 44: int io.agora.rtc.internal.RtcEngineImpl.nativeSetParameters(long, java.lang.String)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 45: int io.agora.rtc.internal.RtcEngineImpl.nativeSetRemoteUserPriority(long, int, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 46: int io.agora.rtc.internal.RtcEngineImpl.nativeSetVideoEncoderConfiguration(long, int, int, int, int, int, int, int, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 47: int io.agora.rtc.internal.RtcEngineImpl.nativeSetupVideoLocal(long, android.view.SurfaceView, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 48: int io.agora.rtc.internal.RtcEngineImpl.nativeSetupVideoRemote(long, android.view.SurfaceView, int, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 49: int io.agora.rtc.internal.RtcEngineImpl.nativeStartPreview(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 50: int io.agora.rtc.internal.RtcEngineImpl.nativeSwitchCamera(long)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 51: int io.agora.rtc.internal.RtcEngineImpl.nativeSwitchChannel(long, java.lang.String, java.lang.String)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 52: void io.agora.rtc.internal.RtcEngineImpl.p()
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 53: int io.agora.rtc.internal.RtcEngineImpl.setExtVideoSource(long, int, int)
09-18 20:32:06.627 16687 16687 E l.lemon_englis: static fields (2 entries):
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 0: float[] io.agora.rtc.internal.RtcEngineImpl.a
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 1: boolean io.agora.rtc.internal.RtcEngineImpl.k
09-18 20:32:06.627 16687 16687 E l.lemon_englis: instance fields (16 entries):
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 0: int io.agora.rtc.internal.RtcEngineImpl.b
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 1: boolean io.agora.rtc.internal.RtcEngineImpl.c
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 2: boolean io.agora.rtc.internal.RtcEngineImpl.d
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 3: int io.agora.rtc.internal.RtcEngineImpl.e
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 4: int io.agora.rtc.internal.RtcEngineImpl.f
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 5: android.view.OrientationEventListener io.agora.rtc.internal.RtcEngineImpl.g
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 6: long io.agora.rtc.internal.RtcEngineImpl.h
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 7: int io.agora.rtc.internal.RtcEngineImpl.i
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 8: long io.agora.rtc.internal.RtcEngineImpl.j
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 9: java.util.concurrent.ConcurrentHashMap io.agora.rtc.internal.RtcEngineImpl.l
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 10: io.agora.rtc.a$a io.agora.rtc.internal.RtcEngineImpl.m
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 11: android.net.wifi.WifiManager$WifiLock io.agora.rtc.internal.RtcEngineImpl.n
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 12: int io.agora.rtc.internal.RtcEngineImpl.o
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 13: int io.agora.rtc.internal.RtcEngineImpl.p
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 14: java.lang.ref.WeakReference io.agora.rtc.internal.RtcEngineImpl.q
09-18 20:32:06.627 16687 16687 E l.lemon_englis: 15: int io.agora.rtc.internal.RtcEngineImpl.r
09-18 20:32:06.627 16687 16687 E l.lemon_englis:
09-18 20:32:06.627 16687 16687 E l.lemon_englis: Failed to register native method io.agora.rtc.internal.RtcEngineImpl.nativeGetParameters(JLjava/lang/String;)Ljava/lang/String; in /data/app/com.flywheel.lemon_english-NI3NueZAJPQ5rSyfYiIk7A==/base.apk
09-18 20:32:06.628 16687 16687 E flutter : [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.NoSuchMethodError: no static or non-static method "Lio/agora/rtc/internal/RtcEngineImpl;.nativeGetParameters(JLjava/lang/String;)Ljava/lang/String;"
09-18 20:32:06.628 16687 16687 E flutter : at java.lang.Runtime.nativeLoad(Native Method)
09-18 20:32:06.628 16687 16687 E flutter : at java.lang.Runtime.loadLibrary0(Runtime.java:1014)
09-18 20:32:06.628 16687 16687 E flutter : at java.lang.System.loadLibrary(System.java:1669)
09-18 20:32:06.628 16687 16687 E flutter : at io.agora.rtc.internal.RtcEngineImpl.m(Unknown Source:5)
09-18 20:32:06.628 16687 16687 E flutter : at io.agora.rtc.internal.RtcEngineImpl.n(Unknown Source:7)
09-18 20:32:06.628 16687 16687 E flutter : at io.agora.rtc.b.a(Unknown Source:5)
09-18 20:32:06.628 16687 16687 E flutter : at io.agora.a.c.onMethodCall(Unknown Source:2581)
09-18 20:32:06.628 16687 16687 E flutter : at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
09-18 20:32:06.628 16687 16687 E flutter : at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:59)
09-18 20:32:06.628 16687 16687 E flutter : at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:6)
09-18 20:32:06.628 16687 16687 E flutter : at android.os.MessageQueue.nativePollOnce(Native Method)
09-18 20:32:06.628 16687 16687 E flutter : at android.os.MessageQueue.next(MessageQueue.java:326)
09-18 20:32:06.628 16687 16687 E flutter : at android.os.Looper.loop(Looper.java:165)
09-18 20:32:06.628 16687 16687 E flutter : at android.app.ActivityThread.main(ActivityThread.java:6806)
09-18 20:32:06.628 16687 16687 E flutter : at java.lang.reflect.Method.invoke(Native Method)
09-18 20:32:06.628 16687 16687 E flutter : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
09-18 20:32:06.628 16687 16687 E flutter : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
09-18 20:32:06.628 16687 16687 E flutter :
09-18 20:32:06.628 16687 16687 F flutter : [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
09-18 20:32:06.628 16687 16687 F libc : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 16687 (l.lemon_english), pid 16687 (l.lemon_english)
09-18 20:32:06.638 1929 1929 D GestureStubView: gatherTransparentRegion: need render w:54 h:1348
09-18 20:32:06.641 1929 1929 D GestureStubView: gatherTransparentRegion: need render w:54 h:1348
09-18 20:32:06.712 16747 16747 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
09-18 20:32:06.712 972 972 I /system/bin/tombstoned: received crash request for pid 16687
09-18 20:32:06.713 16747 16747 I crash_dump32: performing dump of process 16687 (target tid = 16687)
09-18 20:32:06.722 16747 16747 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-18 20:32:06.722 16747 16747 F DEBUG : Build fingerprint: 'Xiaomi/dipper/dipper:9/PKQ1.180729.001/9.3.1:user/release-keys'
09-18 20:32:06.723 16747 16747 F DEBUG : Revision: '0'
09-18 20:32:06.723 16747 16747 F DEBUG : ABI: 'arm'
09-18 20:32:06.723 16747 16747 F DEBUG : pid: 16687, tid: 16687, name: l.lemon_english >>> com.flywheel.lemon_english <<<
09-18 20:32:06.723 16747 16747 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-18 20:32:06.723 16747 16747 F DEBUG : Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
09-18 20:32:06.723 16747 16747 F DEBUG : '
09-18 20:32:06.723 16747 16747 F DEBUG : r0 00000000 r1 0000412f r2 00000006 r3 00000008
09-18 20:32:06.723 16747 16747 F DEBUG : r4 0000412f r5 0000412f r6 ff8ac3c4 r7 0000010c

Android Java Error with Access Denied

Hi, I've tried to setup my own app and this is the error log that I keep receiving.
I'm using ^1.0.1

E/RtcEngine(21974): onEvent: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
E/libc    (21974): Access denied finding property "net.dns1"
E/libc    (21974): Access denied finding property "net.dns2"
E/libc    (21974): Access denied finding property "net.dns3"
E/libc    (21974): Access denied finding property "net.dns4"
I/Choreographer(21974): Skipped 55 frames!  The application may be doing too much work on its main thread.
E/BufferQueueProducer(21974): [ImageReader-640x480f23m2-21974-0] dequeueBuffer: BufferQueue has been abandoned
E/RtcEngine(21974): onEvent: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
W/Gralloc3(21974): allocator 3.x is not supported

Flutter version

[✓] Flutter (Channel stable, v1.9.1+hotfix.5, on Mac OS X 10.14.5 18F132, locale en-SG)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.37.0)
[✓] Connected device (2 available)

VoIP Push Notification

Is it included in the project? I mean, is it possible to show ringing screen when user A is calling user B.. Like Messenger/Viber/WhatsUp?

Thx!

flutter调用native大部分接口没有执行result.success

Android实现大部分的接口没有调用result.success(null)来返回结果,并且dart端全部使用 async+await模式。这样导致如果在dart端调用AgoraRtcEngine方法时也使用协程会卡住无法继续执行,因为大部分接口返回的Future永远不会被执行。还有Android端result不需要包装,不管Android端在哪个线程调用result的方法都会在dart的主线程返回。

setLocalVideoMirrorMode?

I see a setLocalVideoMirrorMode function the Java API reference there doesn't seem to be a way to use it in the flutter plugin. Is there any plans to add this as functionality?

android9.0音量键调节无效

android9.0系统,在音频直播场景下,通过音量键调节音量不生效,但是其他系统是正常的,需要开发者自己处理onKeyDown 事件吗?还是说有其他某些地方设置不对?

Execution failed for task ':agora_rtc_engine:verifyReleaseResources'.

I updated Flutter SDK into 1.12 and when I try to build an apk, it throws this error.

Note: Recompile with -Xlint:unchecked for details.                      
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':agora_rtc_engine:verifyReleaseResources'.   
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/esen/IdeaProjects/mobile.1/build/agora_rtc_engine/intermediates/res/merged/release/values/values.xml:237: error: resource android:attr/fontVariationSettings not found.
  /Users/esen/IdeaProjects/mobile.1/build/agora_rtc_engine/intermediates/res/merged/release/values/values.xml:238: error: resource android:attr/ttcIndex not found.
  error: failed linking references.                                     
                                                                        
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 1s                                                      
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                       2.4s
Gradle task assembleRelease failed with exit code 1

This is my app/build.gradle:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 29

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "******************"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}

apply plugin: 'com.google.gms.google-services'

打apk包失败

flutter build apk
Initializing gradle... 2.0s
Resolving dependencies... 4.6s
Gradle task 'assembleRelease'...

Compiler message:
file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/agora_rtc_engine-0.9.7/lib/agora_rtc_engine.dart:385:20: Error: Th
e method 'invokeListMethod' isn't defined for the class '#lib1::MethodChannel'.
Try correcting the name to the name of an existing method, or defining a method named 'invokeListMethod'.
await _channel.invokeListMethod('setBeautyEffectOptions',
^^^^^^^^^^^^^^^^
Compiler terminated unexpectedly.
12.5s
Gradle task assembleRelease failed with exit code 1

setLiveTranscoding - VideoCodecProfileType - Array of out bounds

In Android, when I use setLiveTranscoding, I'm hitting the below error:

E/MethodChannel#agora_rtc_engine( 6273): java.lang.ArrayIndexOutOfBoundsException: length=3; index=100
E/MethodChannel#agora_rtc_engine( 6273):        at io.agora.agorartcengine.AgoraRtcEnginePlugin.onMethodCall(AgoraRtcEnginePlugin.java:512)

The particular line which throws the error:
transcoding.videoCodecProfile = LiveTranscoding.VideoCodecProfileType.values()[(int) params.get("videoCodecProfile")];

The issue:
In Agora SDK, VideoCodecProfileType enum has the following members:
BASELINE =(66)
MAIN =(77)
HIGH =(100)

In the Agora Flutter SDK, when it's invoking setLiveTranscoding platform channel method, its resolving the VideoCodecProfileType enum to its int value.

Map<AgoraVideoCodecProfileType, int> _resolveVideoCodecProfileType = {
  AgoraVideoCodecProfileType.BaseLine: 66,
  AgoraVideoCodecProfileType.Main: 77,
  AgoraVideoCodecProfileType.High: 100
};

The particular line 512 is trying to resolve the int value back to the enum by using the ordinal of the enum, which causes the ArrayIndexOutOfBoundsException.

RtcStats "users" always null

Hi,

I'm trying to get the number of viewers of a Broadcast, is "users" from RtcStats the value that i need ?

If so, it seems to be always null, on the Broadcaster side as well as on the Audience side.

Here is the code i use :
void _addAgoraEventHandlers() { AgoraRtcEngine.onRtcStats = (RtcStats stats) { setState(() { viewers = stats.users; }); }; }

Then i display the viewers number in a Text widget.

Beside that, i encountered 0 problem using Agora it's a great platform !

Black Screen Issue

Only Black Screen when I copy-paste the code, but when I run the downloaded example, it's working fine

I tried both examples:

Steps I have done:

  • Downloaded Example from both repo & Updated APP_ID
  • Run flutter pub get & flutter run

It's working perfectly

But,

  • Created a few flutter project (Note: I'm using latest version of the flutter)
  • Copy the `lib' folder
  • Updated AndroidManifest.xml
  • Added permission & agora package to my pubspec.yaml & installed
  • Run

ONLY BLACK SCREEN & NO ERRORS ON CONSOLE ( I have tried https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart#reporting-an-issue)

Note:
When I try to run your repo example & newly created example. I can see remote video working, but the local video is a black screen. which means your repo can capture the video and rendering. I think the issue here is capturing the video when we creating a new project

Need Agora RTC version 2.9.0 for x86_64 arch

Google is now restricting to publish app only if 64 bit code should be present along with 32bit code. For the native agora rtc version 2.8.0 there is no 'x86_64' code but v2.9.0 has. so please update the agora version so that in final build we will get 64bit code as well.

华为手机报错E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist!

07/16 11:07:46: Launching app
$ adb install-multiple -r -t /Users/pengwu/Flutter-SDK/example/build/app/intermediates/resources/instant-run/debug/resources-debug.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/dep/dependencies.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_4.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_3.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_0.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_2.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_1.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_8.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_6.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_7.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_9.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/split-apk/debug/slices/slice_5.apk /Users/pengwu/Flutter-SDK/example/build/app/intermediates/instant-run-apk/debug/app-debug.apk
Split APKs installed in 9 s 33 ms
$ adb shell am start -n "io.agora.agorartcengineexample/io.agora.agorartcengineexample.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 27085 on device huawei-col_al10-9YE0218703008060
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=io.agora.agorartcengineexample#10610#256
I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=io.agora.agorartcengineexample#10610#0
I/tcengineexampl: The ClassLoaderContext is a special shared library.
W/tcengineexampl: JIT profile information will not be recorded: profile file does not exits.
W/tcengineexampl: JIT profile information will not be recorded: profile file does not exits.
I/AwareBitmapCacher: init processName:io.agora.agorartcengineexample pid=27085 uid=10610
I/InstantRun: starting instant run server: is main process
E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@1209910
I/ResourceExtractor: Resource version mismatch res_timestamp-1-1563246473911
E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist!
D/ZrHung.AppEyeUiProbe: notify runnable to start.
D/ZrHung.AppEyeUiProbe: Runnable thread started.
D/IMonitor: Load library imonitor_jni
V/ActivityThread: Skipping new config:{1.0 460mcc7mnc [zh_CN_#Hans] ldltr sw360dp w360dp h730dp 480dpi nrml long hdr port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 2190, 1080) mAppBounds=Rect(0, 90 - 1080, 2280) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.184}, config:{1.0 460mcc7mnc [zh_CN_#Hans] ldltr sw360dp w360dp h730dp 480dpi nrml long hdr port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 2190, 1080) mAppBounds=Rect(0, 90 - 1080, 2280) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.184} for app:io.agora.agorartcengineexample
V/HwPolicyFactory: : success to get AllImpl object and return....
V/ActivityThread: callActivityOnCreate
V/HwWidgetFactory: : successes to get AllImpl object and return....
I/HwApsImpl: APS: new HwApsImpl created
I/hwaps: HwAps: JNI_OnLoad
D/HiTouch_PressGestureDetector: HiTouch on notch display, height corret:90
I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/kernel_blob.bin
I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/vm_snapshot_data
I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/isolate_snapshot_data
D/OpenGLRenderer: Skia GL Pipeline
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
I/iGraphics: [0020080c] pn: io.agora.agorartcengineexample, p: 27085
I/iGraphics: [0030050a] lv: 1.0, cv: 5, Version:B343
W/iGraphics: [0030050c] io.agora.agorartcengineexample not in
I/iGraphics: [0030080c] opt app: 0
D/ActivityThread: add activity client record, r= ActivityRecord{ee0bdc3 token=android.os.BinderProxy@bde363c {io.agora.agorartcengineexample/io.agora.agorartcengineexample.MainActivity}} token= android.os.BinderProxy@bde363c
D/ZrHung.AppEyeUiProbe: notify runnable to start.
D/HwAppInnerBoostImpl: set config for io.agora.agorartcengineexample BOOST_FLAG=true REPORT_DURATION_CLICK=1000 REPORT_TIMES_CLICK=3 REPORT_DURATION_SLIDE=5000 REPORT_TIMES_SLIDE=16
D/OpenGLRenderer: HWUI Binary is enabled
disableOutlineDraw is true
I/HiTouch_HiTouchSensor: enabledInPad = false,isPcCastMode = false
I/flutter: Observatory listening on http://127.0.0.1:46261/t7GfWQYNDDc=/
I/iGraphics: [0030080c] opt app: 0
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 2
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
I/ViewRootImpl: jank_removeInvalidNode jank list is null
W/InputMethodManager: startInputReason = 1
W/InputMethodManager: startInputReason = 5
V/AudioManager: isWiredHeadsetOn...
E/agora-jni: exception occurred at jni call safeCallIntMethod()
W/System.err: java.lang.SecurityException: getSerial requires READ_PHONE_STATE or READ_PRIVILEGED_PHONE_STATE permission
at android.os.Parcel.createException(Parcel.java:1953)
at android.os.Parcel.readException(Parcel.java:1921)
at android.os.Parcel.readException(Parcel.java:1871)
at android.os.IDeviceIdentifiersPolicyService$Stub$Proxy.getSerial(IDeviceIdentifiersPolicyService.java:94)
at android.os.Build.getSerial(Build.java:154)
at io.agora.rtc.internal.CommonUtility.isSimulator(CommonUtility.java:253)
at io.agora.rtc.internal.RtcEngineImpl.nativeObjectInit(Native Method)
at io.agora.rtc.internal.RtcEngineImpl.(RtcEngineImpl.java:175)
W/System.err: at io.agora.rtc.RtcEngine.create(RtcEngine.java:61)
at io.agora.agorartcengine.AgoraRtcEnginePlugin.onMethodCall(AgoraRtcEnginePlugin.java:82)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:386)
at android.os.Looper.loop(Looper.java:169)
at android.app.ActivityThread.main(ActivityThread.java:7470)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.os.DeviceIdentifiersPolicyService$DeviceIdentifiersPolicy.getSerial(DeviceIdentifiersPolicyService.java:89)
at android.os.IDeviceIdentifiersPolicyService$Stub.onTransact(IDeviceIdentifiersPolicyService.java:52)
at android.os.Binder.execTransact(Binder.java:739)
E/libc: Access denied finding property "net.dns1"
Access denied finding property "net.dns2"
Access denied finding property "net.dns3"
Access denied finding property "net.dns4"
W/tcengineexampl: Accessing hidden method Landroid/telephony/SignalStrength;->getDbm()I (light greylist, reflection)
W/tcengineexampl: Accessing hidden method Landroid/telephony/SignalStrength;->getAsuLevel()I (light greylist, reflection)
E/libc: Access denied finding property "net.dns1"
Access denied finding property "net.dns2"
Access denied finding property "net.dns3"
Access denied finding property "net.dns4"
D/BluetoothHeadset: Proxy object connected
D/HiTouch_PressGestureDetector: HiTouch on notch display, width corret:99
D/OpenGLRenderer: HWUI Binary is enabled
disableOutlineDraw is true

[bug] java.lang.NullPointerException occurred when starting video chat(AgoraRtcEngin init)

Just a bug report.

I build sample code of this repository.
When start AgoraRTC video chat, the following error occurred.

I/CameraManagerGlobal(  475): Connecting to camera service
D/HostConnection(  475): HostConnection::get() New Host Connection established 0xb9f7aa50, tid 572
D/HostConnection(  475): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
D/eglCodecCommon(  475): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(  475): eglCreateContext: 0xd225e000: maj 3 min 0 rcv 3
I/AGORA_SDK(  475): INFO    ( 0:36:57:955 |   29)    565; Agora Engine video codec set to custom mode role mode 0
I/AGORA_SDK(  475): INFO    ( 0:36:57:956 |    1)    565; Agora Engine video codec index 1
I/AGORA_SDK(  475): INFO    ( 0:36:57:956 |    0)    565; Agora Engine video stream type = 0
D/AGORA_SDK(  475): MEMORY  ( 0:36:57:956 |    0)    565; SSRCDatabase created
D/AGORA_SDK(  475): MEMORY  ( 0:36:57:957 |    1)    565; RTPSender created
D/AGORA_SDK(  475): MEMORY  ( 0:36:57:958 |    1)    565; RTCPSender created
D/AGORA_SDK(  475): MEMORY  ( 0:36:57:958 |    0)    565; RTCPReceiver created
D/AGORA_SDK(  475): MEMORY  ( 0:36:57:958 |    0)    565; ModuleRtpRtcpImpl created
D/AGORA_SDK(  475): MODCALL ( 0:36:57:958 |    0)    565; SetMaxTransferUnit(1300)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:958 |    0)    565; SetREMBStatus(disable)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:958 |    0)    565; SetStartTimestamp(0)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:958 |    0)    565; SetGenericFECStatus(enable, 116)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:958 |    0)    565; RegisterSendPayload(pl_name:H264 pl_type:107)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:958 |    0)    565; RegisterSendPayload(pl_name:VP8 pl_type:100)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:959 |    1)    565; SetRTCPStatus(1)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:959 |    0)    565; MaxDataPayloadLength()
D/EGL_emulation(  475): eglMakeCurrent: 0xd571a0c0: ver 3 0 (tinfo 0xd570f530)
I/AGORA_SDK(  475): INFO    ( 0:36:57:970 |   11)    574; Thread with name:VideoEncodeThread started 
I/AGORA_SDK(  475): INFO    ( 0:36:57:970 |    0)    565; last unique frame idx: -1 - -1
I/AGORA_SDK(  475): INFO    ( 0:36:57:971 |    1)    565; EncoderWrapper::Create hardware_ = 0, hardware_low_ = 0
I/AGORA_SDK(  475): INFO    ( 0:36:57:971 |    0)    565; hwenc=0,hwenc_low=0,enlarge_big = 0,enlarge_small=0
I/AGORA_SDK(  475): INFO    ( 0:36:57:971 |    0)    565; low bit rate limit 1610612736
I/AGORA_SDK(  475): INFO    ( 0:36:57:971 |    0)    565; dont need to increase unique frame idx
I/AGORA_SDK(  475): INFO    ( 0:36:57:971 |    0)    565; the init unique frame idx: -1 - -1
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; RegisterSendPayload(pl_name:H264 pl_type:107)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; SetSendingStatus(stopped)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; SetTargetSendBitrate: 1 streams
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; Sending()
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; SetSendingStatus(sending)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; CurrentSendFrequencyHz()
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; PacketCountSent()
D/AGORA_SDK(  475): MODCALL ( 0:36:57:971 |    0)    565; ByteCountSent()
I/AGORA_SDK(  475): INFO    ( 0:36:57:981 |   10)    575; Thread with name:VideoProcessThread started 
I/AGORA_SDK(  475): INFO    ( 0:36:57:982 |    1)    565; setCodec: index=1 width=640 height=360 framerate=15
D/AGORA_SDK(  475): APICALL ( 0:36:57:983 |  138)    565; SendCodec type
D/AGORA_SDK(  475): APICALL ( 0:36:57:983 |    0)    565; SendCodec
I/AGORA_SDK(  475): INFO    ( 0:36:57:983 |    1)    565; setCodec: Intra Request = 0
D/AGORA_SDK(  475): MODCALL ( 0:36:57:983 |    0)    565; MaxDataPayloadLength()
D/EGL_emulation(  475): eglMakeCurrent: 0xd225e000: ver 3 0 (tinfo 0xbe49f230)
I/AGORA_SDK(  475): INFO    ( 0:36:57:997 |   14)    576; Thread with name:VideoEncodeThread started 
D/AGORA_SDK(  475): APICALL ( 0:36:57:997 |   14)    565; SendCodec
D/AGORA_SDK(  475): MODCALL ( 0:36:57:997 |    0)    565; RegisterSendPayload(pl_name:H264 pl_type:107)
D/AGORA_SDK(  475): MODCALL ( 0:36:57:997 |    0)    565; SetTargetSendBitrate: 1 streams
D/AGORA_SDK(  475): MODCALL ( 0:36:57:997 |    0)    565; Sending()
D/AGORA_SDK(  475): APICALL ( 0:36:57:998 |    1)    565; setCodec : 1 :H264
I/AGORA_SDK(  475): INFO    ( 0:36:57:998 |    1)    565; EnableLowBitRateStream: dual streams enabled 1 share 0 details 0
I/AGORA_SDK(  475): INFO    ( 0:36:57:998 |    0)    565; h264WebInteropEnable: enable 1
I/AGORA_SDK(  475): INFO    ( 0:36:57:998 |    0)    565; setCaptureDevice: index=1
I/AGORA_SDK(  475): INFO    ( 0:36:58:  4 |    0)    565; setMaxVideoBitrate: max bitrate=0
I/AGORA_SDK(  475): INFO    ( 0:36:58:  4 |    0)    565; set lowBitRateStreamParamete w/h/fps/br (320/180/15/140)
I/AGORA_SDK(  475): INFO    ( 0:36:58:  5 |    1)    565; setCodecResolutionLow: 320 * 180
I/AGORA_SDK(  475): INFO    ( 0:36:58:  5 |    0)    565; setCodecFramerateLow: 15
I/AGORA_SDK(  475): INFO    ( 0:36:58:  5 |    0)    565; setMaxVideoBitrateLow: 140
I/AGORA_SDK(  475): INFO    ( 0:36:58:  6 |    1)    565; setCodec: index=1 width=640 height=360 framerate=15
D/AGORA_SDK(  475): APICALL ( 0:36:58:  6 |    0)    565; SendCodec type
D/AGORA_SDK(  475): APICALL ( 0:36:58:  7 |    1)    565; SendCodec
I/AGORA_SDK(  475): INFO    ( 0:36:58:  7 |    1)    565; setCodec: Intra Request = 0
D/AGORA_SDK(  475): MODCALL ( 0:36:58:  7 |    0)    565; MaxDataPayloadLength()
I/AGORA_SDK(  475): Surface changed to width 1080 height 1808
I/AGORA_SDK(  475): INFO    ( 0:36:58: 23 |   16)    565; last unique frame idx: -1 - -1
I/AGORA_SDK(  475): INFO    ( 0:36:58: 23 |    0)    565; EncoderWrapper::Create hardware_ = 0, hardware_low_ = 0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 23 |    0)    565; hwenc=0,hwenc_low=0,enlarge_big = 0,enlarge_small=0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 23 |    0)    565; low bit rate limit 0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 23 |    0)    565; dont need to increase unique frame idx
I/AGORA_SDK(  475): INFO    ( 0:36:58: 23 |    0)    565; the init unique frame idx: -1 - -1
D/AGORA_SDK(  475): APICALL ( 0:36:58: 23 |   16)    565; SendCodec
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 23 |    0)    565; RegisterSendPayload(pl_name:H264 pl_type:107)
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 23 |    0)    565; SetTargetSendBitrate: 1 streams
I/AGORA_SDK(  475): INFO    ( 0:36:58: 23 |    0)    577; Thread with name:VideoEncodeThread started 
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 23 |    0)    565; Sending()
D/AGORA_SDK(  475): APICALL ( 0:36:58: 23 |    0)    565; setCodec : 1 :H264
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    1)    565; Setting video fec method 1, real using 1
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 24 |    0)    565; SetGenericFECStatus(enable, 116)
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 24 |    0)    565; GenericFECStatus()
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; SetBandwidthAgressiveLevel to 2.
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; dynamic sending rate control set to 2.
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 24 |    0)    565; SetMaxTransferUnit(1300)
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 24 |    0)    565; GenericFECStatus()
D/AGORA_SDK(  475): APICALL ( 0:36:58: 24 |    1)    565; init
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; videoEngine created and initialize here
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; CreateVideoSendTrack
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; [MIO] updateCapturer: (0x0), type:(1)
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; CreateAgoraDefaultCapture: type=0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; VideoSendTrackImpl::UpdateCapturer capturer=0xbab51ea0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; CreateVideoCapturer: interface=0xbab51ea0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; [MIO] updateLocalRender: (0x0), type:(1)
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; CreateAgoraDefaultRender
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; VideoSendTrackImpl::UpdateRenderer, renderer=0xbadb5ca0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; CreateVideoRenderer: interface=0xbadb5ca0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; [MIO] video send track prepared !!
I/AGORA_SDK(  475): INFO    ( 0:36:58: 24 |    0)    565; [che] applyVideoProfile: 640x360 15 fps  -1 minFps 400 kbps, min -1 kbps orientationMode 0 degradationPrefer 0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 84 |   60)    565; validateVideoParameters: validate video parameters resolution 640x360, fps 15, rate 400000
I/AGORA_SDK(  475): INFO    ( 0:36:58: 84 |    0)    565; setMaxVideoBitrate: max bitrate=400000
I/AGORA_SDK(  475): INFO    ( 0:36:58: 84 |    0)    565; setCodecRates: set frame rate to 15
D/AGORA_SDK(  475): APICALL ( 0:36:58: 84 |   60)    565; SendCodec
I/AGORA_SDK(  475): INFO    ( 0:36:58: 84 |    0)    565; setCodec: index=1 width=640 height=360 framerate=15
D/AGORA_SDK(  475): APICALL ( 0:36:58: 84 |    0)    565; SendCodec type
D/AGORA_SDK(  475): APICALL ( 0:36:58: 84 |    0)    565; SendCodec
I/AGORA_SDK(  475): INFO    ( 0:36:58: 84 |    0)    565; setCodec: Intra Request = 0
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 84 |    0)    565; MaxDataPayloadLength()
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |   14)    578; Thread with name:VideoEncodeThread started 
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; last unique frame idx: -1 - -1
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; EncoderWrapper::Create hardware_ = 0, hardware_low_ = 0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; hwenc=0,hwenc_low=0,enlarge_big = 0,enlarge_small=0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; low bit rate limit 0
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; dont need to increase unique frame idx
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; the init unique frame idx: -1 - -1
D/AGORA_SDK(  475): APICALL ( 0:36:58: 98 |   14)    565; SendCodec
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; SetTargetWidthHeight width:640, height:360
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 98 |    0)    565; RegisterSendPayload(pl_name:H264 pl_type:107)
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 98 |    0)    565; SetTargetSendBitrate: 1 streams
D/AGORA_SDK(  475): MODCALL ( 0:36:58: 98 |    0)    565; Sending()
D/AGORA_SDK(  475): APICALL ( 0:36:58: 98 |    0)    565; setCodec : 1 :H264
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; setCodecResolution: set to 640 x 360
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; Set broadcast min br to -1.
D/AGORA_SDK(  475): DEBUG   ( 0:36:58: 98 |    0)    565; async_queue created: 0xbac23e80
I/AGORA_SDK(  475): INFO    ( 0:36:58: 98 |    0)    565; [che] chat engine initialized
I/AGORA_SDK(  475): INFO    ( 0:36:58: 99 |    1)    565; [time] process EngineInitialize takes 285
E/RtcEngine(  475): onEvent: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.HashMap.put(java.lang.Object, java.lang.Object)' on a null object reference
I/AGORA_SDK(  475): INFO    ( 0:36:58:110 |   11)    565; [tactics] config json version:20150101-0000 duallinkd:true poor:u
I/AGORA_SDK(  475): INFO    ( 0:36:58:110 |    0)    565; [tactics] parse config for beckon error for tactics size:18
D/AGORA_SDK(  475): DEBUG   ( 0:36:58:110 |    0)    565; [tactics] version:2.9.1 maxBitrate:600 360X640 15 fps
I/AGORA_SDK(  475): INFO    ( 0:36:58:111 |    1)    565; [vocs] vocs initialized

What should I do ?

关于Android使用TextureWidget和PlatformView的性能对比

作者您好:
看了您的视频,里面提到了TextureWidget和PlatformView的性能差别对比(闲鱼的外接纹理那篇文章也有提到过),我在阅读了Android端相关的代码后,有一个困惑,希望您能解答一下:

  1. Flutter Android端的桥接代码中 Texture 和 AndroidView都是通过TextureRegistray建立连接关系的,都会申请一个SurfaceTexture(建立BufferQueue通道),然后基于此SurfaceTexture构造一个Surface。

  2. 不同之处只是外部将内容绘制到Surface的过程:Texture的话,用户负责将内容渲染到Surface上(比如OpenGL,将Surface作为ANativeWindow构造EGLSurface然后进行绘制),而对于PlatformView来说,则是基于Surface构造一个VirtualDisplay,然后将用户的NativeView加入到该VirtualDisplay进行绘制,进而View的内容就绘制到该Surface。

  3. 我的困惑是,两者都通过Surface进行了桥接内容到Flutter, 而非直接Share OpenGLContext的方式来共享纹理进行绘制。那么理论上两者的性能消耗应该是差不多的。为什么您的测试结果中在Android上两者还出现了比较大的性能差距(也有可能您说的只是iOS的性能结果)?

dart端AgoraRtcEngine的事件回调不适合用静态变量

如题,客户端在集成声网时往往会实现一个client类用以管理音视频的各种操作和状态,其中包括AgoraRtcEngine的初始化和回调绑定。
在客户端使用音视频时会实例化client类,不使用时销毁client。
但是由于AgoraRtcEngine中的回调全部是静态变量,这就需要在client销毁时把AgoraRtcEngine绑定的回调全部置空以便client的内存可以被回收,显然这种操作非常不友好且容易被忽略。
如果有人直接在StatefulWidget中集成AgoraRtcEngine功能,极有可能导致State不会被释放。

setLiveTranscoding - AgoraLiveTranscoding.toJson bug

In /lib/src/base.dart, it looks like there is a bug in the following code:

Map<String, dynamic> toJson() => {
  'width': width,
  'height': height,
  'videoBitrate': videoBitrate,
  'videoFramerate': videoFramerate,
  'videoGop': videoGop,
  'videoCodecProfile': _resolveVideoCodecProfileType[videoCodecProfile],
  'transcodingUsers': transcodingUsers.map((item) => item.toJson()).toList(),
  'transcodingExtraInfo': transcodingExtraInfo,
  'watermark': watermark.toJson(),
  'backgroundImage': backgroundImage.toJson(),
  'audioSampleRate': _resolveAudioCodecProfileType[audioSampleRate],
  'audioBitrate': audioBitrate,
  'audioChannels': audioChannels,
  'backgroundColor': backgroundColor,
  'audioCodecProfile': _resolveAudioCodecProfileType[audioCodecProfile],
};

In particular this line:
'audioSampleRate': _resolveAudioCodecProfileType[audioSampleRate],

I'm guessing it should be using _resolveAudioSampleRate instead. However, take note that changing it to _resolveAudioSampleRate will cause the same issue as issue 41.

Problems with Flutter Build

I've been trying to integrate this with my Flutter project, but having some issues I hope is fixable. Simply by adding the dependency to my yaml, it adds 17MB to my apk size (doubling my project size) and when I try to run it on my Android 8 LG phone, it immediately crashes giving no errors. However, it does run on the Android 9 emulator for debug build, which is strange.
As a side note, for my app I only need the real-time voice features, not the video.. So it would be nice if there's a separate release of Agora Voice Engine for Flutter without the Video parts.... Thanks, hope I can get this functional soon since it's the last major feature of my app holding me back from release.

请在AgoraRtcEnginePlugin中暴露获取RtcEngine实例的静态方法

如题,我的产品中有屏幕共享需求,此前使用我自己写的声网插件,最近考虑切换到官方插件,但是拿不到实例,无法调用setVideoSource。
目前依赖声网RtcEngine.create的单例特性来获取实例,但是依然存在一些问题,因为原生这边监听不方便监听RtcEngine是否被销毁

setEnableSpeakerphone(true) doesnt work on ios devices

Im trying to get audio calls to use the speakerphone but the command to do so does nothing on ios devices.

AgoraRtcEngine.setEnableSpeakerphone(true);
AgoraRtcEngine.isSpeakerphoneEnabled().then((value) {
print(value); //This returns true but on ios it still uses the earpiece speaker.
});

onEvent error in Android implementation

Im getting the below error and not able to join the channel.

E/RtcEngine(11368): onEvent: java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Thread-28
E/RtcEngine(11368): onEvent: java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Thread-29
E/RtcEngine(11368): onEvent: java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Thread-30

Environment:
Flutter: 1.6.3
Agora RTC engine: 0.9.6
Android: 9.0 (Mi A2 device)

Voice call SDK

Is voice call SDK available with example?
https://docs.agora.io/en/Voice/product_voice?platform=All%20Platforms

新增对arm64架构的支持

一周以前,Flutter官方发布了v1.7.8+hotfix.3,已经默认支持了ARM64,声网是否可以同步更新支持呢?

官方的原文描述如下:

From August 1st, 2019, Android apps that use native code and target Android 9 Pie will be required to provide a 64-bit version in addition to the 32-bit version when publishing to the Google Play Store. While Flutter has long supported generating 64-bit Android apps, version 1.7 adds support for creating Android App Bundles that target both 64-bit and 32-bit from a single submission. See the updated documentation on publishing Flutter-based Android apps to learn how to do this, as well as how to create separate APK files for both 32-bit and 64-bit devices.

中文社区的翻译如下:

从 2019 年 8 月 1 日开始,为了 target 到 Android Pie 版本,开发者们在 Google Play 上发布的应用 必须支持 64 位架构。Flutter 一直都支持生成 64 位的 Android 应用,在 1.7 版本里,我们加入了对 Android App Bundles 的支持,开发者们可以在一次提交里同时 target 到 64 位和 32 位。可通过阅读 这篇文档 了解到如何分别生成 32 位和 64 位到应用等更多内容。


现在默认build会同时编译到两种CPU架构,加上agora_rtc_engine依赖项之后,会因为找不到libflutter.so 而报如下错误:

Gradle build failed to produce an Android package.

加上--target-platform android-arm 参数则正常编译出apk。

期待尽早修复~

Broadcast Video Black screen

I receive a black screen when trying to broadcast videos.

` VideoEncoderConfiguration _configuration = VideoEncoderConfiguration();

_handleCameraAndMicPermissions() async {
await PermissionHandler().requestPermissions([
PermissionGroup.camera,
PermissionGroup.microphone,
PermissionGroup.storage
]);
}

Future _initAgoraRtcEngine() async {
await AgoraRtcEngine.create(HBTV.API_KEY);
await AgoraRtcEngine.enableVideo();
await AgoraRtcEngine.setChannelProfile(ChannelProfile.LiveBroadcasting);
await AgoraRtcEngine.setClientRole(ClientRole.Broadcaster);
await AgoraRtcEngine.enableWebSdkInteroperability(true);
}

_eventHandlers() {
AgoraRtcEngine.onError = (error) {
print(error);
};

AgoraRtcEngine.onJoinChannelSuccess = (channel, uid, elapsed) {
  print('OnJoined: $channel, uid: $uid, time: $elapsed');
};

AgoraRtcEngine.onFirstRemoteVideoFrame = (uid, witdh, height, elapsed) {
  print('Uid: $uid, witdh: $witdh, height: $height, time: $elapsed');
};

}

Future init() async {
await _initAgoraRtcEngine();
_eventHandlers();
}

@OverRide
void initState() {
super.initState();
_handleCameraAndMicPermissions();
init();
}

@OverRide
void dispose() {
AgoraRtcEngine.leaveChannel().then((_) {
AgoraRtcEngine.destroy();
});
super.dispose();
}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Container(
child: Column(
children: [
Container(
height: MediaQuery.of(context).size.height - 100,
child: AgoraRtcEngine.createNativeView((viweId) {
AgoraRtcEngine.setupLocalVideo(viweId, VideoRenderMode.Fit);
_configuration.bitrate = 30;
_configuration.dimensions = MediaQuery.of(context).size;
_configuration.orientationMode =
VideoOutputOrientationMode.FixedPortrait;
AgoraRtcEngine.setVideoEncoderConfiguration(_configuration);
AgoraRtcEngine.joinChannel(null, 'flutter', null, 0);
AgoraRtcEngine.startPreview();
}),
),
],
),
),
);
}
}`

Release 打包APK错误

Debug版本没有问题,但是Release APK时抱错了:

  • What went wrong:
    Execution failed for task ':agora_rtc_engine:verifyReleaseResources'.

1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
xxx/build/agora_rtc_engine/intermediates/res/merged/release/values/values.xml:237: error: resource android:attr/fontVariationSettings not found.
xxxx/agora_rtc_engine/intermediates/res/merged/release/values/values.xml:238: error: resource android:attr/ttcIndex not found.
error: failed linking references.

新增对setLocalVoiceChanger(本地变声)的支持

当前版本(0.9.7)暂时没有setLocalVoiceChanger,请问是否考虑新增支持?

  • VOICE_CHANGER_OFF(0):原声,即关闭本地语音变声
  • VOICE_CHANGER_OLDMAN(1):老男孩
  • VOICE_CHANGER_BABYBOY(2):小男孩
  • VOICE_CHANGER_BABYGILR(3):小女孩
  • VOICE_CHANGER_ZHUBAJIE(4):猪八戒
  • VOICE_CHANGER_ETHEREAL(5)):空灵
  • VOICE_CHANGER_HULK(6)):绿巨人

IOS crash when video call got greater than 2 join the channel

i just downloaded Agora-Flutter-Quickstart and test on IOS, IOS got crash immediately on iphone 6s when my android device joined the channel. The problem is if AgoraRenderWidget got 2 of more views it will crash when i replace AgoraRenderWidget to Container it worked fine.

Here is the last logs:
STREAM ( 0:13:33:515 | 15) 53519; IncomingFrame width 640, height 480 APICALL ( 0:13:33:515 | 68) 2583; SendCodec STREAM ( 0:13:33:515 | 0) 2583; SetCSRCs: APICALL ( 0:13:33:515 | 0) 2583; SendCodec APICALL ( 0:13:33:515 | 0) 2583; SendCodec type MODCALL ( 0:13:33:517 | 2) 79155; Sending() MODCALL ( 0:13:33:517 | 0) 79155; CurrentSendFrequencyHz() MODCALL ( 0:13:33:517 | 0) 79155; PacketCountSent() MODCALL ( 0:13:33:517 | 0) 79155; ByteCountSent() MEMORY ( 0:13:33:520 | 3) 86643; ~IncomingVideoStream deleted for stream 0 WARN ( 0:13:33:520 | 0) 86643; Stop: Not running INFO ( 0:13:33:528 | 8) 86643; AgoraVideoOutput::Destroy INFO ( 0:13:33:529 | 1) 86643; stopLocalRender success INFO ( 0:13:33:529 | 0) 86643; doStartLocalRender: init? 1 capture id -1 device 1 capturing? 1 rendering? 0 INFO ( 0:13:33:529 | 0) 86643; doStartLocalRender: local render windows 0x1032c3ad0 INFO ( 0:13:33:529 | 0) 86643; AgoraVideoOutput::Init thread=0, type=100, view=0x1032c3ad0 INFO ( 0:13:33:529 | 0) 771; create child view ERROR ( 0:13:33:529 | 0) 771; container.frame.size is invalid, height 0, width 0. STREAM ( 0:13:33:548 | 19) 53519; IncomingFrame width 640, height 480 Lost connection to device.

对比 Android与IOS缺少函数

isCameraExposurePositionSupported
setCameraExposurePosition
isCameraAutoFocusFaceModeSupported
setCameraAutoFocusFaceModeEnabled
isCameraFocusSupported
setCameraFocusPositionInPreview
以上函数在flutterSDK中都找不到

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.