-
Notifications
You must be signed in to change notification settings - Fork 4
Customize FileSharing Notifications
Kristiyan Petrov edited this page May 6, 2019
·
4 revisions
All file sharing notifications (downloading files) may be customized inside the following method onCreateNotification(fileInfo, notificationType, notificationStyle)
N.B. All the notifications have a default behaviour which will be triggered when action.execute(); is called
BandyerSDK.Builder builder = new BandyerSDK.Builder(this, getString(R.string.app_id))
builder.withFileSharingEnabled(new FileSharingNotificationListener() {
@Override
public void onCreateNotification(@NonNull FileInfo fileInfo,
@NonNull FileSharingNotificationType notificationType,
@NonNull FileSharingNotificationStyle notificationStyle) {
notificationStyle.setNotificationColor(Color.GREEN);
}
@Override
public void onNotificationAction(@NonNull final NotificationAction action) {
// Here you can execute your own code before executing the default action of the notification
action.execute();
}
};);