connectycube-flutter-samples icon indicating copy to clipboard operation
connectycube-flutter-samples copied to clipboard

In Terminated State App is opening but not taking me to calling screen.

Open Usamamajid13 opened this issue 3 years ago • 9 comments
trafficstars

Specify the sample to which the issue belongs (use [x]): [] Chat sample [X] P2P Call sample [] Conference Call sample

Platform (use [x]) [X] Android [] iOS [] macOS [] Windows [] Web

Device info Manufacture: Model: Emulator OS version: API 30

Describe the bug: I am using c2c_flutter_call_kit to show the calling UI in my app. Calling perfectly work on background state (Appreciate that) but the app is showing calling UI and when I click on Accept button it opens up the app but cannot navigate me my calling screen that I build myself.

Steps to Reproduce:

  1. I generate a firebase notification
  2. On receiving notification I check if it is a background notification or a Message notification
  3. After receiving background notification, I show the calling UI and on click of calling UI I navigate to my Calling Screen.

Logs: No logs to show because I am working on terminated state of the app. Logs are not generated on terminated state. log here

or
[Gist log](https://gist.github.com/)

**Actual result:**


**Expected behavior:**
I want my calling UI notification to open the app and navigate me to my calling screen.

**Additional info**
Add any other context about the problem here.

Usamamajid13 avatar Mar 22 '22 09:03 Usamamajid13

Why do use the forked lib but not original connectycube_flutter_call_kit? In our sample we use it and it works well for us.

TatankaConCube avatar Mar 22 '22 09:03 TatankaConCube

Hi @TatankaConCube, i'm having the same issue even i'm using the connectycube_flutter_call_kit. Could you please help how to fix that.

Thanks

Kevy235 avatar Mar 25 '22 08:03 Kevy235

Can you please help me with the background calling thing. I want to open my UI when I receive the call but the calling pop up shows up and on clicking on that it opens up the app but does not navigate anywhere on the app. And it just opens the app and nothing esle.

Usamamajid13 avatar Mar 26 '22 11:03 Usamamajid13

Hey, I am getting this same thing, any updates?

LucaJeevanjee avatar May 17 '22 08:05 LucaJeevanjee

Not yet! haven't got any replies from the owner.

Usamamajid13 avatar May 17 '22 19:05 Usamamajid13

Not yet! haven't got any replies from the owner.

Hey I spent 12 hrs on this today with my team and figured it out. Ridiculously bad sample code compared to what you have to do.

I'll share the code and files tomorrow!

LucaJeevanjee avatar May 17 '22 19:05 LucaJeevanjee

Sorry to say that I have managed to do that using firebase but it was not a good option.

Usamamajid13 avatar May 17 '22 19:05 Usamamajid13

Sorry to say that I have managed to do that using firebase but it was not a good option.

I'm using firebase and got it working. Got to show call notification in background handler and on the onMessage handler you need to init the callManager.

Then you need to create the callAcceptedOnTerminated function handler in the push notification manager. For this just copy the rejectOnTerminated that's in the example and change the name, in the function called by that, you need to remove everything after the onSessionRestore and then call the CallManager.onAcceptCall()

LucaJeevanjee avatar May 17 '22 20:05 LucaJeevanjee

Also need to change the callManager so where the state is unknown or pending yo, you navigate to incoming call screen

LucaJeevanjee avatar May 17 '22 20:05 LucaJeevanjee