Incoming call alert not working in android

I have implemented everything on your website. But it’s still not working.

Hi @Jhunior,

Welcome to the Sendbird Community. Could you provide some context as to specifically what doesn’t work? We’ll need a lot more details in order to assist.

public void onMessageReceived(@NonNull @NotNull RemoteMessage remoteMessage) {
    if (SendBirdCall.handleFirebaseMessageData(remoteMessage.getData())) {

}
}

This method is not fired. And is there anyway i can get the calls customitems here?

Even my sendbirdcalllistener() is not firing

Hi @Jhunior,

I want to make sure we are both on the same page, as you referenced calls in your subject. Are you expecting an incoming call, to trigger the onMessageReceived handler from chat? If so, that does not happen. onMessageReceived is only trigger when a new chat message is received.

If you’re also using the automated messages that occur for calls, those are sent with the is_silent property as true and thus do not trigger the handler.

Don’t worry… i have fixed that…
Now i have a new problem. Am i supposed to authenticate the user everytime my app is initiated? Because i tried authenticating only at the point where the user logs in but eqch time i kill the app and relaunch it i get the error “The user is not authenticated”

Then also the onMessageReceived method fires multiple times while the there is an incoming call making it hard for me to manage… is there an easy way to manage it?

Hi @Jhunior,

You would need to re-authenticate each time the app is initialized. Otherwise the SDK does not have any context of the user. In terms of the onMessageReceived, what types of messages you receiving when an incoming call occurs?