[notifications][android] Fix file:// for android notification images

This commit is contained in:
Chris Bianca 2018-04-11 18:27:02 +01:00
parent cd5c616a93
commit 62706f9629
1 changed files with 1 additions and 1 deletions

View File

@ -517,7 +517,7 @@ public class RNFirebaseNotificationManager {
if (image.startsWith("http://") || image.startsWith("https://")) { if (image.startsWith("http://") || image.startsWith("https://")) {
return getBitmapFromUrl(image); return getBitmapFromUrl(image);
} else if (image.startsWith("file://")) { } else if (image.startsWith("file://")) {
return BitmapFactory.decodeFile(image); return BitmapFactory.decodeFile(image.replace("file://", ""));
} else { } else {
int largeIconResId = getResourceId("mipmap", image); int largeIconResId = getResourceId("mipmap", image);
return BitmapFactory.decodeResource(context.getResources(), largeIconResId); return BitmapFactory.decodeResource(context.getResources(), largeIconResId);