ConnectyCube / connectycube-flutter-call-kit

A Flutter plugin for displaying call screen when the app in the background or terminated.
https://developers.connectycube.com/flutter
Apache License 2.0
55 stars 75 forks source link

in terminated state when click on accept it open only app #116

Closed ArbabShujaat closed 5 months ago

ArbabShujaat commented 8 months ago

connectycube_flutter_call_kit working in background and foreground but when in terminated state and click on accept button it only open the app and not navigation to the call screen

TatankaConCube commented 8 months ago

it is expected behavior cause the plugin doesn't know how and to what screen it should navigate. after starting the app you should check the state of the latest call and go to the conversation screen if the call was accepted

ArbabShujaat commented 8 months ago

can you explain in this function Future onCallAcceptedWhenTerminated(CallEvent event) async{ print('this is --------------------------------------------4444444 ${event}');

     print('this is --------------------------------------------');     

}

how i move to the specific screen because normal navigation, Get.to() nor GlobalKey navigatorKey= GlobalKey(); through all above navigation i can't move to the specific screen

TatankaConCube commented 8 months ago

the callback onCallAcceptedWhenTerminated is useless for this case. you need to process a normal app running. after starting the app you should check if you have an accepted call and start joining the call if so. there is an example of how it can be in your app https://github.com/ConnectyCube/connectycube-flutter-samples/blob/feature/private_calls_over_janus_example/conf_call_sample/lib/src/login_screen.dart#L46

it gets the last call ID then checks its state and if it was accepted the call joining flow is started

TatankaConCube commented 5 months ago

no activity for a long time, closing