Managing Notifications
Detailed in this page is how you can set up push notifications as well as managing in-app notifications for new in-app chat messages.
In-App Notifications
By default, a notification will be shown on top of your app's UI when a new message is received.
Disabling In-App Notification Sounds
When your app users receive an in-app notification through Instabug, sound is enabled by default. However, you can disable it by using the following method.
//iOS
//Not support on iOS
//Android
Replies.setInAppNotificationSound(false);
Disabling Conversation Sounds
You can set whether new messages received will trigger a small sound notification or not.
//iOS
//Not supported on iOS
//Android
new Instabug.Builder(this, "ANDROID_APP_TOKEN")
.SetInvocationEvent(InstabugInvocationEvent.Shake)
.SetShouldPlayConversationSounds(true)
.Build();
Disabling In-App Notifications
You can disable the in-app notifications using the following method.
//iOS
Replies.InAppNotificationsEnabled = false;
//Android
Replies.SetInAppNotificationEnabled(false);
Getting Unread Messages Count
You can use the following method to get the number of messages a user has yet to read.
//iOS
Replies.UnreadRepliesCount;
//Android
Replies.getUnreadRepliesCount();
Updated over 4 years ago
Learn to identify your users so that the push notifications always go to the correct user. Also check out how to communicate with your users by chatting with them through different pages.