Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 09f1c4f

Browse files
author
Boris Tacyniak
authored
Merge pull request #1927 from flochtililoch/patch-1
Fix: Foreground notifications missing small icon
2 parents 60f7eba + 5e85395 commit 09f1c4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public void handleReceivedMessage(RemoteMessage message) {
5656
bundle.putString("color", remoteNotification.getColor());
5757
bundle.putString("tag", remoteNotification.getTag());
5858

59+
if(remoteNotification.getIcon() != null) {
60+
bundle.putString("smallIcon", remoteNotification.getIcon());
61+
} else {
62+
bundle.putString("smallIcon", "ic_notification");
63+
}
64+
5965
if(remoteNotification.getChannelId() != null) {
6066
bundle.putString("channelId", remoteNotification.getChannelId());
6167
}

0 commit comments

Comments
 (0)