Use the method setLargeIcon(Bitmap?) instead of setLargeIcon(Icon?) because it may scale the Bitmap on versions before API 27. Starting in API 27, the framework does this automatically.
This commit is contained in:
parent
8878c9595a
commit
f0ec0164ef
1 changed files with 1 additions and 4 deletions
|
|
@ -11,7 +11,6 @@ package io.element.android.libraries.push.impl.notifications.factories
|
|||
import android.app.Notification
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.drawable.Icon
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationCompat.MessagingStyle
|
||||
|
|
@ -215,9 +214,7 @@ class DefaultNotificationCreator(
|
|||
if (openIntent != null) {
|
||||
setContentIntent(openIntent)
|
||||
}
|
||||
if (largeIcon != null) {
|
||||
setLargeIcon(Icon.createWithBitmap(largeIcon))
|
||||
}
|
||||
setLargeIcon(largeIcon)
|
||||
setDeleteIntent(pendingIntentFactory.createDismissRoomPendingIntent(roomInfo.sessionId, roomInfo.roomId))
|
||||
|
||||
// If any of the events are of rtc notification type it means a missed call, set the category to the right value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue