cybex-dev / twilio_voice

Flutter Twilio Voice Plugin
https://twilio-voice-web.web.app/
MIT License
39 stars 80 forks source link

Need help : Can't get incoming call notification. #150

Closed muzammil-git closed 1 year ago

muzammil-git commented 1 year ago

This is how my AndroidManifest,xml looks, can you please help on how I can get incoming call notification, there's not much documentation I found to solve this.

image

cybex-dev commented 1 year ago

This is how my AndroidManifest,xml looks, can you please help on how I can get incoming call notification, there's not much documentation I found to solve this.

image

Could you clarify what you mean with:

how I can get incoming call notification

What is the use-case you have in mind?

muzammil-git commented 1 year ago

I am calling to my twilio number and upon calling I should have a notification like incoming call from xyz.

muzammil-git commented 1 year ago

Just like this. image

cybex-dev commented 1 year ago

I am calling to my twilio number and upon calling I should have a notification like incoming call from xyz.

I'm sure the example has this functionality?

Let me know if it doesn't work for you.

muzammil-git commented 1 year ago

I tried but, it doesn't work for me.

muzammil-git commented 1 year ago

The incoming call only applies to web i.e written SS for reference.

image

cybex-dev commented 1 year ago

In that case, I'd recommend using the CallEvent.ringing, this should suffice for all platforms. The CallEvent.incoming is used with Twilio Voice Web SDKs in lieu of the ringing, since Web (or all Mac platforms) don't provide a native callkit.

muzammil-git commented 1 year ago

Okay got the point, but my event Callevent.ringing is not working either. When I call from another phone to my twilio number it doesn't get the notification.

I have tested sending notification from https://testfcm.com/ , I am getting the below error. Am I missing something.

E/FlutterFcmService(13829): The message was not a valid Twilio Voice SDK payload:

muzammil-git commented 1 year ago

My payload looks like this, is this the way ?

{ "type": "incoming_call", "to": "+14155555555", "sid": "", "status": "ringing", "direction": "inbound", "duration": 0 }

cybex-dev commented 1 year ago

@muzammil-git I'd advise you test out the example app, review the ReadMe, this should get you up to speed somewhat faster and give you much more insight.