Push Notification in Group Chat

I subscribe to group for receiving push notification regarding it by calling FirebaseMessaging.getInstance().subscribeToTopic(Constants.APP_ID+""+CometChatConstants.RECEIVER_TYPE_GROUP+""+GUID); and GUID = GroupID but I did not get any payload of Notification. I hope you can help me regarding this issue.

Second Issue : how to subscribe automatically as soon user added to group from portal or by third person.

Thanks in advance

1 Like

Hi @manish6314,

Please check that you have created NotificationBuilder inside onMessageReceived() to display notification on receiving payload.

Please refer below MyFirebaseMessagingService.java

For second issue you need to call your subscribeGroup method in onMemberAddedToGroup() method of group listener. So whenever user get added to group it will be subscribed.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.