How can I integrate my video chat with Telecom?

129 views Asked by At

I have a Xamarin.Forms application that has a video chat feature. Currently, a video call is made by sending push notifications using Firebase, and is answered by touching the push notification. This is not a good solution, as a push notification may come too late, and it may be easily missed. I would like to use a native android telephony feature, that would let the user make a real phone ringing etc. I know it could be done using Telecom, as shown here:

https://developer.android.com/guide/topics/connectivity/telecom/selfManaged#incoming-calls

But I cannot figure out how practically I can integrate the telecom api with my application. E.g. should I keep push notification, and somehow make the incoming push notification get converted into a real phone call?

The article mentions for example,

onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest)

The telecom subsystem calls this method when your app calls the addNewIncomingCall(PhoneAccountHandle, Bundle) method to inform the system of a new incoming call in your app.

I don't see where this addNewIncomingCall() method is defined, or to what class it belongs.

Is there any example and/or explanation somewhere that would help me implement this?

0

There are 0 answers