[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) {
|
private Bitmap getBitmap(String image) {
|
||||||
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://")) {
|
||||||
|
return BitmapFactory.decodeFile(image);
|
||||||
} else {
|
} else {
|
||||||
int largeIconResId = getResourceId("mipmap", image);
|
int largeIconResId = getResourceId("mipmap", image);
|
||||||
return BitmapFactory.decodeResource(context.getResources(), largeIconResId);
|
return BitmapFactory.decodeResource(context.getResources(), largeIconResId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user