-
Notifications
You must be signed in to change notification settings - Fork 4
Customize FileSharing Notifications
Kristiyan Petrov edited this page Apr 26, 2022
·
4 revisions
All file sharing notifications (downloading files) may be customized inside the following method onCreateNotification(fileInfo, notificationType, notificationStyle)
BandyerSDKConfiguration.Builder builder = new BandyerSDKConfiguration.Builder("mAppId",Environment.Production.INSTANCE,Region.Eu.INSTANCE);
builder.notificationListeners(listeners -> listeners.setFileSharingNotificationListener(new FileSharingNotificationListener() {
@Override
public void onIncomingFile(@NonNull IncomingFile file,
boolean isDnd,
boolean isScreenLocked) {
file.asNotification(App.this).show();
}
@Override
public void onCreateNotification(@NonNull FileInfo fileInfo,
@NonNull FileSharingNotificationType notificationType,
@NonNull FileSharingNotificationStyle notificationStyle) {
notificationStyle.setNotificationColor(Color.GREEN);
}
}));