mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[notifications][android] Fix file:// for android notification images
This commit is contained in:
@@ -517,7 +517,7 @@ public class RNFirebaseNotificationManager {
|
||||
if (image.startsWith("http://") || image.startsWith("https://")) {
|
||||
return getBitmapFromUrl(image);
|
||||
} else if (image.startsWith("file://")) {
|
||||
return BitmapFactory.decodeFile(image);
|
||||
return BitmapFactory.decodeFile(image.replace("file://", ""));
|
||||
} else {
|
||||
int largeIconResId = getResourceId("mipmap", image);
|
||||
return BitmapFactory.decodeResource(context.getResources(), largeIconResId);
|
||||
|
||||
Reference in New Issue
Block a user