Skip to content

Commit

Permalink
[notifications][android] Support file:// urls for bitmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbianca committed Apr 10, 2018
1 parent eb91523 commit 5dbb6bc
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ private RemoteInput createRemoteInput(Bundle remoteInput) {
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);
Expand Down

0 comments on commit 5dbb6bc

Please sign in to comment.