Can I override default push notification icon in android from app icon to custom icon?

后端 未结 6 926
遥遥无期
遥遥无期 2021-02-12 16:16

Can I override default push notification icon in android from app icon to custom icon?

I am using default firebase implementation to display notification in system tray,

6条回答
  •  囚心锁ツ
    2021-02-12 16:59

    You can set

      .setSmallIcon(int);
      .setLargeIcon(bitmap);
    

    A small icon, set by setSmallIcon()

    NotificationCompat.Builder setLargeIcon (Bitmap icon)
    

    Set the large icon that is shown in the ticker and notification.

    in NotificationCompat.Builder.

    Documentation - https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html

提交回复
热议问题