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

Commit 3e87b12

Browse files
committed
Default using drawable as Android large icon
1 parent 629c532 commit 3e87b12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
344344
String largeIcon = bundle.getString("largeIcon");
345345

346346
if (largeIcon != null && !largeIcon.isEmpty()) {
347-
largeIconResId = res.getIdentifier(largeIcon, "mipmap", packageName);
347+
largeIconResId = res.getIdentifier(largeIcon, "drawable", packageName);
348+
if (largeIconResId == 0) {
349+
largeIconResId = res.getIdentifier(largeIcon, "mipmap", packageName);
350+
}
348351
} else if(largeIcon == null) {
349352
largeIconResId = res.getIdentifier("ic_launcher", "mipmap", packageName);
350353
}

0 commit comments

Comments
 (0)