I cloned the project from Agora/Flutter repository and then I ran the same program on two devices (android emulator and Redmi 7). The problem is because when I type the channel on a device it opens the call (ok) then I type the same text on another device it's like another channel has been created --> they dont't share the channel splitting their screen.
Flutter doctor:
`Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Linux, locale pt_BR.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[!] Android Studio (version 3.4)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.36.1)
[✓] Connected device (2 available)
! Doctor found issues in 1 category.`
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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.agoraflutterquickstart"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Use code below for production build
// For debug mode you need to comment above lines of code
// Issue with 'libflutter.so'
ndk {
abiFilters 'armeabi-v7a', 'x86' ,'arm64-v8a'
}
}
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 {
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'
}`
AndroidManifest.xml:
`
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<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" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="agora_flutter_quickstart"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
`
pubspec.yaml:
name: agora_flutter_quickstart
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
agora_rtc_engine:
permission_handler:
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
`
Logs:
`Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Redmi Note 7 in debug mode...
Initializing gradle... 0,6s
Resolving dependencies... 1,3s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 1,4s
Built build/app/outputs/apk/debug/app-debug.apk.
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 12,5s
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk... 1,9s
D/EGL_emulation( 7025): eglMakeCurrent: 0xe83855a0: ver 2 0 (tinfo 0xe8383720)
I/Choreographer( 7025): Skipped 53 frames! The application may be doing too much work on its main thread.
D/EGL_emulation( 7025): eglMakeCurrent: 0xe83855a0: ver 2 0 (tinfo 0xe8383720)
D/EGL_emulation( 7025): eglMakeCurrent: 0xe6926f40: ver 2 0 (tinfo 0xd00877a0)
I/OpenGLRenderer( 7025): Davey! duration=942ms; Flags=1, IntendedVsync=7277932346150, Vsync=7278815679448, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7278826050994, AnimationStart=7278826120675, PerformTraversalsStart=7278827271328, DrawStart=7278831537179, SyncQueued=7278832803570, SyncStart=7278838923459, IssueDrawCommandsStart=7278839023693, SwapBuffers=7278848193718, FrameCompleted=7278881338849, DequeueBufferDuration=18144000, QueueBufferDuration=112000,
Syncing files to device Redmi Note 7... 1.343ms
Syncing files to device Android SDK built for x86... 1.152ms
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on Redmi Note 7 is available at: http://127.0.0.1:37375/g2dhgvGVRgU=/
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:43477/E40fBWNjJIc=/
For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
W/Settings( 7025): Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
E/BluetoothAdapter( 7025): Bluetooth binder is null
E/libc ( 7025): Access denied finding property "net.dns1"
E/libc ( 7025): Access denied finding property "net.dns2"
E/libc ( 7025): Access denied finding property "net.dns3"
E/libc ( 7025): Access denied finding property "net.dns4"
D/ ( 7025): HostConnection::get() New Host Connection established 0xcee2ecc0, tid 7067
E/libc ( 7025): Access denied finding property "net.dns1"
E/libc ( 7025): Access denied finding property "net.dns2"
E/libc ( 7025): Access denied finding property "net.dns3"
E/libc ( 7025): Access denied finding property "net.dns4"
D/WEBRTCN( 7025): SetRenderAndroidVM
D/ ( 7025): HostConnection::get() New Host Connection established 0xc6fffe40, tid 7077
D/EGL_emulation( 7025): eglCreateContext: 0xcbac9ca0: maj 2 min 0 rcv 2
E/BluetoothAdapter( 7025): Bluetooth binder is null
E/BluetoothAdapter( 7025): Bluetooth binder is null
E/BluetoothAdapter( 7025): Bluetooth binder is null
I/chatty ( 7025): uid=10089(com.example.agoraflutterquickstart) identical 4 lines
E/BluetoothAdapter( 7025): Bluetooth binder is null
E/libc ( 7025): Access denied finding property "net.dns1"
E/libc ( 7025): Access denied finding property "net.dns2"
E/libc ( 7025): Access denied finding property "net.dns3"
E/libc ( 7025): Access denied finding property "net.dns4"
D/EGL_emulation( 7025): eglMakeCurrent: 0xcbac9ca0: ver 2 0 (tinfo 0xc932aac0)
I/AGORA_SDK( 7025): Surface changed to width 1080 height 843
D/EGL_emulation( 7025): eglMakeCurrent: 0xe6926f40: ver 2 0 (tinfo 0xd00877a0)
W/VideoCapabilities( 7025): Unrecognized profile 4 for video/hevc
I/VideoCapabilities( 7025): Unsupported profile 4 for video/mp4v-es
I/CameraManagerGlobal( 7025): Connecting to camera service
D/gralloc_ranchu( 7025): gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
D/ ( 7025): HostConnection::get() New Host Connection established 0xcee2ecc0, tid 7067
D/gralloc_ranchu( 7025): gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
E/RtcEngine( 7025): 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
D/ ( 7025): HostConnection::get() New Host Connection established 0xc8e54780, tid 7072
W/Thread-53( 7025): type=1400 audit(0.0:78): avc: denied { node_bind } for scontext=u:r:untrusted_app:s0:c89,c256,c512,c768 tcontext=u:object_r:node:s0 tclass=rawip_socket permissive=0
D/gralloc_ranchu( 7025): gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
D/ ( 7025): HostConnection::get() New Host Connection established 0xc8e54780, tid 7072
D/gralloc_ranchu( 7025): gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
D/ ( 7025): HostConnection::get() New Host Connection established 0xc8e54780, tid 7072
D/EGL_emulation( 7025): eglMakeCurrent: 0xe6926f40: ver 2 0 (tinfo 0xd00877a0)
D/WEBRTCN( 7025): StartRender: thread started: 3286243696
D/ ( 7025): HostConnection::get() New Host Connection established 0xc8fff500, tid 7099
D/EGL_emulation( 7025): eglCreateContext: 0xc8fa1ba0: maj 2 min 0 rcv 2
D/EGL_emulation( 7025): eglMakeCurrent: 0xc8fa1ba0: ver 2 0 (tinfo 0xd01626a0)
I/AGORA_SDK( 7025): Surface changed to width 1080 height 1584
D/EGL_emulation( 7025): eglMakeCurrent: 0xe6926f40: ver 2 0 (tinfo 0xd00877a0)
D/ ( 7025): HostConnection::get() New Host Connection established 0xcee2ecc0, tid 7067
D/ ( 7025): HostConnection::get() New Host Connection established 0xc8d7dc00, tid 7100
D/ ( 7025): HostConnection::get() New Host Connection established 0xe83a06c0, tid 7040
W/Settings(24652): Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
I/AudioManager(24652): In isBluetoothScoOn(), calling application: com.example.agoraflutterquickstart
E/libc (24652): Access denied finding property "net.dns1"
E/libc (24652): Access denied finding property "net.dns2"
E/libc (24652): Access denied finding property "net.dns3"
E/libc (24652): Access denied finding property "net.dns4"
E/libc (24652): Access denied finding property "net.dns1"
E/libc (24652): Access denied finding property "net.dns2"
E/libc (24652): Access denied finding property "net.dns3"
E/libc (24652): Access denied finding property "net.dns4"
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
W/utterquickstart(24652): type=1400 audit(0.0:57823): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12717 scontext=u:r:untrusted_app:s0:c93,c257,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
D/WEBRTCN(24652): SetRenderAndroidVM
I/AGORA_SDK(24652): Surface changed to width 1080 height 1291
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In setSpeakerphoneOn(), on: false, calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In setSpeakerphoneOn(), on: true, calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
I/AudioManager(24652): In isSpeakerphoneOn(), calling application: com.example.agoraflutterquickstart
E/libc (24652): Access denied finding property "net.dns1"
E/libc (24652): Access denied finding property "net.dns2"
E/libc (24652): Access denied finding property "net.dns3"
E/libc (24652): Access denied finding property "net.dns4"
W/VideoCapabilities(24652): Unsupported mime video/divx
W/VideoCapabilities(24652): Unsupported mime video/divx311
W/VideoCapabilities(24652): Unsupported mime video/divx4
W/VideoCapabilities(24652): Unrecognized profile 4 for video/hevc
W/VideoCapabilities(24652): Unrecognized profile/level 0/3 for video/mpeg2
W/VideoCapabilities(24652): Unrecognized profile/level 0/3 for video/mpeg2
I/VideoCapabilities(24652): Unsupported profile 4 for video/mp4v-es
W/Utils (24652): could not parse long range '175-174'
I/CameraManagerGlobal(24652): Connecting to camera service
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
I/chatty (24652): uid=10349(com.example.agoraflutterquickstart) Thread-28 identical 1 line
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal(24652): [soar.cts] ignore the status update of camera: 2
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal(24652): [soar.cts] ignore the status update of camera: 3
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
W/Thread-27(24652): type=1400 audit(0.0:57824): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12717 scontext=u:r:untrusted_app:s0:c93,c257,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal(24652): ignore the torch status update of camera: 3
W/Thread-27(24652): type=1400 audit(0.0:57825): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12717 scontext=u:r:untrusted_app:s0:c93,c257,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
W/Binder:24652_2(24652): type=1400 audit(0.0:57830): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12717 scontext=u:r:untrusted_app:s0:c93,c257,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/RtcEngine(24652): 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
E/libc (24652): Access denied finding property "persist.vendor.camera.privapp.list"
E/libc (24652): Access denied finding property "vendor.camera.aux.packagelist"
I/Adreno (24652): DequeueBuffer: dequeueBuffer failed
I/Adreno (24652): DequeueBuffer: dequeueBuffer failed
I/Adreno (24652): DequeueBuffer: dequeueBuffer failed
W/OpenGLRenderer(24652): swapBuffers encountered EGL error 12301 on 0x73532b2f80, halting rendering...
D/WEBRTCN(24652): StartRender: thread started: 1223644400
I/AGORA_SDK(24652): Surface changed to width 1080 height 1976
E/RtcEngine( 7025): 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
E/RtcEngine(24652): 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
`