Skip to content

Commit b8bc891

Browse files
committed
Rename icon to notiticationIcon and add documentation
1 parent d7c65cc commit b8bc891

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const options = {
5353
channelId: 'com.company.my',
5454
channelName: 'Foreground service for my app',
5555
notificationTitle: 'My app is running on background',
56+
notiticationIcon: 'Path to the resource icon of the notification',
5657
},
5758
}
5859
};
@@ -141,6 +142,7 @@ RNCallKeep.setForegroundServiceSettings({
141142
channelId: 'com.company.my',
142143
channelName: 'Foreground service for my app',
143144
notificationTitle: 'My app is running on background',
145+
notiticationIcon: 'Path to the resource icon of the notification',
144146
});
145147
```
146148

android/src/main/java/io/wazo/callkeep/VoiceConnectionService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ private void startForegroundService() {
240240
.setPriority(NotificationManager.IMPORTANCE_MIN)
241241
.setCategory(Notification.CATEGORY_SERVICE);
242242

243-
if (foregroundSettings.hasKey("icon")) {
243+
if (foregroundSettings.hasKey("notificationIcon")) {
244244
Context context = this.getApplicationContext();
245245
Resources res = context.getResources();
246-
String smallIcon = foregroundSettings.getString("icon");
246+
String smallIcon = foregroundSettings.getString("notificationIcon");
247247
notificationBuilder.setSmallIcon(res.getIdentifier(smallIcon, "mipmap", context.getPackageName()));
248248
}
249249

0 commit comments

Comments
 (0)