Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import androidx.annotation.ChecksSdkIntAtLeast
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.IconCompat
import com.amplifyframework.pushnotifications.pinpoint.common.R
import java.net.URL
import kotlinx.coroutines.CoroutineScope
Expand Down Expand Up @@ -130,10 +131,15 @@ class PushNotificationsUtils(
builder.apply {
setContentTitle(payload.title)
setContentText(payload.body)
setSmallIcon(R.drawable.ic_launcher_foreground)
setSmallIcon(IconCompat.createWithBitmap(largeImageIcon))
setContentIntent(pendingIntent)
setPriority(NotificationCompat.PRIORITY_DEFAULT)
setLargeIcon(largeImageIcon)
setStyle(
NotificationCompat.BigPictureStyle()
.bigPicture(largeImageIcon)
.bigLargeIcon(null)
)
setAutoCancel(true)
}

Expand Down