-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mulitple Notifications for the same notification #13
Comments
Hi @saademou first of all I'm so glad that the gem is being useful for you. About the issue you mention I'm not really sure what may be happening, I've never heard of it before but I'd advise you to double check you're not generating multiple notifications, and if that's not the case then I'm afraid you'll have to debug inside the inner ruby-push-notifications gem to see if it is actually doing two submissions to the APNS service. Anyway I'm happy to support you on whatever you may need during this troubleshooting process. Regards |
hi @calonso thanks for your answer. here the implementation of the notification part on the server side :
Can you tell me what's going wrong in my code plz |
TBH, that looks quite right. It is also quite a long time since I last worked with this product so I'm a bit rusty as well. A couple of questions come to me right now.
|
Thanks again :) So i investigated my code, it happens only when i have more than 5 devices to notify. In fact, looking the Notifications in the Database by doing :
it returns some x records, Is it normal ? Does notification stay frozen until a new |
Well, that could definitely lead to some notifications being sent several times. A notification is pushed if Coming back to my questions...Has this happened since the very beginning? And yes, notifications are updated when |
Indeed, i am testing your gem only on iOS devices. Has this happened since the very beginning? 1- The gem works fine when I send a single notification to the device, it receives it 2- On the other hand, when I send several notifications, some will be sent and some will remain blocked until the arrival of a new notification system. So Customers will receive old and new notifications, which creates a confusion for them by thinking that these are the same notifications All the notifications must be sended to devices |
Well... This sounds definitely as a bug. Can you please debug if the I think that would explain the behaviour you're seeing. |
I will debug the results and keep u in touch. Is it possible to send a single notification without calling push_notifications. What i need To do is to create a notification and send it immedialty. Dont care about old pending ones |
Cool, thanks for your effort!! Yes, you can create and send the notification straight away. See this example in my rails push notifications test app Please, let me know the outcome of your debug. |
I saw and understood your examples. You use push_notifications all the time, it will push all pending notifications. I need to push only one ( single one ) |
Ok, got you. So you can tell the pusher to push only one by providing only the notification you're interested in. Here you can see how it normally does to push all of them, so you can do the same but instead of for all the pending ones, just for the one you want |
Thanks again :) I found this link https://github.com/calonso/ruby-push-notifications/blob/master/examples/apns.rb |
Hi @saademou. How are you doing with this? Did you manage to find the error? Regards |
Closing as stale... Please reopen if needed or add more info to the issue if you found anything interesting. |
Thank you for your awesome gem !
When calling app.push_notifications, I get a response success and it works perfectly
However, i receive the same notification several Times on iPhone ( not on android and Windows Phone )
First One => 1 seconde after sending the notification
Second one => 1.5 secondes later
Third one => 1.7 secondes later
...
...
I am using ruby 2.2.1p85, Rails 4.1.0 please suggest what could be the issue.
The text was updated successfully, but these errors were encountered: