Provide in-app ability to define a default notification icon #941
Labels
feature-request
Request a new feature
pending-community-response
Issue is pending response from the issue requestor
pinpoint
Issues with the AWS Android SDK for Pinpoint.
Which AWS Services is the feature request for?
Push Notifications - Pinpoint
Is your feature request related to a problem? Please describe.
We're unable to define a sane default notification icon from within the app. Our app icon uses an adaptive icon, which was introduced in Android 8 (and appears to be Google's preferred way to app icons going forward), resulting in a solid white icon as seen in issue #243
Describe the solution you'd like
Firebase allows us to define a meta-tag in the manifest to define a custom notification icon
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notification" />
We'd either like to be able to use this, or something similar ideally.
Describe alternatives you've considered
An alternative could be to make NotificationClientBase#NOTIFICATION_ICON_PUSH_KEY public allowing us to manually add in the key/value pair into the mapData before adding it to the NotificationDetails builder:
data.put(NotificationClientBase#NOTIFICATION_ICON_PUSH_KEY, "ic_notification")
.Currently there are at least two workarounds that could be used now, one that can be implemented in the application code, and the other by using the Pinpoint console.
Application Code method:
This is the alternative method described above, but we need to manually re-define the
NOTIFICATION_ICON_PUSH_KEY
key and the name of the icon drawable we want to use. This might be a little fragile if the key or notification icon name were to change:data.put("pinpoint.notification.icon", "ic_notification")
.Pinpoint console method:
Another option is to always define the small icon in the Pinpoint console when creating the push notification, but it's an extra step that feels like it's intended to override the default icon, not to provide the default icon.
The text was updated successfully, but these errors were encountered: