8

Sort of a two part question here:

  1. How do I send emoji's through Firebase notifications? I tried entering a message of the thumbs up emoji with the message body being "\U1F44D" but that didn't render on my phone when the notification came through.

  2. How would I format a notification payload in my node.js file? I imagine it is the same as entering the specific unicode character that corresponds but I can't seem to get either to work... Either I am missing some magic or am not using the right codes.

Thanks!

sanch
  • 696
  • 1
  • 7
  • 21
  • Possible duplicate of [FCM: Displaying emoji or UTF-8 text on iOS that is sent from Android device](https://stackoverflow.com/questions/48239347/fcm-displaying-emoji-or-utf-8-text-on-ios-that-is-sent-from-android-device) – Jay Mar 24 '18 at 14:18
  • Did you try to send a normal emoji ? – TheTiger May 25 '18 at 12:07
  • Maybe this is some new functionality but I wasn’t allowed to use the emoji keyboard in the body of the notification. It always failed. I’m really trying to figure out how to do it programmatically – sanch May 25 '18 at 12:08
  • Did you try copy this emoji and paste in the body? – TheTiger May 28 '18 at 10:27

1 Answers1

11

Putting this here to help someone else in future.

In answer to part 1 of your question, you can definitely send emoji's through Firebase notifications, emoji's are just unicode characters. For part 2, again it's just unicode so you should be able put the unicode char in your payload.

I usually use this page to look up the emoji http://www.unicode.org/emoji/charts/full-emoji-list.html and then just copy and paste the emoji itself into Firebase notifications and send. Firebase will show the emoji in its console.

Firebase notification message body

sam9046
  • 566
  • 1
  • 7
  • 14