Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide in-app ability to define a default notification icon #941

Open
Paradam opened this issue May 7, 2019 · 4 comments
Open

Provide in-app ability to define a default notification icon #941

Paradam opened this issue May 7, 2019 · 4 comments
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.

Comments

@Paradam
Copy link

Paradam commented May 7, 2019

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.

@palpatim
Copy link
Member

palpatim commented May 7, 2019

@Paradam

Thanks for reaching out, and for the analysis. We'll add this to our feature request backlog and update this thread when we have more info.

@palpatim palpatim added feature-request Request a new feature pinpoint Issues with the AWS Android SDK for Pinpoint. labels May 7, 2019
@pedrofsn
Copy link

pedrofsn commented Apr 5, 2021

Hi @palpatim, any updates?

@div5yesh div5yesh self-assigned this Jun 6, 2023
@div5yesh
Copy link
Contributor

We released Amplify Android V2 - Push Notifications built on top of AWS SDK for Kotlin. We recommend switching to Amplify v2 which supports notifications with seamless integration with other Amplify categories.

To customize default notification icon with Amplify v2, simply add ic_launcher_foreground.xml to drawable resource directories of your application.

@div5yesh div5yesh added the pending-community-response Issue is pending response from the issue requestor label Jun 29, 2023
@antonymon
Copy link

Do you know if you have to do something similar to change the sound, which doesn't work as it is in the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

5 participants