mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 22:50:20 +08:00
[notifications][android] Support file:// urls for bitmaps
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user