Git Product home page Git Product logo

agoraio-community / videouikit-flutter Goto Github PK

View Code? Open in Web Editor NEW
134.0 9.0 71.0 759 KB

Flutter plugin to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.

Home Page: https://agora-flutter-uikit.vercel.app/

License: MIT License

Kotlin 0.58% Ruby 1.35% Swift 1.33% Objective-C 0.25% Dart 79.93% CMake 5.72% C++ 9.00% C 0.51% HTML 1.34%
agora flutter android ios video-call agoraio rtc agora-sdk agora-flutter hacktoberfest

videouikit-flutter's Introduction

Agora VideoUIKit for Flutter


Platform GitHub Workflow Status License: MIT

Instantly integrate Agora video calling or video streaming into your Flutter application.

NOTE: The Flutter VideoUIKit( >version 1.1.0) uses the latest version of the Agora 4.x SDK. To know more about the changes and the new features in the 4.x SDK, kindly take a look at the docs.

Getting started

Agora Flutter VideoUIKit Layout Sample

Roadmap

  • Add Usernames
  • More Event Callbacks
  • Add RTM SDK
  • Screen Sharing (Currently in Beta)
  • Layout for One to One Video Call
  • Layout for Voice Calls
  • Re-orderable list view (Floating Layout)
  • Cloud recording
  • Promoting an audience member to a broadcaster role.
  • Muting/Unmuting a remote member
  • Flutter Web Support as a pre-release
  • Flutter Desktop Support as a pre-release

Requirements

Installation

In your Flutter application, add the agora_uikit as a dependency inside your pubspec.yaml file.

In your Android level build.gradle add this at the end of the repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Device Permission

Agora Video SDK requires camera and microphone permission to start video call.

Android

Open the AndroidManifest.xml file and add the required device permissions to the file.

<manifest>
...
<uses-permission  android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission  android:name="android.permission.INTERNET"  />
<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_NETWORK_STATE"  />
<!-- The Agora SDK requires Bluetooth permissions in case users are using Bluetooth devices.-->
<uses-permission  android:name="android.permission.BLUETOOTH"  />
...
</manifest>

iOS

Open info.plist and add:

  • Privacy - Microphone Usage Description, and add a note in the Value column.
  • Privacy - Camera Usage Description, and add a note in the Value column.

Your application can still run the voice call when it is switched to the background if the background mode is enabled. Select the app target in Xcode, click the Capabilities tab, enable Background Modes, and check Audio, AirPlay, and Picture in Picture.

Usage

// Instantiate the client
final AgoraClient client = AgoraClient(
  agoraConnectionData: AgoraConnectionData(
    appId: "<--Add Your App Id Here-->",
    channelName: "test",
  ),
);

// Initialize the Agora Engine
@override
void initState() {
  super.initState();
  initAgora();
}

void initAgora() async {
  await client.initialize();
}

// Build your layout
@override
Widget build(BuildContext context) {
  return MaterialApp(
    home: Scaffold(
      body: SafeArea(
        child: Stack(
          children: [
            AgoraVideoViewer(client: client), 
            AgoraVideoButtons(client: client),
          ],
        ),
      ),
    ),
  );
}

VideoUIKits

The plan is to grow this library and have similar offerings across all supported platforms. There are already similar libraries for Android, iOS, React Native, and Web React, so be sure to check them out.

videouikit-flutter's People

Contributors

ascenio avatar joshuaerinosho avatar mamun361054 avatar maxxfrazer avatar meherdeep avatar muj-i avatar tadaspetra 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

videouikit-flutter's Issues

[BUG] it wont install the plugin because my permission_handler is up to date

Because every version of agora_uikit depends on permission_handler ^8.0.0+1 and my app depends on permission_handler ^9.2.0, agora_uikit is forbidden.
So, because my app depends on agora_uikit ^0.0.4, version solving failed.
pub get failed (1; So, because whosaround depends on agora_uikit ^0.0.4, version solving failed.)

Video View showing side blackscreen

Hi thanks for giving adorable Agora Video Call UI.
I am faceing issues Video works properly but its showing bothe side black screen.
if feture alerady implement to working aspect to fit please let me know . thanks in advance

[BUG] set BeautyEffectOptions not working

Set up Beauty Effect Options not working

I use agora_rtc_engine: ^4.0.7 to set with flutter. already adjust following the document but still not working.

To Reproduce
Steps to reproduce the behavior:
_engine.setBeautyEffectOptions(
true,
BeautyOptions(
lighteningContrastLevel: LighteningContrastLevel
lighteningLevel: value / 10,
rednessLevel: value / 10,
smoothnessLevel: value / 10,
),

Expected behavior
It's suppost to working on frontend.

Screenshots
So i attacted video screenshot to show how I adjust.

Smartphone:

Device: [e.g. iPhone12]
OS: [e.g. iOS15.2.1]
666045070.413774.mp4.zip

Issue while integrating agora_uikit in flutter 2.8

Getting error while running the video conferencing app ,

Error:

W/System.err(13657): java.io.FileNotFoundException: /sys/class/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err(13657): at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err(13657): at java.io.FileInputStream.(FileInputStream.java:160)
W/System.err(13657): at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err(13657): at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err(13657): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err(13657): at libcore.io.Linux.open(Native Method)
W/System.err(13657): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err(13657): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err(13657): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err(13657): at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err(13657): at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err(13657): ... 3 more
W/System.err(13657): java.io.FileNotFoundException: /sys/devices/virtual/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err(13657): at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err(13657): at java.io.FileInputStream.(FileInputStream.java:160)
W/System.err(13657): at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err(13657): at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err(13657): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err(13657): at libcore.io.Linux.open(Native Method)
W/System.err(13657): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err(13657): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err(13657): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err(13657): at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err(13657): at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err(13657): ... 3 more

Can u help me !

android/build.gradle :

Screenshot from 2021-12-27 15-27-18

AndroidManifest.xml :

Screenshot from 2021-12-27 15-26-39

Video conferencing Page :

Screenshot from 2021-12-27 15-27-06

[PROPOSAL] Make void functions return Future

There are some functions, mainly in SessionController where it returns void but is actually async, which means the client won't wait for operations. In the AgoraClient's _initAgoraRtcEngine() it doesn't catches errors because of this.

Live Stream Issue

Describe the bug
When an audience member joins a live stream as an audience member their view is split with a blank top half even though there is only 1 person broadcasting.

To Reproduce
Steps to reproduce the behavior:
Create a live stream as a broadcaster and have someone view it as an audience member.

Expected behavior
Should just show the broadcaster taking the whole view.

Smartphone (please complete the following information):

  • Device: iPhone 8, Samsung Galaxy Note 8, and Samsung Galaxy Fold 3
  • OS: ios 15

[BUG]

still black screen error in android

[BUG]

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_uikit-0.0.2/lib/controllers/session_controller.dart:41:43: Error: The argument type 'AreaCode' can't be assigned to the parameter type 'List?'.

  • 'AreaCode' is from 'package:agora_rtc_engine/src/enums.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-4.0.6/lib/src/enums.dart').
  • 'List' is from 'dart:core'.
    areaCode: agoraConnectionData.areaCode),
    ^

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035

UID Question

Are we able to use string uids or how can we use agora user accounts with this package?

[BUG] Unhandled Exception: Null check operator used on a null value at agora_uikit/controllers/session_controller.dart:217.

Describe the bug
After running the code given below, the connectionData property of value (Session Value Notifier) is returning null and throwing Null Exception that is not being handled. This is preventing AgoraClient from initializing the RtcEngine.

I tried almost the same code on another app for testing purposes and it worked fine.

To Reproduce

video_call_screen.dart

import 'package:agora_uikit/agora_uikit.dart';
import 'package:flutter/material.dart';

class VideoCallScreen extends StatefulWidget {
  const VideoCallScreen({Key? key, required this.channelName})
      : super(key: key);

  final String channelName;
  @override
  _VideoCallScreenState createState() => _VideoCallScreenState();
}

class _VideoCallScreenState extends State<VideoCallScreen> {
  late final AgoraClient _client;

  @override
  void initState() {
    super.initState();
    _client = AgoraClient(
      agoraConnectionData: AgoraConnectionData(
        appId: String.fromEnvironment('AGORA_APP_ID'),
        channelName: 'aezakm',
        tempToken:
            "006bfd956b99d2e4df58d25530fd3bc2422IADWEccVGBqRNMdELkl1Ouex0Tp+89moeeAOGCrNFgSctgfLJdsAAAAAIgD5r/DT6lJMYQQAAQB6D0thAgB6D0thAwB6D0thBAB6D0th",
      ),
      enabledPermission: [
        Permission.camera,
        Permission.microphone,
      ],
      agoraEventHandlers: AgoraEventHandlers(
          leaveChannel: (stats) {
            Navigator.pop(context);
          },
          userJoined: (uid, _) {
            print('$uid joined');
          },
          remoteAudioStateChanged: (uid, _, __, ___) {},
          onError: (error) {
            print(error);
          },
          activeSpeaker: (uid) {},
          userOffline: (uid, reason) {
            print('$uid left because of $reason');
          },
          tokenPrivilegeWillExpire: (val) {
            print("token is expiring");
          },
          localAudioStateChanged: (_, __) {},
          remoteVideoStateChanged: (uid, _, __, ___) {},
          localVideoStateChanged: (uid, _) {},
          joinChannelSuccess: (channel, uid, __) {
            print('$uid joined $channel successfully.');
          }),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Stack(
          children: [
            AgoraVideoViewer(client: _client),
            AgoraVideoButtons(client: _client),
          ],
        ),
      ),
    );
  }
}

I am using a function in a ChangeNotifierProvider to navigate to the video_call_screen

video_call_provider.dart

Future<void> joinVideo(
    BuildContext context, {
    required String channelName,
  }) async {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => VideoCallScreen(
          channelName: channelName,
        ),
      ),
    );
  }

Expected behavior
RtcEngine should be initialized with no problem and the video should be visible.

Screenshots
image

black screen with control buttons

**Smartphone (please complete the following information):** - Device: Pixel 3 API 29 - OS: Pie - Browser: Chrome

Additional context

I/chatty  ( 7583): uid=10167(com.wolfpak) 1.ui identical 1 line
I/flutter ( 7583): Role.Student
I/flutter ( 7583): Error occured while initializing Agora RtcEngine: PlatformException(7, not initialized, null, null)
W/Gralloc3( 7583): allocator 3.x is not supported
I/com.wolfpak( 7583): NativeAlloc concurrent copying GC freed 2997(352KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 2404KB/4809KB, paused 247us total 193.547ms
D/HostConnection( 7583): HostConnection::get() New Host Connection established 0xde34c870, tid 7708
D/HostConnection( 7583): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
D/eglCodecCommon( 7583): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation( 7583): eglCreateContext: 0xde31afc0: maj 2 min 0 rcv 2
D/EGL_emulation( 7583): eglMakeCurrent: 0xdacf4860: ver 2 0 (tinfo 0xf1689a10)
D/EGL_emulation( 7583): eglMakeCurrent: 0xde31afc0: ver 2 0 (tinfo 0xbf43dce0)
E/EGL_emulation( 7583): eglQueryContext 32c0  EGL_BAD_ATTRIBUTE
E/EGL_emulation( 7583): tid 7708: eglQueryContext(1902): error 0x3004 (EGL_BAD_ATTRIBUTE)
I/AGORA_SDK( 7583): Surface changed to width 1080 height 2022
E/flutter ( 7583): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value
E/flutter ( 7583): #0      SessionController.joinVideoChannel
package:agora_uikit/controllers/session_controller.dart:217
E/flutter ( 7583): <asynchronous suspension>
E/flutter ( 7583): #1      AgoraClient._initAgoraRtcEngine
package:agora_uikit/src/agora_client.dart:68
E/flutter ( 7583): <asynchronous suspension>
E/flutter ( 7583):

[BUG] onError: ErrorCode.JoinChannelRejected

Describe the bug
getting error on joining a room

Local video state changed state: LocalVideoStreamState.Failed and error: LocalVideoStreamError.DeviceNotFound
onError: ErrorCode.JoinChannelRejected

To Reproduce
Steps to reproduce the behavior:
once on

Expected behavior

  • so once joining a room on a video call I get the error
  • if joining on a real device I get the error but I join the call
  • using IOS simulator I get the error with joining the call

Screenshots

image
Imgur
Imgur

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: Iphone 8+
  • Device: simulator 13
  • Os: 15

Unable to end call after a specific duartion

I am using Flutter-UIKit for my project and I am looking for way that will end the call after a specific duration. Is it possible with UIKit.
My requirement is that a video call can only run for a specific duration and after that it should end automatically.
Any help in this regard would be really helpful. Thanks

[BUG] With Video Calls

When using on Android Samsung Galaxy S20+ and Note 8 I came across an issue that the video for the Galaxy s20+ would disappear on the Note 8. I at first thought it only happened when pressing the mute button on the s20+ but it happens randomly when the devices are moved also.

[BUG] I got black screen in flutter v2.8.1

Warnings:

Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01

Error:


I/BufferQueue(27995): [unnamed-27995-0](this:0x7d03363800,id:0,api:0,p:-1,c:-1) BufferQueue core=(27995:com.asoft.timemarks.hm.timemarks)
E/libc    (27995): Access denied finding property "vendor.debug.sf.stc_interval"
W/ks.hm.timemarks(27995): type=1400 audit(0.0:1025010): avc: denied { read } for name="u:object_r:graphics_debug_prop:s0" dev="tmpfs" ino=959 scontext=u:r:untrusted_app:s0:c73,c258,c512,c768 tcontext=u:object_r:graphics_debug_prop:s0 tclass=file permissive=0
W/ks.hm.timemarks(27995): type=1400 audit(0.0:1025011): avc: denied { read } for name="u:object_r:debug_bq_dump_prop:s0" dev="tmpfs" ino=919 scontext=u:r:untrusted_app:s0:c73,c258,c512,c768 tcontext=u:object_r:debug_bq_dump_prop:s0 tclass=file permissive=0
E/libc    (27995): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(27995): [unnamed-27995-0](this:0x7d03363800,id:0,api:0,p:-1,c:27995) connect(C): consumer=(27995:com.asoft.timemarks.hm.timemarks) controlledByApp=true
E/libc    (27995): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(27995): [unnamed-27995-0](this:0x7d03363800,id:0,api:0,p:-1,c:27995) setConsumerName: unnamed-27995-0
E/libc    (27995): Access denied finding property "vendor.debug.bq.line"
W/ks.hm.timemarks(27995): type=1400 audit(0.0:1025012): avc: denied { read } for name="u:object_r:debug_bq_dump_prop:s0" dev="tmpfs" ino=919 scontext=u:r:untrusted_app:s0:c73,c258,c512,c768 tcontext=u:object_r:debug_bq_dump_prop:s0 tclass=file permissive=0
W/ks.hm.timemarks(27995): type=1400 audit(0.0:1025013): avc: denied { read } for name="u:object_r:graphics_debug_prop:s0" dev="tmpfs" ino=959 scontext=u:r:untrusted_app:s0:c73,c258,c512,c768 tcontext=u:object_r:graphics_debug_prop:s0 tclass=file permissive=0
E/libc    (27995): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(27995): [SurfaceTexture-0-27995-0](this:0x7d03363800,id:0,api:0,p:-1,c:27995) setConsumerName: SurfaceTexture-0-27995-0
E/libc    (27995): Access denied finding property "vendor.debug.bq.line"
W/ks.hm.timemarks(27995): type=1400 audit(0.0:1025014): avc: denied { read } for name="u:object_r:debug_bq_dump_prop:s0" dev="tmpfs" ino=919 scontext=u:r:untrusted_app:s0:c73,c258,c512,c768 tcontext=u:object_r:debug_bq_dump_prop:s0 tclass=file permissive=0
W/ks.hm.timemarks(27995): type=1400 audit(0.0:1025015): avc: denied { read } for name="u:object_r:graphics_debug_prop:s0" dev="tmpfs" ino=959 scontext=u:r:untrusted_app:s0:c73,c258,c512,c768 tcontext=u:object_r:graphics_debug_prop:s0 tclass=file permissive=0
I/GLConsumer(27995): [SurfaceTexture-0-27995-0] detachFromContext

Black Screen

WhatsApp Image 2022-01-30 at 1 29 13 PM

Build.gradle

image
image

Code:

image

[BUG] Unhandled Exception: PlatformException(17, request to join channel is rejected, null, null)

Hello, while just running the basic example:

import 'package:agora_uikit/agora_uikit.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final AgoraClient client = AgoraClient(
    agoraConnectionData: AgoraConnectionData(
      appId: "<--My App Id-->",
      channelName: "test",
    ),
    enabledPermission: [
      Permission.camera,
      Permission.microphone,
    ],
  );

  @override
  void initState() {
    super.initState();
    initAgora();
  }

  void initAgora() async {
    await client.initialize();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Agora UIKit'),
          centerTitle: true,
        ),
        body: SafeArea(
          child: Stack(
            children: [
              AgoraVideoViewer(
                client: client,
              ),
              AgoraVideoButtons(
                client: client,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

I couldn't join the channel with this error :
Unhandled Exception: PlatformException(17, request to join channel is rejected, null, null)
Although I have read the docs about error code 17 at https://docs.agora.io/en/Video/error_rtc?platform=Flutter
Non of the the mentioned causes were used or exist in the basic example

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.[BUG]

I created a flutter java app and imported this project.
But can't run the project because it shows:
Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.

Now when I am adding ext.kotlin_version = '1.6.0'.
Still the same error persists. I don't understand because it's not a kotlin project but a java one. Then also it's shows this error.

How to solve it?

[BUG]

I got an error. TargetPlatform.linux is not yet supported by plugin.
My machine runs on Ubuntu 20.04

[BUG]

When i start a live stream it just shows a black screen
This is what it logs out in the terminal

E/libc ( 5577): Access denied finding property "net.dns1"
E/libc ( 5577): Access denied finding property "net.dns2"
E/libc ( 5577): Access denied finding property "net.dns3"
E/libc ( 5577): Access denied finding property "net.dns4"
W/System.err( 5577): java.io.FileNotFoundException: /sys/class/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 5577): at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 5577): at java.io.FileInputStream.(FileInputStream.java:160)
W/System.err( 5577): at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 5577): at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 5577): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 5577): at libcore.io.Linux.open(Native Method)
W/System.err( 5577): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 5577): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 5577): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 5577): at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 5577): at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 5577): ... 3 more
W/System.err( 5577): java.io.FileNotFoundException: /sys/devices/virtual/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 5577): at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 5577): at java.io.FileInputStream.(FileInputStream.java:160)
W/System.err( 5577): at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 5577): at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 5577): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 5577): at libcore.io.Linux.open(Native Method)
W/System.err( 5577): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 5577): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 5577): at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 5577): at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 5577): at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 5577): ... 3 more
W/GENP.0 ( 5577): type=1400 audit(0.0:3553): avc: denied { read } for name="temp" dev="sysfs" ino=18011 scontext=u:r:untrusted_app_29:s0:c153,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 app="applicationId"
W/GENP.0 ( 5577): type=1400 audit(0.0:3554): avc: denied { read } for name="temp" dev="sysfs" ino=18011 scontext=u:r:untrusted_app_29:s0:c153,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 app="applicationId"

Allow Tokens To Be Passed

It would be useful to allow us to also just provide a token and not just a temp token or a token url as we are creating our tokens using accounts for string uids and so I get the token before calling the uikit functions but I can't pass it to uikit I receive an error for temptoken.

A SessionController was used after being disposed.

Once you have called dispose() on a SessionController, it can no longer be used.
When the exception was thrown, this was the stack:
#0 ChangeNotifier._debugAssertNotDisposed. (package:flutter/src/foundation/change_notifier.dart:114:9)
#1 ChangeNotifier._debugAssertNotDisposed (package:flutter/src/foundation/change_notifier.dart:120:6)
#2 ChangeNotifier.removeListener (package:flutter/src/foundation/change_notifier.dart:233:12)
#3 _ValueListenableBuilderState.dispose (package:flutter/src/widgets/value_listenable_builder.dart:177:28)
#4 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4895:11)
#5 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1883:13)
#6 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#7 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#8 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#9 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#10 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#11 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#12 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#13 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#14 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#15 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#16 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#17 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#18 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#19 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#20 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#21 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#22 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#23 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#24 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#25 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6297:16)
#26 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#27 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#28 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#29 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#30 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#31 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#32 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#33 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#34 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#35 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#36 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#37 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#38 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#39 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#40 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#41 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#42 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#43 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#44 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#45 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#46 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6297:16)
#47 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#48 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#49 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#50 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#51 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#52 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#53 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#54 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#55 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#56 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#57 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#58 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#59 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#60 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#61 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#62 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#63 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#64 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#65 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#66 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#67 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#68 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#69 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#70 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#71 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#72 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#73 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#74 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#75 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#76 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#77 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#78 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#79 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#80 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#81 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#82 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#83 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#84 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#85 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#86 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#87 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#88 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#89 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#90 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#91 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#92 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#93 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#94 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#95 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#96 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#97 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#98 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#99 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#100 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#101 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#102 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#103 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#104 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#105 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#106 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#107 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#108 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#109 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#110 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#111 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#112 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#113 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#114 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#115 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#116 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#117 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#118 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#119 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#120 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#121 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#122 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#123 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#124 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#125 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#126 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#127 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#128 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#129 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#130 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#131 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#132 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#133 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#134 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#135 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#136 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#137 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#138 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#139 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#140 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#141 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#142 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#143 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#144 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#145 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#146 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#147 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#148 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#149 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#150 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#151 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#152 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#153 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#154 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#155 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#156 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#157 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#158 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#159 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#160 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#161 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#162 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#163 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#164 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#165 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#166 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#167 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#168 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#169 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#170 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#171 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#172 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#173 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#174 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1881:7)
#175 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#176 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1879:13)
#177 ListIterable.forEach (dart:_internal/iterable.dart:39:13)
#178 _InactiveElements._unmountAll (package:flutter/src/widgets/framework.dart:1892:25)
#179 BuildOwner.finalizeTree. (package:flutter/src/widgets/framework.dart:2879:27)
#180 BuildOwner.lockState (package:flutter/src/widgets/framework.dart:2510:15)
#181 BuildOwner.finalizeTree (package:flutter/src/widgets/framework.dart:2878:7)
#182 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:884:19)
#183 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:319:5)
#184 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1143:15)
#185 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1080:9)
#186 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:996:5)
#190 _invoke (dart:ui/hooks.dart:166:10)
#191 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270:5)
#192 _drawFrame (dart:ui/hooks.dart:129:31)
(elided 3 frames from dart:async)

[BUG] tokenUrl is not generating the token and giving a 404 Not Found

@maxxfrazer @Ascenio @hxingpax @Meherdeep @tadaspetra
Describe the bug
agora_uikit: ^0.0.4
agora_rtc_engine: ^4.2.0

I hosted https://github.com/AgoraIO-Community/agora-token-service server on Heroku and just copied the base Url of the server: https://nikah----match.herokuapp.com/ as the tokenUrl in the AgoraConnectionData constructor as given here:

final AgoraClient client = AgoraClient(
    agoraConnectionData: AgoraConnectionData(
      appId: "", //omitted for security reasons
      tokenUrl: "https://nikah----match.herokuapp.com",
      // tokenUrl: "https://nikah--match.herokuapp.com/access_token?",
      channelName: channelName,
      uid: 0,
    ),
    enabledPermission: [
      Permission.camera,
      Permission.microphone,
    ],
  );
//the commented line was my previous NodeJS server with old code and different parameters. 
//that's why I hosted this one now as the link in the original AgoraConnectionData class referred //to this server.

and got the error:

I/flutter (15044): Not Found
I/flutter (15044): Failed to generate the token : 404
W/System.err(15044): java.lang.reflect.InvocationTargetException
W/System.err(15044): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err(15044): 	at io.agora.agora_rtc_engine.AgoraRtcEnginePlugin.onMethodCall(AgoraRtcEnginePlugin.kt:124)
W/System.err(15044): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
W/System.err(15044): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
W/System.err(15044): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
W/System.err(15044): 	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
W/System.err(15044): 	at android.os.Handler.handleCallback(Handler.java:938)
W/System.err(15044): 	at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(15044): 	at android.os.Looper.loop(Looper.java:264)
W/System.err(15044): 	at android.app.ActivityThread.main(ActivityThread.java:8282)
W/System.err(15044): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err(15044): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
W/System.err(15044): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
W/System.err(15044): Caused by: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.String
W/System.err(15044): 	at io.agora.rtc.base.RtcEngineManager.joinChannel(RtcEngine.kt:448)
W/System.err(15044): 	... 13 more
E/flutter (15044): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method joinChannel on channel agora_rtc_engine)
E/flutter (15044): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)
E/flutter (15044): <asynchronous suspension>
E/flutter (15044): #1      SessionController.joinVideoChannel (package:agora_uikit/controllers/session_controller.dart:404:5)
E/flutter (15044): <asynchronous suspension>
E/flutter (15044): #2      AgoraClient.initialize (package:agora_uikit/src/agora_client.dart:69:5)
E/flutter (15044): <asynchronous suspension>
E/flutter (15044): #3      _VideoCallAgoraUIKitState.initAgora (package:nikah_match/view/video_call/agoraUI_video_call.dart:54:5)
E/flutter (15044): <asynchronous suspension>
E/flutter (15044): 


What else I tried:

https://nikah----match.herokuapp.com/rtc

https://nikah----match.herokuapp.com/rtc/test/publisher/uid/0

https://nikah----match.herokuapp.com/rtc/:channelName/publisher/uid/0

https://nikah----match.herokuapp.com/rtc/$channelName/publisher/uid/0

https://nikah----match.herokuapp.com/rtc/:channelName/:role/:tokentype/:uid

To Reproduce
Steps to reproduce the behavior:

  1. use the given code with the agora_uikit: ^0.0.4
  2. See the console

Expected behavior
A token is generated and the call starts.

Screenshots
If applicable, add screenshots to help explain your problem (N/A).

Desktop (please complete the following information):

  • OS: Windows

Smartphone (please complete the following information):

  • Device: OPPO F15
  • OS: Android 11

Additional context
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.19044.1526], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.10)
[√] Android Studio (version 2021.1)
[√] IntelliJ IDEA Community Edition (version 2021.3)
[√] VS Code (version 1.65.2)
[√] Connected device (4 available)
[√] HTTP Host Availability

• No issues found!

[BUG] Issue with firebase firestore

Describe the bug
It's shifting build directory inside android/app/ and Firestore not working in release. After remove agora, Firestore starts working normally and build directory is also in normal place.

To Reproduce
Steps to reproduce the behavior:
Just simple single line firestore operation.

Desktop (please complete the following information):

  • OS: Mac OS Big Sur 11.0

Smartphone (please complete the following information):

  • Device: Tried on android 11, real device & emulator

[BUG] Show me complete black screen in first time and in second time it's working fine.

  1. Show me this error in the console when I am open the chat screen
W/libc    (26879): Access denied finding property "net.dns1"
W/libc    (26879): Access denied finding property "net.dns2"
W/libc    (26879): Access denied finding property "net.dns3"
W/libc    (26879): Access denied finding property "net.dns4"

  1. When I move one video chat to another chat I have to get another error message

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(17, request to join channel is rejected, null, null)
E/flutter (28102): #0      StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:607
E/flutter (28102): #1      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:177
E/flutter (28102): <asynchronous suspension>
E/flutter (28102): #2      SessionController.joinVideoChannel
package:agora_uikit/controllers/session_controller.dart:404
E/flutter (28102): <asynchronous suspension>
E/flutter (28102): #3      AgoraClient.initialize
package:agora_uikit/src/agora_client.dart:69
E/flutter (28102): <asynchronous suspension>
E/flutter (28102): #4      _LiveMatchScreenState.initAgora
package:timemarks/…/live_screens/live_match.dart:49
E/flutter (28102): <asynchronous suspension>

  1. Show me this error when I am exit from the video call
════════ Exception caught by widgets library ═══════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
A SessionController was used after being disposed.

Once you have called dispose() on a SessionController, it can no longer be used.
When the exception was thrown, this was the stack
#0      ChangeNotifier._debugAssertNotDisposed.<anonymous closure>
package:flutter/…/foundation/change_notifier.dart:114
#1      ChangeNotifier._debugAssertNotDisposed
package:flutter/…/foundation/change_notifier.dart:120
#2      ChangeNotifier.removeListener
package:flutter/…/foundation/change_notifier.dart:233
#3      _ValueListenableBuilderState.dispose
package:flutter/…/widgets/value_listenable_builder.dart:177
#4      StatefulElement.unmount
package:flutter/…/widgets/framework.dart:4983
#5      _InactiveElements._unmount
package:flutter/…/widgets/framework.dart:1926

package dependencies are outdated

Describe the bug
Dependent packages are pinned. eg. agora_rtc_engine is pinned to 4.0.6 and permission_handler 8.0.0+1

To Reproduce
Steps to reproduce the behavior:

  1. Go to pubspec.yaml
  2. add package dependencies

agora_uikit: ^0.0.4
agora_rtc_engine: ^5.0.1
permission_handler: ^9.0.2

  1. Run flutter pub get
  2. Shows the below error

Running "flutter pub get" in xxxxxxxxx ...
Because agora_uikit >=0.0.4 depends on agora_rtc_engine ^4.0.6 and xxxxxxxxx depends on agora_rtc_engine ^5.0.1, agora_uikit >=0.0.4 is forbidden.
So, because xxxxxxxxx depends on agora_uikit ^0.0.4, version solving failed

flutter pub get
Running "flutter pub get" in xxxxxxxxx ...
Because xxxxxxxxx depends on agora_uikit ^0.0.4 which depends on permission_handler ^8.0.0+1, permission_handler ^8.0.0+1 is required.
So, because xxxxxxxxx depends on permission_handler ^9.2.0, version solving failed.

Expected behavior
Expected 'flutter pub get' to complete without error

Desktop (please complete the following information):

  • OS: Windows 11
  • Framework: Flutter
  • Version 2.10.4

Active speaker does not work

I get this output Active speaker is disabled in debug console even when isActiveSpeakerDisabled is left to default value. Is there any additional config required?

[BUG] Black screen on Android Device

Describe the bug
When I create a new SurfaceView or refresh its layout, there is a black frame before video stream loaded (It only occurs on android device)

To Reproduce
Steps to reproduce the behavior:

  1. just create a new SurfaceView
  2. switch layout type

Expected behavior
no black screen

Screenshots
1.
1
2.
2
3.
3
4.
4
5.
5

[FEATURE] Clean up local user data

Clean up task

We have an AgoraUser object, that we use for all users, except for the local user. In agora_settings.dart we use isLocalUserMuted, isLocalVideoDisabled and localUid. It makes sense to use the AgoraUser object here. And only have one variable.

Also just double checking... mainAgoraUser != localUser correct?

From my understanding the mainAgoraUser is the "biggest" user in the floating layout. Sometimes it could be the localUser, but not necessarily?

[BUG] Video call not working in live mode production mode (Version 0.3.0)

Describe the bug
I am trying to Agora for my production app, so I changed the stage from testing to live and follow the below steps :
Whenever the user clicks on the video icon in my app, I first call the cloud function to generate a user token for my userid (let's say user_id1ffdf) .
For getting the token i use this :

var currentUserID = data.user_id;
        var channelName = data.channel_name;
        var expiredTS = 18000;
        const tokenA = RtcTokenBuilder.buildTokenWithUid(APP_ID, APP_CERTIFICATE, "agora_test_poc", currentUserID, RtcRole.PUBLISHER, expiredTS);
        console.log("Token With Integer Number Uid: " + tokenA);
        return ({ 'token': tokenA });
        }
  1. Once I get the token I call this
agoraClient = AgoraClient(
  agoraConnectionData: AgoraConnectionData(
      appId: appID,
      channelName: "test_poc",
  ),
  enabledPermission: [
    Permission.camera,
    Permission.microphone,
  ],
);

I tried setting that token which i got for my for authenticated user, but i am getting this error.
Can someone point out if something is wrong in my implementation ?
To Reproduce
Steps to reproduce the behavior:

  1. Follow the above steps
  2. You should be able to connect to the channel and see the other user
  3. I am getting ErrorCode.InvalidToken without passing the token , and if i do pass the token I get Error.TokenExpired

Expected behavior
You should be able to connect to the channel and see the other user

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Samsung
  • OS: Android 10
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Flutter doctor -v :

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

Additional context
Is there any tutorial for production app setup ?

[FEATURE] Have an option to keep the aspect ratio of remote video?

Is your feature request related to a problem? Please describe.
It is not an issue but something I think will be very useful for cross platform view.

Describe the solution you'd like
I am looking forward to keep the width and height aspect ratio of each of the remote streams captured by the sdk selects rather than having an expanded view of the remote video which looks too zoomed in and with the probabilities of having UIKit in flutter web, it looks like an important feature to have.

Describe alternatives you've considered
I made use of videoSizeChanged and remoteVideoStateChanged callbacks and was able to work this out in iOS and Android platforms with agora_rtc_engine using FittedBox and AspectRatio widgets. However, web version of agora_rtc_engine (which i understand is not released yet) did not support the call backs so not sure how this can work in web at the moment.

Additional context
This will be very helpful specially when we have a screenshare in the channel as the aspect ratio of the shared content/screen will be maintained rather than being zoomed in.

[PROPOSAL] Refactor getters to functions

There are these two cases in AgoraClient that getters are used to get async information.

https://github.com/AgoraIO-Community/Flutter-UIKit/blob/4ab388978f322caf99234420f5e8f510ebcd0a34/lib/src/agora_client.dart#L15-L30

This is often thought as not good practice because it tricks the client into thinking that it's a cached or O(1) operation. This is not recommended by Flutter guideline.

So maybe it should be changed to a function to make its computation more explicit.

[PROPOSAL] Move initialization into it's own function for AgoraClient

In the AgoraClient's constructor there is an implicit call to a initialization function.

https://github.com/AgoraIO-Community/Flutter-UIKit/blob/4ab388978f322caf99234420f5e8f510ebcd0a34/lib/src/agora_client.dart#L32-L44

If you dive more deep you see there are some async stuff going on which makes the constructor unexpectedly heavy.
Other packages have the same need (e.g.: camera and video_player) and do so by giving the client the work of calling initialize. It does seem more work from the client's perspective but it's just an one liner and gives the client the power to choose when to kick off the setup.

Update example to use Stateless Widget

Is your feature request related to a problem? Please describe.
Not really a problem, but it would be an even simpler example :)

Describe the solution you'd like
Update to be a stateless widget, and make sure everything still works

Instead of null checks, use default values for class parameters

Describe the solution you'd like
There are some null checks within the code, that could be updated to have a default value in the data class constructor. This would make the code slightly more efficient as there would be one less null check

Describe alternatives you've considered
Just keeping the null checks, doesn't affect the code too much, would make it a little bit cleaner

[BUG][iOS] App Crashed after launching on iphone 12

Describe the bug
On Android the worked fine, but on iPhone 12 it crashed with the below exception:

flutter: onJoinChannel: agora_test_poc, uid: 1221795414
flutter: userJoined: 4183955454
flutter: Remote audio state changed for 4183955454, state: AudioRemoteState.Starting and reason: AudioRemoteStateReason.Internal
-[__NSDictionaryM longLongValue]: unrecognized selector sent to instance 0x2801f2f20
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM longLongValue]: unrecognized selector sent to instance 0x2801f2f20'
*** First throw call stack:
(0x18bf2e708 0x1a0a387a8 0x18be31bfc 0x18bf31260 0x18bf33560 0x10d1d9bb8 0x10d1d5400 0x10d4eaa60 0x10d1fbd7c 0x10d505070 0x10d49f1d4 0x10d4a19fc 0x18bea91d4 0x18bea8dd0 0x18bea8220 0x18bea1fd4 0x18bea1308 0x1a3524734 0x18e91f75c 0x18e924fcc 0x1005b2418 0x18bb5dcf8)
libc++abi: terminating with uncaught exception of type NSException
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001ba233334 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1ba233334 <+8>:  b.lo   0x1ba233354               ; <+40>
    0x1ba233338 <+12>: pacibsp
    0x1ba23333c <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1ba233340 <+20>: mov    x29, sp

To Reproduce
Steps to reproduce the behavior:

  1. Launch the app on real iphone device
  2. The app crashed after the user joins the channel

Expected behavior
Shouldn't crash

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: iOS
  • Browser [e.g. chrome, safari]
  • Version 14.5

I also don't see the video being rendered.

[FEATURE] Allow extra buttons to be in front of default buttons

Is your feature request related to a problem? Please describe.
Current implementation only allows the extra buttons to come after the default buttons. While we can manually add all the original buttons into the extra buttons, it would be nice to have a simple option to put them in front
Screen Shot 2021-11-19 at 3 16 21 PM

Describe the solution you'd like
Some sort of boolean parameter that lets you change this

[BUG] Trying to run project

I am getting the below error when I try to run in debug mode on an android device.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/rickeylee/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-1.0.4/android/build.gradle' line: 22

* What went wrong:
A problem occurred evaluating project ':connectivity_plus'.

> Could not get unknown property 'javaToolchains' for task ':agora_uikit:compileDebugAndroidTestJavaWithJavac' of type org.gradle.api.tasks.compile.JavaCompile.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* Where:
Script '/Users/rickeylee/Desktop/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 346

* What went wrong:
A problem occurred configuring project ':connectivity_plus'.
> Could not get unknown property 'android' for project ':connectivity_plus' of type org.gradle.api.Project.

This started after I ran get package.
I have ran flutter clean issue remains.

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.4 20F71 darwin-arm, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.57.1)
[✓] Connected device (4 available)

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.