Closed homerokzam closed 8 years ago
Seems to be a networking issue. Where are you calling the register method?
I call the method in the class:
public partial class App: Application { ... protected override void OnStart () { // Handle When your app starts CrossPushNotification.Current.Register (); } ... }
But then event CrossPushNotificationListener. OnRegistered (IPushNotificationListener) does not fire.
Have you initialized the plugin?
Yes. I do the method CrossPushNotification.Initialize
Did you get working?
No, I didn't. Works with iOS, but with Android not.
rdelrosario, I discovered the error. The problem is that in the Android application, OnRegistered event triggers only on the first application running on the device. After the first run the event does not fire. Not that it's a problem, but I did not foresee this.
Thank you.
Yes it prevents multiple time registration. Why you will like to register it if it's already registered?
I think this may be a mistake. IOS project this event is triggered every time the application starts. The Token value on evento OnRegistered for Android seems to me what's wrong. Do you have an example using the plugin for Android?
I will fix this for iOS, so it triggers just one time because shouldn't be registering each time.
I am using visual studio 2015 and XF 2.0. After adding these packages related to notification plugin to my solution, android application fails to deploy onto device (iOS is working properly). Any idea what might be causing this?
What error are you getting?
Strangely there are no errors. In the output window I see the following message check to make sure that in your build configuration build and deploy both are checked (not exactly the same text, but semantically that is what it says). Hope this helps. I though I had enable some of the device permissions (such as INTERNET etc.). I tried to enable quite a few options. Still it was failing to deploy.
I wanted to be sure. As soon as I removed these nuget packages, I was able to deploy my application to device again.
I really liked the idea of abstracting all the notification stuff in a PCL. Let me know if I can be of any help. If needed, I can setup a remote goto meeting for you to look at.
Ok here is my skype: rendyleonel
I'm having the following problem in an XForms project for Android: Push notification error - CrossPushNotification - Register - Java.IO.IOException: Exception of type 'Java.IO.IOException' was thrown.
In this project that is working for iOS I use PushSharp on my server.