connectycube-flutter-call-kit icon indicating copy to clipboard operation
connectycube-flutter-call-kit copied to clipboard

Incoming call screen doesn't appear

Open MrunalrajRedij opened this issue 2 years ago • 2 comments

package: connectycube_flutter_call_kit 2.0.6

The callee gets "call notification" (Cloud notification) even when app is in foreground (active) but not the "Incoming call screen". I haven't done any changes in example code.

I want this screen to appear when callee receives the call invitation (When in foreground): forefround_call

I found this piece of code on call_manager.dart in _initCalls() function interesting:

      if (callState == CallState.REJECTED) {
        reject(_currentCall!.sessionId);
      } else if (callState == CallState.ACCEPTED) {
        acceptCall(_currentCall!.sessionId);
      } else if (callState == CallState.UNKNOWN) {
        // ConnectycubeFlutterCallKit.setCallState(sessionId: _currentCall.sessionId, callState: CallState.PENDING);
        // _showIncomingCallScreen(_currentCall!);
        if (Platform.isWindows || Platform.isMacOS || kIsWeb) {
          _showIncomingCallScreen(_currentCall!);
        }
      }

here _showIncomingCallScreen doesn't call for android platform Is that why it is not appearing? Also Call notification(Cloud/push) is working fine in all three states background, terminated, and foreground (I want to show the call screen here instead of notification)

Update: I tried terminating the app then locked my mobile (turn off). Now, If I initiate the call the incoming call screen is appearing. But not when the app is in the foreground.

MrunalrajRedij avatar Aug 16 '22 13:08 MrunalrajRedij

You can see the Incoming call screen only in case when the device is locked, otherwise, the notification will be displayed. If you need to show the Incoming call screen anyway, you can fork the plugin and rewrite it according to your needs.

TatankaConCube avatar Aug 16 '22 16:08 TatankaConCube

Do you have any references on how to do it?

MrunalrajRedij avatar Aug 17 '22 08:08 MrunalrajRedij

Closing since I no longer need this feature.

MrunalrajRedij avatar Jan 07 '23 15:01 MrunalrajRedij