callkeep
callkeep copied to clipboard
How to integrate with WebRtc? How open connection programmatically?
I am new to using flutter-webrtc and need help.
I have the following "user case" in my app:
- I have two devices with flutter-webrtc (A, B).
- device B is in background mode
- I'm trying to call from device A to B. if the devices are in the foreground it works. but device B in background. so I am sending a push message to device B.
- device B has received this message. and using Callkeep displays the call window( displayIncomingCall ).
- when I press answer, the standard system dialog opens.
- I need to open client webrtc on device B. How can I do that?
Any examples. I will be grateful. This is a great package, but more detailed documentation will be very helpful.
@FetFrumos following you, please write here if you found the solution. Thanks
receive message, bring app to foreground, go specific page, establish peer to peer connection.
As you see there is no callkeep in steps. I build webrtc _sip application. first tried to use callkeep but it didnt worked as I expected. then I recoded webrtc related side in native side and implement foreground services that establishes webrtc connection and added custom notifications to show incoming call after connection established. I almost work on this topic for 8 months and at the and best solution is work with native code and dart code in collabration. callkeep gave me ideas both ios and android native side, I implemented native methods inspiring callkeeps native methods. if you are learning just look for third parties like agora.io to implement fully functional apps.
Please dont request any example code because my codes are company related commercial app and there is nda for the codes.
receive message, bring app to foreground, go specific page, establish peer to peer connection.
As you see there is no callkeep in steps. I build webrtc _sip application. first tried to use callkeep but it didnt worked as I expected. then I recoded webrtc related side in native side and implement foreground services that establishes webrtc connection and added custom notifications to show incoming call after connection established. I almost work on this topic for 8 months and at the and best solution is work with native code and dart code in collabration. callkeep gave me ideas both ios and android native side, I implemented native methods inspiring callkeeps native methods. if you are learning just look for third parties like agora.io to implement fully functional apps.
Please dont request any example code because my codes are company related commercial app and there is nda for the codes.
ho, i am in exact same situation, and it's been 6 months. as your comment, i assume it's better to create a native class and with that class, bring the flutter webrtc page into action. or you completely avoided flutter on webrtc side? also pleas give any reference if you have, that i can boost the process.
There is no direct interaction between callkeep and webrtc. You need to use push to wake up the app that integrates callkeep, and then establish actual communication through webrtc offer/answer.
it's all done, the webrtc part is all working. the only problem is when i bring the app into foreground using call keep, I can't route to another page. ie: video call page, all i can see is a blank white screen
The bestoption isusing flags to diferentiate between calls and normal openings of your app,lets say if it is call your flag or value be 200 then navigate to Video call ,,
The bestoption isusing flags to diferentiate between calls and normal openings of your app,lets say if it is call your flag or value be 200 then navigate to Video call ,,
ye, I am flagging it as a call and while those notification arrives, the app automatically opens, but into a white screen only
@muhammedrashidm try this
backgroundMessageHandler(Map<String, dynamic> payload) {
print('backgroundMessage: message => ${payload.toString()}');
//Your operation with received payload
locator<NavigationService>().navigateTo(Routes.videoCall);
}
I think your white screen issue occur while navigating to video call page with context, You can use stacked_services
for navigation without context.