Closed mayiPalacios closed 1 month ago
Afroz Khan (CometChat Team) replied:
Hello,
We need some additional information from your end to investigate this issue. Please create a ticket through our support portal here: https://help.cometchat.com/hc/en-us/requests/new
Afroz Khan CometChat
Hello, I have a problem. I am trying to implement calls in my project with CometChat and with the help of the CallKeepHelper library, I am trying to handle calls with push notifications along with Firebase. Currently, I already receive the notification when I get a call. I am doing this in my
App.tsx
where I have this method:When the user wants to call another user with the
outgoingCall
, the receiving user gets the call, and the methoddisplayCallAndroid
is executed. I pass themsg
values as parameters and a reference to thenavigate
method for navigation. InsideCallKeepHelper
, there are some listeners, which are these:These listeners help me detect if the user accepted or declined the call in the notification. If the user accepts, the
answerCall
method is triggered. In this method, I useCometChat.acceptCall
to indicate that the user has accepted the call, and the user who initiated the call (theoutgoingCall
) joins the call. The user who received the call is then redirected to the "OngoingCall" component.This is my "OngoingCall" component, where in the
useEffect
I ensure the user starts a session. If you notice in theCallSettingsBuilder()
, I set those fields because in thenodeModules
within theCometChatOngoingCall
component, when callingbuild()
onCallSettingsBuilder()
, it returnsundefined
.I must emphasize that all the values I pass to the component are already ensured to not be
undefined
. The point is that when theCometChatOngoingCall
component is executed, I get the following error:Inside the
CometChatOngoingCall
component withinnode_modules
, I have already ensured that theauthToken
is generated, and it does get generated.