diff --git a/src/main/java/com/marianhello/bgloc/ResourceResolver.java b/src/main/java/com/marianhello/bgloc/ResourceResolver.java index 35bb43be..3f316d65 100644 --- a/src/main/java/com/marianhello/bgloc/ResourceResolver.java +++ b/src/main/java/com/marianhello/bgloc/ResourceResolver.java @@ -33,6 +33,10 @@ public Integer getDrawable(String resourceName) { return getAppResource(resourceName, "drawable"); } + public Integer getMipMap(String resourceName) { + return getAppResource(resourceName, "mipmap"); + } + public String getString(String name) { return getApplicationContext().getString(getAppResource(name, "string")); } diff --git a/src/main/java/com/marianhello/bgloc/sync/NotificationHelper.java b/src/main/java/com/marianhello/bgloc/sync/NotificationHelper.java index 77e806ae..1c8081bf 100644 --- a/src/main/java/com/marianhello/bgloc/sync/NotificationHelper.java +++ b/src/main/java/com/marianhello/bgloc/sync/NotificationHelper.java @@ -57,12 +57,12 @@ public Notification getNotification(String title, String text, String largeIcon, builder.setContentTitle(title); builder.setContentText(text); if (smallIcon != null && !smallIcon.isEmpty()) { - builder.setSmallIcon(mResolver.getDrawable(smallIcon)); + builder.setSmallIcon(mResolver.getMipMap(smallIcon)); } else { builder.setSmallIcon(android.R.drawable.ic_menu_mylocation); } if (largeIcon != null && !largeIcon.isEmpty()) { - builder.setLargeIcon(BitmapFactory.decodeResource(appContext.getResources(), mResolver.getDrawable(largeIcon))); + builder.setLargeIcon(BitmapFactory.decodeResource(appContext.getResources(), mResolver.getMipMap(largeIcon))); } if (color != null && !color.isEmpty()) { builder.setColor(this.parseNotificationIconColor(color));