[notifications][android] Support file:// urls for bitmaps
This commit is contained in:
parent
eb91523478
commit
5dbb6bc9fd
|
@ -516,6 +516,8 @@ public class RNFirebaseNotificationManager {
|
|||
private Bitmap getBitmap(String image) {
|
||||
if (image.startsWith("http://") || image.startsWith("https://")) {
|
||||
return getBitmapFromUrl(image);
|
||||
} else if (image.startsWith("file://")) {
|
||||
return BitmapFactory.decodeFile(image);
|
||||
} else {
|
||||
int largeIconResId = getResourceId("mipmap", image);
|
||||
return BitmapFactory.decodeResource(context.getResources(), largeIconResId);
|
||||
|
|
Loading…
Reference in New Issue