Skip to content

Commit

Permalink
Consider compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
hirotakaakita committed Feb 17, 2024
1 parent 31a006a commit 6081c20
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ class PushNotificationsUtils(
builder.apply {
setContentTitle(payload.title)
setContentText(payload.body)
setSmallIcon(IconCompat.createWithBitmap(imageIcon))
if(imageIcon == null) {
setSmallIcon(R.drawable.ic_launcher_foreground)
} else {
setSmallIcon(IconCompat.createWithBitmap(imageIcon))
}
setContentIntent(pendingIntent)
setPriority(NotificationCompat.PRIORITY_DEFAULT)
setLargeIcon(largeImageIcon)
Expand Down

0 comments on commit 6081c20

Please sign in to comment.