-
Notifications
You must be signed in to change notification settings - Fork 4
Customize Chat Module Notifications
Kristiyan Petrov edited this page Apr 6, 2021
·
9 revisions
- Incoming chat messages can be displayed as notification or activities.
- A chat notification once clicked will open the chat activity.
- All chat notifications may be customized inside the following method: onCreateNotification(chatInfo, chatNotificationStyle)
BandyerSDK.Builder builder = new BandyerSDK.Builder(this, getString(R.string.app_id))
builder.withChatEnabled(new ChatNotificationListener() {
@Override
public void onIncomingChat(@NonNull IncomingChat chat, boolean isDnd, boolean isScreenLocked) {
chat.withConfiguration(new SimpleChatConfiguration());
chat.asNotification().show(App.this);
}
@Override
public void onCreateNotification(@NonNull ChatInfo chatInfo, @NonNull ChatNotificationStyle notificationStyle){
notificationStyle.setNotificationColor(Color.RED);
}
};
);
SimpleChatConfiguration Most common type of configuration for chat. Follow the link for more details.
SimpleCallConfiguration Most common type of configuration for call. Follow the link for more details.
Customize Configuration Customize the configuration at your desire. Follow the link for more details.