Open niihofutoshi opened 11 months ago
Thanks for the request @niihofutoshi. Could you expand a little bit on your use case here so that we can fully understand the ask? How would you decide which icon to show?
@mattcreaser Thank you for your reply!
I would like to set a notification icon like Firebase Cloud Messaging. In Firebase Cloud Messaging, you can set the notification icon by declaring it in the manifest.
<!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
See README(https://goo.gl/l4GJaQ) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_ic_notification" />
<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent" />
https://firebase.google.com/docs/cloud-messaging/android/client?hl=ja
This implementation may be helpful https://github.com/firebase/firebase-android-sdk/tree/master/firebase-messaging
Hello everyone,
I also recently tried to update the Android notification_icon, whitout succes.
Like @niihofutoshi pointed out, it seems you hard-coded it with setSmallIcon(R.drawable.ic_launcher_foreground)
Is there a way this value could be set to the one provided in the manifest ? (at meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_stat_ic_notification" )
Regards,
Before opening, please confirm:
Language and Async Model
Kotlin - Coroutines
Amplify Categories
Notifications
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the feature request
customizable notification icon
pinpoint sdk use ic_launcher_foreground that is hardcoded in the code, so it cannot be customized on the app side. There are cases where a different icon is needed for notifications, so I would like the ability to pass a different icon.
Initialization steps (if applicable)
No response
Code Snippet
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response