rdelrosario / xamarin-plugins

Cross platform Xamarin & Windows plugins for PCLs
MIT License
178 stars 161 forks source link

UWP notifications not firing #133

Open starzen opened 7 years ago

starzen commented 7 years ago

Have implemented this into our xamarin app. Working great on Android and now I tried to get it to work in UWP

Registration works I get the proper WNS uri as token. When I send a WNS message after starting the app nothing happens on the windows device (laptop, phone, tablet). I noticed that when the app is either not started or in the background I received the message on the phone but not in the app. none of my breakpoints ever fire.

calling this in the App constructor in the UWP project

CrossPushNotification.Initialize();

any idea what could be missing?

thanks

Mike

starzen commented 7 years ago

just to add some more information.

In order to verify that push is actually working I commented out the initialization of the CrossPushNotification and added my own code to connect a push notification channel and with my own code it works. I receive push notifications inside the UWP app.

starzen commented 7 years ago

looks like there is an exception thrown inside the json serializer

jobject = JObject.FromObject(args.ToastNotification, serializer);

throws an exception 'The remote procedure call failed'

starzen commented 7 years ago

did a test by modifying the code to create a simpler object and it works.