class NotificationImageDecorator extends HaloNotificationDecorator {

    @Override
    public NotificationCompat.Builder decorate(@NonNull NotificationCompat.Builder builder, @NonNull Bundle bundle) {
        if (bundle.get(IMAGE_KEY) != null) {
            try {
                PushImage pushImage = PushImage.deserialize(bundle.get(IMAGE_KEY).toString(), Halo.instance().framework().parser());
                Bitmap bitmapNotification = getImageBitmap(pushImage.getUrl());
                if (bitmapNotification != null) {
                    String title = bundle.getString("title");
                    String message = bundle.getString("body");
                    RemoteViews remoteView, remoteViewExpanded;
                    switch (pushImage.getLayout()) {
                        case PushImage.DEFAULT:
                            builder.setLargeIcon(bitmapNotification);
                            break;
                        case PushImage.EXPANDED:
                            builder.setStyle(new NotificationCompat.BigPictureStyle().bigPicture(bitmapNotification));
                            break;
                        case PushImage.LEFT:
                            remoteView = getRemoteView(pushImage.getLayout(), bitmapNotification, title, message);
                            builder.setCustomContentView(remoteView);
                            break;
                        case PushImage.RIGHT:
                            remoteView = getRemoteView(pushImage.getLayout(), bitmapNotification, title, message);
                            builder.setCustomContentView(remoteView);
                            break;
                        case PushImage.TOP:
                            remoteView = getRemoteView(PushImage.LEFT, bitmapNotification, title, message);
                            builder.setCustomContentView(remoteView);
                            remoteViewExpanded = getRemoteView(pushImage.getLayout(), bitmapNotification, title, message);
                            builder.setCustomBigContentView(remoteViewExpanded);
                            break;
                        case PushImage.BOTTOM:
                            remoteView = getRemoteView(PushImage.RIGHT, bitmapNotification, title, message);
                            builder.setCustomContentView(remoteView);
                            remoteViewExpanded = getRemoteView(pushImage.getLayout(), bitmapNotification, title, message);
                            builder.setCustomBigContentView(remoteViewExpanded);
                            break;
                        case PushImage.BACKGROUND:
                            remoteView = getRemoteView(pushImage.getLayout(), bitmapNotification, title, message);
                            builder.setCustomContentView(remoteView);
                            builder.setCustomBigContentView(remoteView);
                            break;
                    }
                }

            } catch (HaloParsingException e) {
                Halog.v(NotificationImageDecorator.class, "Cannot parse the content");
            }
        }

        return chain(builder, bundle);
    }

    public  NotificationImageDecorator(Context context, HaloNotificationDecorator decorator);

}