arleyandrada / PushClient

FREE and Open Source - Titanium PushClient Module
Other
44 stars 17 forks source link

Duplicate Push Notifications #112

Closed abdielou closed 8 years ago

abdielou commented 8 years ago

Hi Arley,

I'm seeing the following behaviour. If re-install an app I will get duplicate Push notifications. This will happen only once. Further Push notifications will be received only once.

And it gets weirder. If I re-install the app 5 consecutive times, then I will receive 5 repeated Push notifications. This will happen only on the first received Push after reinstalling the app. Further Push notifications will be received only once.

Although this is not a terrible issue I have no idea on why it happens.

Any thought.

abdielou commented 8 years ago

So now I have a clearer understanding of what is happening. Every time the app is re-installed, a new installation is sent to Parse. So, if I re-install the app 3 times, I will see 3 Push Installations at Parse.

When a Parse Push notification is sent, the device will receive the same Push 3 times. But then, somehow, the Installation at Parse is cleared and only the last one will remain.

Is that Installation clean up done by your PushClient Module?

arleyandrada commented 8 years ago

Hi Abdiel,

No, my PushClient module is not direct integrated to any push notification provider. Maybe it is a feature from Parse: automatic exclude invalid push id.

To avoid duplicates, try to set the "notificationId" attribute to your JSON payload, with an unique or sequential identifier.

Regards,

Arley

abdielou commented 8 years ago

@arleyandrada thanks! Setting a notificationId got rid of duplicates.