Notification smallIcon must use a simple mono vector drawable, not a launcher mipmap. Launcher icons render broken in the status bar on many devices. - Added app/src/main/res/drawable/ic_notification.xml (simple info icon) - Updated both showReplyNotification and buildForegroundNotification to reference R.drawable.ic_notification instead of R.mipmap.ic_launcher Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
@@ -92,7 +92,7 @@ class ChatNotificationService : Service() {
|
||||
val notification =
|
||||
NotificationCompat
|
||||
.Builder(this, CHANNEL_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setContentTitle("Hermes")
|
||||
.setContentText(text)
|
||||
.setStyle(NotificationCompat.BigTextStyle().bigText(text))
|
||||
@@ -116,7 +116,7 @@ class ChatNotificationService : Service() {
|
||||
private fun buildForegroundNotification(text: String): Notification =
|
||||
NotificationCompat
|
||||
.Builder(this, CHANNEL_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setContentTitle("Hermes")
|
||||
.setContentText(text)
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
|
||||
Reference in New Issue
Block a user