rdelrosario / xamarin-plugins

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

Why on Xamarin Forms push notifications come twice only for Android? #86

Open influs opened 8 years ago

influs commented 8 years ago

I'm using PushSharp through WCF Service on the server and plugin from this repository on the client(phone). From the server i send only one notifications(add logging and ascertained). But on the client only for Android in method void IPushNotificationListener.OnMessage(JObject arameters, DeviceType deviceType) message appears twice in fact the same time. How to fix this bug?

rdelrosario commented 8 years ago

Hi

On iOS you are getting just one notification and on Amdroid two?

Is it displaying two local notifications?

Sent from my iPhone

On 7 sept 2016, at 1:48 a.m., influs notifications@github.com wrote:

I'm using PushSharp through WCF Service on the server and plugin from this repository on the client(phone). From the server i send only one notifications(add logging and ascertained). But on the client only for Android in method void IPushNotificationListener.OnMessage(JObject arameters, DeviceType deviceType) message appears twice in fact the same time. How to fix this bug?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

influs commented 8 years ago

On iOS -one. On Android two notifications with the same content come parallel in two different threads.

rdelrosario commented 8 years ago

I'm not sure why this is happening since the OnMessage call is just done once. I will do a sample to try it out but in the latest tests just had one time OnMessage called. Currently using this version on one app an just get one notification on Android.

On Wednesday, 7 September 2016, influs notifications@github.com wrote:

I'm using PushSharp https://github.com/Redth/PushSharp through WCF Service on the server and plugin from this repository on the client(phone). From the server i send only one notifications(add logging and ascertained). But on the client only for Android in method void IPushNotificationListener.OnMessage(JObject arameters, DeviceType deviceType) message appears twice in fact the same time. How to fix this bug?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rdelrosario/xamarin-plugins/issues/86, or mute the thread https://github.com/notifications/unsubscribe-auth/ACbgJ5yD3orhsCUNltWXJ-RI6LsVmWNwks5qnlAegaJpZM4J2jpJ .

influs commented 8 years ago

do screens of this case for Android in Debug mode version 1.2.4 http://tinypic.com/view.php?pic=no5yio&s=9#.V9FTGph96Uk http://tinypic.com/view.php?pic=2ly1xdh&s=9#.V9FTT5h96Uk

TimofeyBurak commented 8 years ago

Check that there are no additional receivers in your AndroidManifest.xml. We had the same problem because push notification were handled both by Xamarin.PushNotification plugin and by com.google.android.gms.gcm.GcmReceiver receiver defined in AndroidManifest. Removing excess receiver fixed the problem.