xamarin-plugins icon indicating copy to clipboard operation
xamarin-plugins copied to clipboard

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

Open influs opened this issue 9 years ago • 5 comments

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?

influs avatar Sep 07 '16 05:09 influs

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 [email protected] 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.

rdelrosario avatar Sep 08 '16 11:09 rdelrosario

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

influs avatar Sep 08 '16 11:09 influs

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 [email protected] 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 .

rdelrosario avatar Sep 08 '16 11:09 rdelrosario

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

influs avatar Sep 08 '16 12:09 influs

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.

TimofeyBurak avatar Oct 27 '16 17:10 TimofeyBurak