Skip to content

Commit 2eda1d1

Browse files
fix(android): smallIcon always using default icon (#125)
* smallIcon always using default icon * Adding changeset --------- Co-authored-by: Joseph Pender <[email protected]>
1 parent 8ef1ca0 commit 2eda1d1

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.changeset/calm-guests-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@capacitor/background-runner": minor
3+
---
4+
5+
Fixes an issue where Android Notification small icons were always using the default icon

packages/capacitor-plugin/android/src/main/java/io/ionic/backgroundrunner/plugin/api/Notification.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Notification(jsonObject: JSONObject) {
3232
id = jsonObject.optInt("id", -1)
3333
title = jsonObject.optString("title", "")
3434
body = jsonObject.optString("body", "")
35+
smallIcon = jsonObject.optString("smallIcon", "")
3536
ongoing = jsonObject.optBoolean("ongoing", false)
3637
autoCancel = jsonObject.optBoolean("autoCancel", false)
3738

@@ -59,4 +60,4 @@ class Notification(jsonObject: JSONObject) {
5960

6061
return resId
6162
}
62-
}
63+
}
Binary file not shown.

0 commit comments

Comments
 (0)