Hello!
The user joins the call without being allowed to use the camera. During a call, the user grants this permission. After that, the SDK does not turn on the camera automatically. When I try to turn on the camera using the code.
PlatformException(error, Attempt to invoke virtual method 'void com.quickblox.videochat.webrtc.view.QBRTCVideoTrack.setEnabled(boolean)' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'void com.quickblox.videochat.webrtc.view.QBRTCVideoTrack.setEnabled(boolean)' on a null object reference
at com.quickblox.quickblox_sdk.webrtc.WebRTCCallService.setVideoEnabled(WebRTCCallService.java:515)
at com.quickblox.quickblox_sdk.webrtc.WebRTCModule.enableVideo(WebRTCModule.java:326)
at com.quickblox.quickblox_sdk.webrtc.WebRTCModule.handleMethod(WebRTCModule.java:97)
at com.quickblox.quickblox_sdk.webrtc.WebRTCModule$$ExternalSyntheticLambda0.onMethodCall(Unknown Source:2)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
)
We use:
quickblox_sdk: version: "0.12.3"
Flutter:
[✓] Flutter (Channel stable, 3.7.7, on Ubuntu 22.04.2 LTS 5.19.0-38-generic, locale en_US.UTF-8)
• Flutter version 3.7.7 on channel stable at /home/admubuntu22/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2ad6cd72c0 (4 weeks ago), 2023-03-08 09:41:59 -0800
• Engine revision 1837b5be5f
• Dart version 2.19.4
• DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /home/admubuntu22/Android/Sdk
• Platform android-33-ext4, build-tools 33.0.1
• Java binary at: /opt/android-studio-2022.1.1/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• clang version 10.0.0-4ubuntu1
• cmake version 3.16.3
• ninja version 1.10.0
• pkg-config version 0.29.1
[✓] Android Studio (version 2022.1)
• Android Studio at /opt/android-studio-2022.1.1/android-studio
• Flutter plugin version 72.1.2
• Dart plugin version 221.6103.1
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
Hello! The user joins the call without being allowed to use the camera. During a call, the user grants this permission. After that, the SDK does not turn on the camera automatically. When I try to turn on the camera using the code.
I get an error :
PlatformException(error, Attempt to invoke virtual method 'void com.quickblox.videochat.webrtc.view.QBRTCVideoTrack.setEnabled(boolean)' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'void com.quickblox.videochat.webrtc.view.QBRTCVideoTrack.setEnabled(boolean)' on a null object reference at com.quickblox.quickblox_sdk.webrtc.WebRTCCallService.setVideoEnabled(WebRTCCallService.java:515) at com.quickblox.quickblox_sdk.webrtc.WebRTCModule.enableVideo(WebRTCModule.java:326) at com.quickblox.quickblox_sdk.webrtc.WebRTCModule.handleMethod(WebRTCModule.java:97) at com.quickblox.quickblox_sdk.webrtc.WebRTCModule$$ExternalSyntheticLambda0.onMethodCall(Unknown Source:2) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258) at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) ) We use: quickblox_sdk: version: "0.12.3" Flutter: [✓] Flutter (Channel stable, 3.7.7, on Ubuntu 22.04.2 LTS 5.19.0-38-generic, locale en_US.UTF-8) • Flutter version 3.7.7 on channel stable at /home/admubuntu22/snap/flutter/common/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2ad6cd72c0 (4 weeks ago), 2023-03-08 09:41:59 -0800 • Engine revision 1837b5be5f • Dart version 2.19.4 • DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /home/admubuntu22/Android/Sdk • Platform android-33-ext4, build-tools 33.0.1 • Java binary at: /opt/android-studio-2022.1.1/android-studio/jbr/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted.
[✓] Chrome - develop for the web • Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop • clang version 10.0.0-4ubuntu1 • cmake version 3.16.3 • ninja version 1.10.0 • pkg-config version 0.29.1
[✓] Android Studio (version 2022.1) • Android Studio at /opt/android-studio-2022.1.1/android-studio • Flutter plugin version 72.1.2 • Dart plugin version 221.6103.1 • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] Android Studio • Android Studio at /opt/android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] Connected device (3 available) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 31) (emulator) • Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.2 LTS 5.19.0-38-generic • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.146
[✓] HTTP Host Availability • All required HTTP hosts are available