Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28467

Firebase Cloud Messaging: How to set the notification icon on android?

$
0
0

I am having trouble setting the notification icon on android studio.

I set up the drawable folder like so:

enter image description here

And I've also set the default icon in my AndroidManifest.xml file:

<meta-data
    android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/notification_icon" />

And here I'm setting the icon field to notification_icon: https://developers.google.com/cloud-messaging/http-server-ref#downstream-http-messages-json (p.s. I'm aware that's GCM, but it works. I'm receiving the notification with everything besides the icon)

What am I missing? All I see is a white square inside a grey circle.

This is my backend code: Pushex.push(%{title: user.name, body: "message goes here", badge: 1, sound: "default", icon: "notification_icon"}, to: user.fcm_token, using: :gcm) (https://github.com/tuvistavie/pushex)


Viewing all articles
Browse latest Browse all 28467

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>