Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Emojis and special characters are not showing properly in push notification title and body

$
0
0

I have implemented push notification in my xamarin forms android part using FCM. When sending a new message the push notification starts work. But the special characters and emojis not showing properly in the notification's title and body.

When I send a new message I encode the message like below and send it to the back end:

System.Net.WebUtility.UrlEncode(message);

When receiving the message I need to decode the message like below. But on where I can add the following code?

System.Net.WebUtility.UrlDecode(message);

FCM OnMessageReceived() will work only when the app is in foreground mode. I added the code on there and tested the emojis in foreground mode. But the emojis are not working properly, showing special characters instead of emoji. Also, how can I decode the message when the app is in killed or background state.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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