diff --git a/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt b/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt index 09dee4ea..86c4e411 100644 --- a/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt +++ b/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt @@ -168,13 +168,11 @@ internal class CustomerIOPushNotificationHandler( .setStyle(NotificationCompat.BigTextStyle().bigText(body)) tintColor?.let { color -> notificationBuilder.setColor(color) } - // This is custom logic to add images to a push notification. Some image URLs have not - // been able to display an image in a push. https://github.com/customerio/issues/issues/7293 - // Instead, we recommend customers use `notification.image` in the FCM payload to bypass - // our logic and use the logic from FCM's SDK for image handling instead. try { - // check for image - val notificationImage = bundle.getString(IMAGE_KEY) + // check for image in data and notification payload to cater for both simple and rich push + // data only payload (foreground and background) + // notification + data payload (foreground) + val notificationImage = bundle.getString(IMAGE_KEY) ?: remoteMessage.notification?.imageUrl?.toString() if (notificationImage != null) { addImage(notificationImage, notificationBuilder, body) }