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

Facing issues with push notification data format/conversion #53

Open
smobiledev opened this issue Feb 22, 2021 · 0 comments
Open

Facing issues with push notification data format/conversion #53

smobiledev opened this issue Feb 22, 2021 · 0 comments

Comments

@smobiledev
Copy link

smobiledev commented Feb 22, 2021

As a part migration form App Center Push,I have integrated "Microsoft.Azure.NotificationHubs.Client" into my xamarin forms solution.

It seems like there is an issue with Push notification info coming from Azure Notification Hub.
For ex consider below PNTemplate :

{"aps":{"alert":"Notification Hub test notification","PNHeader":"PN Header Text"},
"Details":{"source":"s1","dest":"d1","time":"120 mins"}}

In the OnNotificationMessageReceived event, NotificationMessageReceivedEventArgs e
e.Title getting as "Notification Hub test notification" , e.Body as null and e.Data coming as a Dict with 2 keys and 2 values.

The main problem I am facing is the formatted data coming with lot of special char like "","\n","<",">" even null values coming as "". And getting unicode chars like for space - \U00a0 and for degrees - \U00B0.

Any one has idea how to get rid of this type of data conversion.

Is there any proper way to convert above PNTemplate ,with the current implementation I need to handle so many things to remove above mentioned special chars.

I didn't found any samples in the Google, can anyone please provide client side code samples for formatting push notification data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant