Giter Club home page Giter Club logo

connectycube-flutter-call-kit's People

Contributors

davelomber avatar tatankaconcube avatar tungs0ul avatar willowwisp 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

connectycube-flutter-call-kit's Issues

Lock screen issue

Hi!
I don't want my app logic is available when screen is locked.
But when somebody is calling and screen is locked - I want it to be visible.
I've reached this logic. Before call logic - my app doesn't work in background mode. Then somebody is calling and app is locked - I see calling screen , can answer. But after call my app becomes available in lock mode.
How can it be fixed?

Thanks

Notification doesn't look as described in plugin for Android 11 and 12

Hi!

I used and tested this plugin on Android 9. And when app is collapsed - I see small notification with accept and decline buttons. When phone is locked - full screen calling view.

But for devices with Android 11 and 12 behavior differs from expected.
When app is collapsed - I can see notification with 2 buttons and in 2 seconds it disappears to status bar, it doesn't hang while user is calling.

When phone is locked - there is no full screen notification anymore. Just small with 2 buttons.

My phone is Pixel 3.

Thank you

How to open app and redirect to specific page on certain cases.

Hi,
Thanks for the package that solves Many developers problems,

I have used the plugin and it works when app in background mode (onCallAccepted is called - and I do my logic based on the accept/reject).
I am able to get these things done

  1. when the app is in background state lam getting notification to accept/reject, clicking on notification (other than accept/decline) how to capture the caller details like session id and caller name, so that the app shows customised ui to perform actions.
  2. when the app is in killed state lam getting notification to accept/reject, clicking on it does not calls onCallAccepted
  3. when the mobile is locked state lam getting full screen notification to accept/reject, clicking on it does not calls onCallAccepted

can you please help on this to get it done.

Thanks in advance.

Change logo

How to change our logo on the call screen instead of the ConnectyCube logo?

Error while ConnectycubeFlutterCallKit.showCallNotification()

I get FCM message in background and run for test purpose:

ConnectycubeFlutterCallKit.showCallNotification(
      sessionId: Uuid().v4(),
      callType: 2,
      callerId: 714,
      callerName: "Caller Name",
      opponentsIds: {101}.toSet(),
    );

And get error:

I/flutter (18554): Handling a background message 0:1636988663550498%7fab33907fab3390
E/AndroidRuntime(18554): FATAL EXCEPTION: main
E/AndroidRuntime(18554): Process: {com.example.app.rc_intercom, PID: 18554
E/AndroidRuntime(18554): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app.rc_intercom/com.connectycube.flutter.connectycube_flutter_call_kit.IncomingCallActivity}: java.lang.IllegalStateException: findViewById(resources.g…txt", "id", packageName)) must not be null
E/AndroidRuntime(18554): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2793)
E/AndroidRuntime(18554): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
E/AndroidRuntime(18554): 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
E/AndroidRuntime(18554): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
E/AndroidRuntime(18554): 	at android.os.Handler.dispatchMessage(Handler.java:105)
E/AndroidRuntime(18554): 	at android.os.Looper.loop(Looper.java:156)
E/AndroidRuntime(18554): 	at android.app.ActivityThread.main(ActivityThread.java:6517)
E/AndroidRuntime(18554): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18554): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
E/AndroidRuntime(18554): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
E/AndroidRuntime(18554): Caused by: java.lang.IllegalStateException: findViewById(resources.g…txt", "id", packageName)) must not be null
E/AndroidRuntime(18554): 	at com.connectycube.flutter.connectycube_flutter_call_kit.IncomingCallActivity.initUi(IncomingCallActivity.kt:123)
E/AndroidRuntime(18554): 	at com.connectycube.flutter.connectycube_flutter_call_kit.IncomingCallActivity.onCreate(IncomingCallActivity.kt:62)
E/AndroidRuntime(18554): 	at android.app.Activity.performCreate(Activity.java:6915)
E/AndroidRuntime(18554): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
E/AndroidRuntime(18554): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
E/AndroidRuntime(18554): 	... 9 more
I/Process (18554): Sending signal. PID: 18554 SIG: 9
Lost connection to device.

Build failing on Android

Hi, I was able to use this package on Flutter 2.10.3, but since upgrading to Flutter 3.0.1, this plugin no longer seems to build on Android.

Here is the gradle build error I'm getting:

e: /opt/flutter/.pub-cache/hosted/pub.dartlang.org/connectycube_flutter_call_kit-2.0.3/android/src/main/kotlin/com/connectycube/flutter/connectycube_flutter_call_kit/ConnectycubeFlutterCallKitPlugin.kt: (32, 1): Class 'ConnectycubeFlutterCallKitPlugin' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener
e: /opt/flutter/.pub-cache/hosted/pub.dartlang.org/connectycube_flutter_call_kit-2.0.3/android/src/main/kotlin/com/connectycube/flutter/connectycube_flutter_call_kit/ConnectycubeFlutterCallKitPlugin.kt: (311, 5): 'onNewIntent' overrides nothing

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':connectycube_flutter_call_kit:compileDebugKotlin'.
> Compilation error. See log for more details

* 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 43s
Exception: Gradle task assembleDebug failed with exit code 1
Exited

Flutter doctor output:

[✓] Flutter (Channel stable, 3.0.1, on Manjaro Linux 5.17.9-1-MANJARO, locale en_AU.UTF-8)
    • Flutter version 3.0.1 at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (11 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/jaween/Android/Sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 13.0.1
    • cmake version 3.23.1
    • ninja version 1.10.2
    • pkg-config version 1.8.0

[✓] Android Studio (version 2020.3)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 61.2.2
    • Dart plugin version 203.8430
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] Connected device (3 available)
    • Pixel 4a (mobile) • 13091JEC200456 • android-arm64  • Android 12 (API 32)
    • Linux (desktop)   • linux          • linux-x64      • Manjaro Linux 5.17.9-1-MANJARO
    • Chrome (web)      • chrome         • web-javascript • Chromium 102.0.5005.61 Arch Linux

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

I'm not sure if there's something specific to my app/setup causing this, so if this is building on Flutter 3.0.1 for anyone else, please let me know.

Callkit not lauching app when screen is locked

Hello!

I have an issue with the plugin. When the screen is locked and the phone receives a VoIP notification, the CallKit UI is showing but the app is not lauching. So, the UI starts the time counter but not call connected, because I need the app running in order to connect with the RTC server.

If I try the same scenary with WhatsApp it works. The WtahsApp UI is not visible but the status bar change its color to yellow and I think the app is running in background or something. Can I achieve this with the plugin?

Plus when the CallKit launchs from background and I start my app manually with the CallKit UI icon the audio is not working. Can you check this, please?

Thank you so much!

(PlatformException(ERROR, java.lang.Long cannot be cast to java.lang.Integer, , null)) #82

ConnectycubeFlutterCallKit.showCallNotification

when I launch this i get this error

E/flutter (25671): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(ERROR, java.lang.Long cannot be cast to java.lang.Integer, , null)

E/flutter (25671): #0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:581

E/flutter (25671): #1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:158

E/flutter (25671):

i am trying to run this code with fake data after firebase background message invoked

I don't understand how to to do that - the code i am using is this


ConnectycubeFlutterCallKit.showCallNotification(
      sessionId: "23113123",
      callType: 0,
      callerId: 4124124124124,
      callerName: "Test Me",
      opponentsIds: {2, 3, 4});

Not getting chat notifications for android & ios devices

Please find below log when i get receive message:

[log] ---Xmpp Receiving:---
I/flutter ( 1930): CB-SDK: : Receive PRIVATE chat message 61f29fc68510a35d15d7d7f4
[log] htjfgg<date_sent>1643290566</date_sent><save_to_history>1</save_to_history><dialog_id>61f28114276f93005bbd562e</dialog_id><message_id>61f29fc68510a35d15d7d7f4</message_id>

iOS App Not Run update Config Not found

I m not use ConnectycubeFlutterCallKit.instance.updateConfig(ringtone: 'custom_ringtone', icon: 'app_icon', color: '#07711e'); This method even if when I run the app in in simulator it's give me error below.

[SwiftConnectycubeFlutterCallKitPlugin][handle] method: updateConfig
Could not cast value of type 'NSNull' (0x111ea6f50) to 'NSString' (0x111ea6f38).
2022-02-19 11:04:54.380348+0530 Runner[44844:321335] Could not cast value of type 'NSNull' (0x111ea6f50) to 'NSString' (0x111ea6f38).

pin call notification

When I receive a call notification, like normal notifications, it is minimized after a few seconds.
there is any way to pin call notification on top of the screen?

How to remove this Japanese Text from calling UI?

I'm calling from another app and showing this UI on lock screen but there is a Japanese Text written on the calling UI which translates into "Video calling phone". How can I remove this thing from the UI? There is nothing written like this in the package
WhatsApp Image 2022-04-05 at 11 38 29 AM
.

clicking on call notification and getting a callback (android)

Hi,

When I get a heads-up incoming call notification, clicking on the notification itself (not reject or accept) brings my app to the foreground but doesn't trigger any of onMessageOpenedApp, onCallAccepted or onCallRejected. How do I get a callback when I click on the notification?

By the way, is my problem related to this TODO?

Push notification from killed state

Hi, I would like to know if it possible to use the call kit to show incoming call screen using firebase push notification, I can see that there is already a guide showing how to do that using ConnectyCubeSDK in this link: https://github.com/ConnectyCube/connectycube-flutter-call-kit#show-incoming-call-screen-by-push-notification.

But I would like to do it without the ConnectyCubeSDK. What I want to do is the following:

2 Users (User X and User Y)

User X calls User Y (Currently app is in killed state), User Y gets an incoming call screen and when the user accepts I want to run a certain logic in the app, I already have an audio/call system implemented so that part is already covered. It's just the ringing part that is left

IOS support

Hi!

Your package is exactly what I need! But we need ios support also.

Thank you

Notification Not Displaying

The notification is not displaying after it was displayed and accepted the first time it no longer shows on any android device. The firebase notification is received with all the information. No errors. I have tried with the app in the foreground, background, and terminated.

if (Platform.isAndroid) {
              print('Is Android');
              ConnectycubeFlutterCallKit.showCallNotification(
                      sessionId: uuid,
                      callType: hasVideo ? 1 : 0,
                      callerId: callerId,
                      callerName: callerName,
                      opponentsIds: newList)
                  .catchError((error) => print('ConnectionError: $error'));
            }
if (Platform.isAndroid) {
      print('Init Notif');
      ConnectycubeFlutterCallKit.instance.init(onCallAccepted:
          (String sessionId, int callType, String callerId, String callerName,
              Set<String> opponentsIds, Map<String, String>? userInfo) async {
        ConnectycubeFlutterCallKit.setOnLockScreenVisibility(isVisible: true);
        ConnectycubeFlutterCallKit.reportCallAccepted(sessionId: sessionId);
        print('accepted');
        final channel = SNAB.streamChatClient.channel('message', id: sessionId);
        routerConfig.push(ChatVideoCallRoute(
            channel: channel, uid: callerId, isIncoming: true));
      }, onCallRejected: (String sessionId,
          int callType,
          String callerId,
          String callerName,
          Set<String> opponentsIds,
          Map<String, String>? userInfo) async {
        ConnectycubeFlutterCallKit.reportCallEnded(sessionId: sessionId);
        ConnectycubeFlutterCallKit.setOnLockScreenVisibility(isVisible: false);
      });
    }

Not able to login new user getting 404

REQUEST
flutter: POST https://api.connectycube.com/session
flutter: HEADERS
flutter: {Content-type: application/json, ConnectyCube-REST-API-Version: 0.1.1, CB-SDK: Flutter 2.0.9, CB-Token: B3D6E33FDB4D2B26B7C03A1F3E3DA42638B3}
flutter: BODY
flutter: {"application_id":"5858","auth_key":"yr-LkMB82ksb9CF","nonce":"143070309","timestamp":"1643293607","signature":"3857d0f0f8cb691f6a9849b40fb52ef3b1e544b5","user":{"login":"870d493648a6440a8b8d0b986b272262","email":"[email protected]","password":"123456"}}
flutter:
flutter: CB-SDK: : *********************************************************
flutter: *** RESPONSE *** 404 *** aa6e3e57-cce3-4593-9644-54a83f5fc05a ***
flutter: HEADERS
flutter: {connection: keep-alive, content-type: application/json; charset=utf-8, date: Thu, 27 Jan 2022 14:26:48 GMT, strict-transport-security: max-age=15768000; includeSubDomains, content-length: 29, server: nginx/1.16.1}
flutter: BODY
flutter: {"errors":["User not found"]}
flutter:
flutter: ----------------FIREBASE CRASHLYTICS----------------
flutter: type 'ResponseException' is not a subtype of type 'String'
flutter:

Terminated state callbacks doesn't fire on Android 9

Hi, Thanks for the great plugin.
I'm having an issue with the terminated state callbacks
they works fine when tested on Android 11.

but with Android 8/9 they are not fired at all.
weirdly though the callbacks are fired only when the app is terminated and the device is locked .
if the app is terminated and the device is unlocked it doesn't work!

to be more specific I found that this line in the EventReceiver.kt file
never runs:
ConnectycubeFlutterBgPerformingService.enqueueMessageProcessing(context,broadcastIntent)

Any idea what I'm doing wrong, or what might be the cause of this behavior ?

O.S : Android 9
Device : Huawei Nova 3i

Ringtone sound not working

Platform (use [x])

  • Android
  • iOS

Describe the bug:

Notification sound is not working for p2p calls

Additional info

I am getting incoming call notifications but the ringtone is not working

I think adding this code into the notification_manager.kt file in createCallNotification function will fix the problem but I am open to suggestion to fix the problem in case it is something wrong that I am writing in code.

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                mChannel = new NotificationChannel(CHANNEL_ID, Utils.CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH);
                mChannel.setLightColor(Color.GRAY);
                mChannel.enableLights(true);
                mChannel.setDescription(Utils.CHANNEL_SIREN_DESCRIPTION);
                AudioAttributes audioAttributes = new AudioAttributes.Builder()
                        .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                        .setUsage(AudioAttributes.USAGE_NOTIFICATION)
                        .build();
                mChannel.setSound(soundUri, audioAttributes);

                if (mNotificationManager != null) {
                    mNotificationManager.createNotificationChannel( mChannel );
                }
        }

Getting call notifications on iphone but not able to receive call

**please find below logs

This below logs from the sender side:**

/flutter (29521): CB-SDK: : *********************************************************
I/flutter (29521): *** RESPONSE *** 200 *** cd783fe3-8e0d-44b1-99e1-b7998b8cf568 ***
I/flutter (29521): HEADERS
I/flutter (29521): {cb-token-expirationdate: 2022-01-27 14:56:50 UTC, connection: keep-alive, date: Thu, 27 Jan 2022 12:56:50 GMT, strict-transport-security: max-age=15768000; includeSubDomains, content-length: 412, access-control-expose-headers: CB-Token-ExpirationDate, content-type: application/json; charset=utf-8, server: nginx/1.16.1}
I/flutter (29521): BODY
I/flutter (29521): {"user":{"_id":"61ee3698276f93005bbd41a0","id":5365103,"created_at":"2022-01-24T05:18:16Z","updated_at":"2022-01-27T12:50:48Z","last_request_at":"2022-01-27T12:50:48Z","login":"963ee51e2ff94bb6b15f18cae4226d8a","email":"[email protected]","full_name":"xyz","external_user_id":32,"phone":null,"website":null,"twitter_id":null,"facebook_id":null,"custom_data":null,"user_tags":null,"avatar":null,"external_id":null}}
I/flutter (29521):
I/flutter (29521): startNewCall{5365103}
I/flutter (29521): startNewCallInstance of 'P2PClient'
I/flutter (29521): P2PSession _currentCall
I/flutter (29521): CB-SDK: : {parameters: {message: Incoming Audio call, call_type: 2, session_id: 3e097536-9389-4923-addf-4f424e2c8029, caller_id: 5352743, caller_name: null, call_opponents: 5365103, ios_voip: 1, signal_type: startCall, question_id: 366, seeker_id: 32, provider_id: 78, created_at: 2022-01-27 18:26:15}, notificationType: push, environment: development, eventType: null, usersIds: [5365103], externalUsersIds: [], usersTagsAll: [], usersTagsAny: [], usersTagsExclude: [], date: null, endDate: null, period: null, name: null}
I/flutter (29521): CB-SDK: : =========================================================
I/flutter (29521): === REQUEST ==== d32d2e73-4a8a-4cec-b861-4069f00779b3 ===
I/flutter (29521): REQUEST
I/flutter (29521): POST https://api.connectycube.com/events
I/flutter (29521): HEADERS
I/flutter (29521): {Content-type: application/json, ConnectyCube-REST-API-Version: 0.1.1, CB-SDK: Flutter 2.0.9, CB-Token: 1218D504DEE3E5E1CC4CE2E89345DEED8949}
I/flutter (29521): BODY
I/flutter (29521): {"event":{"id":null,"created_at":null,"updated_at":null,"notification_type":"push","environment":"development","message":"eyJtZXNzYWdlIjoiSW5jb21pbmcgQXVkaW8gY2FsbCIsImNhbGxfdHlwZSI6Miwic2Vzc2lvbl9pZCI6IjNlMDk3NTM2LTkzODktNDkyMy1hZGRmLTRmNDI0ZTJjODAyOSIsImNhbGxlcl9pZCI6NTM1Mjc0MywiY2FsbGVyX25hbWUiOm51bGwsImNhbGxfb3Bwb25lbnRzIjoiNTM2NTEwMyIsImlvc192b2lwIjoxLCJzaWduYWxfdHlwZSI6InN0YXJ0Q2FsbCIsInF1ZXN0aW9uX2lkIjoiMzY2Iiwic2Vla2VyX2lkIjoiMzIiLCJwcm92aWRlcl9pZCI6Ijc4IiwiY3JlYXRlZF9hdCI6IjIwMjItMDEtMjcgMTg6MjY6MTUifQ==","user":{"ids":"5365103"}}}
I/flutter (29521):
I/flutter (29521): Question==366
I/flutter (29521): Question==32
I/flutter (29521): Question==78
I/flutter (29521): CB-SDK: : start call null
I/FlutterWebRTCPlugin(29521): getUserMedia(audio): mandatory: [], optional: [googNoiseSuppression: true, googEchoCancellation: true, echoCancellation: true, googEchoCancellation2: true, googDAEchoCancellation: true]
D/FlutterWebRTCPlugin(29521): MediaStream id: 25f39c98-15ec-4075-9aee-5482881ad877
I/flutter (29521): CB-SDK: _ConversationCallScreenState: _addLocalMediaStream
I/flutter (29521): CB-SDK: _ConversationCallScreenState: _onStreamAdd for user 5352743
I/org.webrtc.Logging(29521): EglRenderer: Initializing EglRenderer
I/org.webrtc.Logging(29521): EglRenderer: EglBase.create shared context
I/org.webrtc.Logging(29521): EglBase14Impl: Using OpenGL ES version 2
I/flutter (29521): CB-SDK: PeerConnection: _createOffer for opponent 5365103
I/org.webrtc.Logging(29521): EglRenderer: Duration: 4009 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(29521): EglRenderer: Duration: 4003 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(29521): WebRtcAudioRecordExternal: enableBuiltInAEC(true)
I/org.webrtc.Logging(29521): WebRtcAudioEffectsExternal: setAEC(true)
I/org.webrtc.Logging(29521): WebRtcAudioRecordExternal: enableBuiltInNS(true)
I/org.webrtc.Logging(29521): WebRtcAudioEffectsExternal: setNS(true)
I/org.webrtc.Logging(29521): NetworkMonitor: Start monitoring with native observer 528391510528
I/org.webrtc.Logging(29521): NetworkMonitorAutoDetect: Network becomes available: 614
D/FlutterWebRTCPlugin(29521): onIceGatheringChangeGATHERING
I/flutter (29521): CB-SDK: PeerConnection: onSignalingState changed to RTCSignalingState.RTCSignalingStateHaveLocalOffer for opponent 5365103
I/org.webrtc.Logging(29521): NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED LinkUpBandwidth>=42453Kbps LinkDnBandwidth>=44687Kbps SignalStrength: -39 AdministratorUids: [] RequestorUid: -1 RequestorPackageName: null]
I/org.webrtc.Logging(29521): NetworkMonitorAutoDetect: link properties changed
D/FlutterWebRTCPlugin(29521): onIceCandidate
I/flutter (29521): CB-SDK: PeerConnection: onIceGatheringState changed to RTCIceGatheringState.RTCIceGatheringStateGathering for opponent 5365103
I/flutter (29521): CB-SDK: BaseSession: onIceGatheringStateChanged state= RTCIceGatheringState.RTCIceGatheringStateGathering for userId= 5365103
D/FlutterWebRTCPlugin(29521): onIceCandidate
D/FlutterWebRTCPlugin(29521): onIceCandidate
D/FlutterWebRTCPlugin(29521): onIceCandidate
D/FlutterWebRTCPlugin(29521): onIceCandidate
D/FlutterWebRTCPlugin(29521): onIceCandidate
I/org.webrtc.Logging(29521): EglRenderer: Duration: 4003 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

======== Exception caught by image resource service ================================================
The following ArgumentError was thrown resolving an image codec:
Invalid argument(s): No host specified in URI

When the exception was thrown, this was the stack:
#0 _HttpClient._openUrl (dart:_http/http_impl.dart:2662:9)
#1 _HttpClient.openUrl (dart:_http/http_impl.dart:2568:7)
#2 IOClient.send (package:http/src/io_client.dart:35:38)
#3 HttpFileService.get (package:flutter_cache_manager/src/web/file_service.dart:35:44)
#4 WebHelper._download (package:flutter_cache_manager/src/web/web_helper.dart:121:24)
#5 WebHelper._updateFile (package:flutter_cache_manager/src/web/web_helper.dart:103:28)

#6 WebHelper._downloadOrAddToQueue (package:flutter_cache_manager/src/web/web_helper.dart:71:7)

Image provider: CachedNetworkImageProvider("", scale: 1.0)
Image key: CachedNetworkImageProvider("", scale: 1.0): CachedNetworkImageProvider("", scale: 1.0)

D/FlutterWebRTCPlugin(29521): onIceCandidate
D/FlutterWebRTCPlugin(29521): onIceCandidate
I/org.webrtc.Logging(29521): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
D/FlutterWebRTCPlugin(29521): onIceCandidate
I/org.webrtc.Logging(29521): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/flutter (29521): CB-SDK: : *********************************************************
I/flutter (29521): *** RESPONSE *** 201 *** d32d2e73-4a8a-4cec-b861-4069f00779b3 ***
I/flutter (29521): HEADERS
I/flutter (29521): {cb-token-expirationdate: 2022-01-27 14:56:52 UTC, connection: keep-alive, date: Thu, 27 Jan 2022 12:56:52 GMT, strict-transport-security: max-age=15768000; includeSubDomains, content-length: 1506, access-control-expose-headers: CB-Token-ExpirationDate, content-type: application/json; charset=utf-8, server: nginx/1.16.1}
I/flutter (29521): BODY
I/flutter (29521): [{"event":{"_id":"61f29694a06c820040ae59de","event_type":"one_shot","message":"eyJtZXNzYWdlIjoiSW5jb21pbmcgQXVkaW8gY2FsbCIsImNhbGxfdHlwZSI6Miwic2Vzc2lvbl9pZCI6IjNlMDk3NTM2LTkzODktNDkyMy1hZGRmLTRmNDI0ZTJjODAyOSIsImNhbGxlcl9pZCI6NTM1Mjc0MywiY2FsbGVyX25hbWUiOm51bGwsImNhbGxfb3Bwb25lbnRzIjoiNTM2NTEwMyIsImlvc192b2lwIjoxLCJzaWduYWxfdHlwZSI6InN0YXJ0Q2FsbCIsInF1ZXN0aW9uX2lkIjoiMzY2Iiwic2Vla2VyX2lkIjoiMzIiLCJwcm92aWRlcl9pZCI6Ijc4IiwiY3JlYXRlZF9hdCI6IjIwMjItMDEtMjcgMTg6MjY6MTUifQ==","user_id":5352743,"environment":"development","date":null,"period":null,"kind":"API","end_date":null,"active":true,"created_at":"2022-01-27T12:56:52Z","updated_at":"2022-01-27T12:56:52Z","tag_query":null,"name":null,"notification_channel":{"name":"apns_voip"},"id":764079391}},{"event":{"_id":"61f29694a06c820040ae59df","event_type":"one_shot","message":"eyJtZXNzYWdlIjoiSW5jb21pbmcgQXVkaW8gY2FsbCIsImNhbGxfdHlwZSI6Miwic2Vzc2lvbl9pZCI6IjNlMDk3NTM2LTkzODktNDkyMy1hZGRmLTRmNDI0ZTJjODAyOSIsImNhbGxlcl9pZCI6NTM1Mjc0MywiY2FsbGVyX25hbWUiOm51bGwsImNhb
I/flutter (29521):
I/flutter (29521): CB-SDK: : Event for offliners created: [{id: 764079391, created_at: 2022-01-27T12:56:52.000Z, updated_at: 2022-01-27T12:56:52.000Z, notification_type: null, environment: development, message: {message: Incoming Audio call, call_type: 2, session_id: 3e097536-9389-4923-addf-4f424e2c8029, caller_id: 5352743, caller_name: null, call_opponents: 5365103, ios_voip: 1, signal_type: startCall, question_id: 366, seeker_id: 32, provider_id: 78, created_at: 2022-01-27 18:26:15}, event_type: one_shot, notification_channel: apns_voip, user_id: 5352743}, {id: 689385009, created_at: 2022-01-27T12:56:52.000Z, updated_at: 2022-01-27T12:56:52.000Z, notification_type: null, environment: production, message: {message: Incoming Audio call, call_type: 2, session_id: 3e097536-9389-4923-addf-4f424e2c8029, caller_id: 5352743, caller_name: null, call_opponents: 5365103, ios_voip: 1, signal_type: startCall, question_id: 366, seeker_id: 32, provider_id: 78, created_at: 2022-01-27 18:26:15}, event_type: one_shot, notification_channel: ap
I/org.webrtc.Logging(29521): EglRenderer: Duration: 4004 ms. Frame

This is log from receiver side
"created_at" = "2022-01-27 18:26:15";
message = "Incoming Audio call";
"provider_id" = 78;
"question_id" = 366;
"seeker_id" = 32;
"session_id" = "3e097536-9389-4923-addf-4f424e2c8029";
"signal_type" = startCall;
}
[FlutterCallKitPlugin][reportNewIncomingCall] uuidString = 3e097536-9389-4923-addf-4f424e2c8029, handle = 5352743, handleType = generic, hasVideo = 0, localizedCallerName = null, fromPushKit = 1
[FlutterCallKitPlugin][reportNewIncomingCall] uuid = 3E097536-9389-4923-ADDF-4F424E2C8029
[FlutterCallKitPlugin][getProviderConfiguration]
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CXProviderConfiguration initWithLocalizedName:]: parameter 'localizedName' cannot be nil'
*** First throw call stack:
(0x1823e805c 0x19a902f54 0x18243f190 0x1a7a7bfcc 0x10411ed60 0x10411bff8 0x10411fb74 0x102850fc8 0x1028512a8 0x1b4753e34 0x182058c04 0x18205a950 0x182068d30 0x1823a0ce4 0x18235aebc 0x18236e3c8 0x19db7f38c 0x184d14060 0x184a91b8c 0x1028518c8 0x102be9a24)
libc++abi: terminating with uncaught exception of type NSException

  • thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001b8e399c4 libsystem_kernel.dylib__pthread_kill + 8 libsystem_kernel.dylib__pthread_kill:
    -> 0x1b8e399c4 <+8>: b.lo 0x1b8e399e4 ; <+40>
    0x1b8e399c8 <+12>: pacibsp
    0x1b8e399cc <+16>: stp x29, x30, [sp, #-0x10]!
    0x1b8e399d0 <+20>: mov x29, sp
    Target 0: (Runner) stopped.
    Lost connection to device.
    Exited (sigterm)

Basic example

Can you pls show us a basic example of how to display a notification over the lock screen?

Thanks

why save some data on locale database?

I use this snippet code to display call notification and this runs just once, after that I have to delete app catch data and storage, to display notification again.

onPressed: () async {
          ConnectycubeFlutterCallKit.instance.init(
            onCallAccepted: (
              String sessionId,
              int callType,
              int callerId,
              String callerName,
              Set opponentsIds,
            ) async {
              return Navigator.push(
                  context, MaterialPageRoute(builder: (context) => Call()));
            },
            onCallRejected: (String sessionId, int callType, int callerId,
                String callerName, Set opponentsIds) {
              return Navigator.push(
                  context, MaterialPageRoute(builder: (context) => Call()));
            },
          );
          await ConnectycubeFlutterCallKit.setOnLockScreenVisibility(
            isVisible: true,
          );
          await ConnectycubeFlutterCallKit.showCallNotification(
            sessionId: '1',
            callType: 0,
            callerName: 'number',
            callerId: 0,
            opponentsIds: Set.of([0]),
          );
        },

android 12 error pendingIntent in show dialog in background

hi android 12 error in show dialog the background

error:
PlatformException(ERROR, co.sorena.poc: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles., , null)

toturial in fix
https://stackoverflow.com/questions/68228666/targeting-s-version-10000-and-above-requires-that-one-of-flag-immutable-or-fl

https://stackoverflow.com/questions/67045607/how-to-resolve-missing-pendingintent-mutability-flag-lint-warning-in-android-a

[iOS] App icon does not show on CallKit UI

The app icon is not showing on the app button in the CallKit UI.

AppIcon:
AppIconCallKit-40

Screenshot:
IMG_0105

This is the code that I'm using:

ConnectycubeFlutterCallKit.instance.init(
				onCallAccepted: _onCallAccepted,
				onCallRejected: _onCallRejected,
				ringtone: '',
				icon: 'AppIconCallKit',
				color: ''
			);

ConnectycubeFlutterCallKit.instance.updateConfig(ringtone: '', icon: 'AppIconCallKit', color: '');

The Console.app shows this line:

Registering configuration <CXProviderConfiguration 0x2829e8540 localizedName=(null) ringtoneSoundURL=(null) iconTemplateImageData=0x0 maximumCallGroups=1 maximumCallsPerCallGroup=1 supportsAudioOnly=1 supportsVideo=1 supportsEmergency=0 supportsVoicemail=0 supportsCurrentPlatform=1 includesCallsInRecents=0 audioSessionID=144725 supportedHandleTypes=1>

Thank you.

IOS getting crash

IOS gettting crash when using ConnectycubeFlutterCallKit.getLastCallId() (ONLY IOS).

And also call getting below issue when accept and reject.

Unhandled Exception: type '_Uint8ArrayView' is not a subtype of type 'String'
#0 new CallEvent.fromMap (package:connectycube_flutter_call_kit/src/call_event.dart:71:52)
#1 ConnectycubeFlutterCallKit._processEvent (package:connectycube_flutter_call_kit/src/connectycube_flutter_call_kit.dart:258:35)
#2 ConnectycubeFlutterCallKit.initEventsHandler. (package:connectycube_flutter_call_kit/src/connectycube_flutter_call_kit.dart:128:7)

Screen.Recording.2022-01-28.at.11.45.49.PM.mov

onCallAccepted in background mode

Hi, I've use this library and it's very helpful. It's work on background (app killed), but it doesn't work on background (app minimized). So here's my logic :

  1. FCM trigger App to show incoming call
  2. Users answer it, and app saved "call data" from FCM using shared preferences
  3. App opened and connect to the caller using "call data" from shared preferences
  4. Call connected

And my Code
Screen Shot 2021-06-08 at 11 44 05

However, when the app is minimized, the step 3 is not executed, it won't connect to the caller, because the call data is missing. So I'm guessing the onCallAccepted is not executed when the app is in background mode (app minimized). Any solution for this case?

Thanks

Onaccept Callback not firing

When I receive a notification.
I click accept or reject but the functions are never fired.

 ConnectycubeFlutterCallKit.instance.init(onCallAccepted:
          (String sessionId, int callType, String callerId, String callerName,
              Set<String> opponentsIds, Map<String, String>? userInfo) async {
        print('accept pressed');
        ConnectycubeFlutterCallKit.setOnLockScreenVisibility(isVisible: true);
        ConnectycubeFlutterCallKit.reportCallAccepted(sessionId: sessionId);
        final channel = SNAB.streamChatClient.channel('message', id: callerId);
        routerConfig.push(ChatVideoCallRoute(
            channel: channel, uid: callerId, isIncoming: true));
        return null;
      }, onCallRejected: (String sessionId,
          int callType,
          String callerId,
          String callerName,
          Set<String> opponentsIds,
          Map<String, String>? userInfo) async {
        print('rejected');
        ConnectycubeFlutterCallKit.reportCallEnded(sessionId: sessionId);
        ConnectycubeFlutterCallKit.setOnLockScreenVisibility(isVisible: false);
        return null;
      });

On callaccept - Run flutter on specific screen

Is it possible to run Flutter on specific screen instead of running the application from start ?

I found the code that launch the application in ConnectycubeFlutterCallKitPlugin.kt

Is there a way to modify it so it launch flutter on specific screen and pass the parameters to that screen ?

ACTION_CALL_ACCEPT -> {
                saveCallState(callIdToProcess!!, CALL_STATE_ACCEPTED)

                channel.invokeMethod("onCallAccepted", parameters)

                val launchIntent = getLaunchIntent(context!!)
                launchIntent?.action = ACTION_CALL_ACCEPT
                context.startActivity(launchIntent)
                }

onCallAccepted and onCallRejected events from onBackgroundMessage

Hello,

I am trying to integration this awesome solution. I am able to integration incoming call notifications. But not able to receive onCallAccepted and onCallRejected events when app in is background and processCallNotification started form onBackgroundMessage. Do we need to do some extra configurations to able to receive onCallAccepted and onCallRejected events when app in is background? Thanks.

App crash when phone is locked

When phone is locked, IncomingCallActivity crashed in only release mode

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{***.package.***/com.connectycube.flutter.connectycube_flutter_call_kit.IncomingCallActivity}: android.view.InflateException: Binary XML file line #1 in ***.package.***:layout/activity_incoming_call: Binary XML file line #1 in ***.package.***:layout/activity_incoming_call: Error inflating class x at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4037) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4203) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2440) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8641) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)

Android 11 Call Accept Not open app

I used your plugin and its work when app is in foreground but when terminate my app and when the incoming call after receiving i accept but nothing happen. In Android 10 higher Only not work other is seems working.

In background Not Trigger Call notifictaion

its return [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method showCallNotification on channel connectycube_flutter_call_kit)

How to send the user_info data via VoIP push

Hello!

I'm sending the user_info as json string (I need this data to connect with my RTC provider) but I can't get the user_info on CallEvent object. The line "userInfo = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [String:String]" returns nil.

Can you help me?

Thank you!

Notification don't work on android 12 when app close from background after change flag to PendingIntent.FLAG_IMMUTABLE notification appear but when click on button app does'nt open

We are use connectycube_flutter_call_kit 2.0.2 on android 10 and it's working fine but when we switch to android 12 when app is close with homePage button or back button notification don't work but after change all "PendingIntent.FLAG_UPDATE_CURRENT" to "PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT" in NotificationManager.kt file this issue fix and notification work but when click on buttons for example accept for incoming call , its did'nt work and do nothing but in android 10 open app and working fine.

this is my log here :
D/FLTFireMsgReceiver(19693): broadcast received for message
W/FirebaseMessaging(19693): Unable to log event: analytics library is missing
D/NotificationsManager(19693): customRingtone
D/NotificationsManager(19693): ringtone 2 content://settings/system/ringtone
W/FlutterJNI(19693): FlutterJNI.loadLibrary called more than once
W/FlutterJNI(19693): FlutterJNI.prefetchDefaultFontManager called more than once
I/ResourceExtractor(19693): Found extracted resources res_timestamp-55-1652177938650
W/FlutterJNI(19693): FlutterJNI.init called more than once
I/FLTFireBGExecutor(19693): Creating background FlutterEngine instance.
I/FLTFireMsgService(19693): Service has not yet started, messages will be queued.
D/DeviceInfoPlugin(19693): Use TaskQueues.
D/PathProviderPlugin(19693): Use TaskQueues.
I/EventReceiver(19693): NotificationReceiver onReceive Call ACCEPT, callId: 1652179602368
D/ConnectycubeFlutterCallKitPlugin(19693): callEventMap: {caller_name=IrancellMan, user_info={"uid":"0:bfe1a3aa-ed7f-46c4-aeebdea","callEventJson":"{"1":"1652179600520-65i90815h5","2":0,"3":"1652179600520","4":"0","5":1}"}, caller_id=123456789, session_id=1652179602368, call_opponents=1, call_type=0}
W/FlutterJNI(19693): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: connectycube_flutter_call_kit.callEventChannel. Response ID: 321
D/FLTFireMsgReceiver(19693): broadcast received for message
W/ConnectycubeFlutterBgPerformingService(19693): A background message could not be handled in Dart as no onBackgroundMessage handler has been registered.

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.