How do I get notified or callback/invoked function, if there is invitation or user auto added in group function ,I have already use this function
onUserReceivedInvitation
onUserJoined
onUserLeft
in GroupChannelHandler class but these methods are not called/invoked
Hello @Nadir_Kunbhar
To receive notifications for group channel invitations, you can use the onUserReceivedInvitation
method in the GroupChannelHandler
class. However, if this method is not being called, there might be an issue with your implementation.
Make sure that you have properly registered the GroupChannelHandler
and set it as the event handler for group channel events. Here’s an example of how to do this in Android:
GroupChannelHandler groupChannelHandler = new GroupChannelHandler() {
@Override
public void onUserReceivedInvitation(GroupChannel groupChannel, User inviter, List<User> invitees) {
// Handle the invitation received event here
}
};
SendBird.addChannelHandler("UNIQUE_HANDLER_ID", groupChannelHandler);
If you have already implemented this correctly and the method is still not being called, please double-check your code and ensure that you are correctly sending invitations to the group channel. If you continue to experience issues, please provide more details about your implementation so that I can assist you further.