voximplant / flutter_demos

Voximplant Flutter SDK demos
18 stars 15 forks source link

Incoming call notifications #13

Closed abhi-dasgupta closed 3 years ago

abhi-dasgupta commented 3 years ago

hello, The incoming call notification only works when the app is open. Please advise me on how can i implement the incoming call screen for when the app is terminated, and when the screen is locked. Thanks

YuliaGrigorieva commented 3 years ago

Hello @abhi-dasgupta ,

Have you configured push notifications for your project?

When the application is in the background or terminated, you need to setup push notifications to receive an incoming call. Demo application are already integrated with firebase (android) and PushKit/CallKit (iOS) to get the push notification token and handle a VoIP push. However, you need to set up push notification for your Voximplant application in the Voximplant Control Panel.

Please take a look at these tutorial for push notification setup:

For android demo project you also need to add a valid google-services.json.

Best regards, Yulia Grigorieva

abhi-dasgupta commented 3 years ago

Hello @YuliaGrigorieva ,

Thanks for getting back, I've double-checked and I confirm I've added my FCM Server Key and Sender ID in the Push Certificate section of my application. Not sure what's missing, I am testing flutter_demos/video_call/ code without any modification whatsoever and I've set up the voximplant marketplace SDK Tutorial. When the flutter app is open on two devices the calls come through and get audio+video on both side, however if the app is terminated or screen is locked the call says "failed".

Please advise/guide me to set this up correctly. Thank you for looking into this

YuliaGrigorieva commented 3 years ago

Hello @abhi-dasgupta,

Please check that you have enabled push notifications in your VoxEngine scenario.

VoxEngine scenario should start with:

require(Modules.PushService);

Best regards, Yulia Grigorieva

abhi-dasgupta commented 3 years ago

@YuliaGrigorieva

That was it, getting notifications now. Thank you for looking into it. Would be great if someone could update the readme at https://github.com/voximplant/flutter_demos/tree/master/video_call to have this instruction, will be helpful for people like me who want to test things out before reading the docs further.

Thank you for your help